<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/18565" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2011-07-28T20:08:03-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/18565</id>

		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2011-07-28T20:08:03-04:00</updated>

		<published>2011-07-28T20:08:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97295#p97295</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97295#p97295"/>
		<title type="html"><![CDATA[help needed with mass-removing ignores]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97295#p97295"><![CDATA[
You're welcome.    <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Thu Jul 28, 2011 8:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tigwis]]></name></author>
		<updated>2011-07-28T17:40:55-04:00</updated>

		<published>2011-07-28T17:40:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97294#p97294</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97294#p97294"/>
		<title type="html"><![CDATA[help needed with mass-removing ignores]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97294#p97294"><![CDATA[
My sincere thanks for this great and helpfull post.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11742">tigwis</a> — Thu Jul 28, 2011 5:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2011-07-28T20:06:59-04:00</updated>

		<published>2011-07-28T15:44:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97293#p97293</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97293#p97293"/>
		<title type="html"><![CDATA[Re: help needed with mass-removing ignores]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97293#p97293"><![CDATA[
<blockquote class="uncited"><div>Dear friends of the TCL language.<br><br>I decided to write a script a few days ago for my sc2 clan, that <br>involves picking a challenger every day at a certain time.<br>Most of the script is done, but it seems i can not really<br>manage to do one proc: mass-removing bans.<br></div></blockquote><br>bans? <br>or ignores?<br><blockquote class="uncited"><div><br>Here is what I have thus far:<br><br>bind pub - !delignores delignores:pub<br>proc delignores:pub {vars} {<br>foreach ignore [ignorelist] { killignore 1 }<br>}<br><br>The error:<br>[17:52:19] Tcl error [delignores:pub]: wrong # args: should be "delignores:pub vars"<br><br><br>Could someone help me into the right direction?<br>I must admit that most of my procs are based on examples <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br>Thank you.</div></blockquote>Visit:<br><a href="http://www.eggheads.org/support/egghtml/1.6.20/tcl-commands.html" class="postlink">http://www.eggheads.org/support/egghtml ... mands.html</a><br><br>and scroll down to:<br>Bind types<br><br>Find:<blockquote class="uncited"><div>4. PUB<br><br>bind pub &lt;flags&gt; &lt;command&gt; &lt;proc&gt;<br>procname &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt; &lt;channel&gt; &lt;text&gt;<br></div></blockquote>That is describing the way to use <br>bind pub<br>and the procedure called by bind pub.<br><br>See how there are five variables passed to the procedure?<br><br>It doesnt' matter what you name them, but something like this is typical:<br><div class="codebox"><p>Code: </p><pre><code>delignores:pub {nick uhost handle chan text}  {# code to run within this proc goes here }</code></pre></div>Not using the right number of variables is the cause of the error you are seeing.   You had only one.<br><br><br>Further,  while you are at:<br><a href="http://www.eggheads.org/support/egghtml/1.6.20/tcl-commands.html" class="postlink">http://www.eggheads.org/support/egghtml ... mands.html</a><br>find:<br>killignore &lt;hostmask&gt;<br><br>That's telling you that the killignore command does not want a numeral, like you are giving it.  It wants the actual hostmask from the current list of ignores, that you wish to kill.<br><br>If you use the ignorelist command, you can get that list.<br>Then, you'd have to index into it, to get the hostmask from the first sublist returned.<br><br>Try this:<div class="codebox"><p>Code: </p><pre><code>foreach ig [ignorelist] {  killignore [lindex $ig 0 ] }#this is untested </code></pre></div>For information on using lindex , go here:<br><a href="http://www.tcl.tk/man/tcl8.5/TclCmd/lindex.htm" class="postlink">http://www.tcl.tk/man/tcl8.5/TclCmd/lindex.htm</a><br><br>For information on using foreach, go here:<br><a href="http://www.tcl.tk/man/tcl8.5/TclCmd/foreach.htm" class="postlink">http://www.tcl.tk/man/tcl8.5/TclCmd/foreach.htm</a><br><br>Main page is here:<br><a href="http://www.tcl.tk/man/tcl8.5/TclCmd/contents.htm" class="postlink">http://www.tcl.tk/man/tcl8.5/TclCmd/contents.htm</a><br><br><br>I hope this helps.<br><br><br><br>edit:<br>fixed typo.<br>Was:<br>delignores:pub {nick uhost handle chan text}  [<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Thu Jul 28, 2011 3:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tigwis]]></name></author>
		<updated>2011-07-28T14:00:16-04:00</updated>

		<published>2011-07-28T14:00:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97292#p97292</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97292#p97292"/>
		<title type="html"><![CDATA[help needed with mass-removing ignores]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97292#p97292"><![CDATA[
Dear friends of the TCL language.<br><br>I decided to write a script a few days ago for my sc2 clan, that <br>involves picking a challenger every day at a certain time.<br>Most of the script is done, but it seems i can not really<br>manage to do one proc: mass-removing bans.<br><br>Here is what I have thus far:<br><br>bind pub - !delignores delignores:pub<br>proc delignores:pub {vars} {<br>foreach ignore [ignorelist] { killignore 1 }<br>}<br><br>The error:<br>[17:52:19] Tcl error [delignores:pub]: wrong # args: should be "delignores:pub vars"<br><br><br>Could someone help me into the right direction?<br>I must admit that most of my procs are based on examples <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br>Thank you.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11742">tigwis</a> — Thu Jul 28, 2011 2:00 pm</p><hr />
]]></content>
	</entry>
	</feed>
