<?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/17024" />

	<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>2009-07-16T16:38:35-04:00</updated>

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

		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2009-07-16T16:38:35-04:00</updated>

		<published>2009-07-16T16:38:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89575#p89575</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89575#p89575"/>
		<title type="html"><![CDATA[[TCL ERROR]  wrong # args {{Solved}}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89575#p89575"><![CDATA[
<blockquote class="uncited"><div>I don't see $nick-PUB defined anywhere within the scope of the proc CorePermBan, did you mean $nick?</div></blockquote>No, that would imply the $nick set the ban themselves. We meant $nick-PUB indicating that a $nick set the ban through a PUB bind as part of a script. It's easier to sort the banlist with .bans this way. bans *-PUB #chan<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Thu Jul 16, 2009 4:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2009-07-16T15:55:11-04:00</updated>

		<published>2009-07-16T15:55:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89574#p89574</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89574#p89574"/>
		<title type="html"><![CDATA[[TCL ERROR]  wrong # args {{Solved}}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89574#p89574"><![CDATA[
OK nml375, I see that now. Thanks. It did look rather strange at first sight<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Thu Jul 16, 2009 3:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Branden]]></name></author>
		<updated>2009-07-16T15:31:23-04:00</updated>

		<published>2009-07-16T15:31:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89573#p89573</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89573#p89573"/>
		<title type="html"><![CDATA[[TCL ERROR]  wrong # args {{Solved}}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89573#p89573"><![CDATA[
Ah, really sorry, the error was on my end...<br><br>I had the bot opered up, and it wasn't +o in the room, therefore it wasn't setting the modes.<br><br><br>I'll never make that mistake again. :]<br><br><br><br>Thank you all for your help!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9196">Branden</a> — Thu Jul 16, 2009 3:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2009-07-16T14:56:52-04:00</updated>

		<published>2009-07-16T14:56:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89569#p89569</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89569#p89569"/>
		<title type="html"><![CDATA[[TCL ERROR]  wrong # args {{Solved}}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89569#p89569"><![CDATA[
arfer:<br>Regarding $nick-PUB, due to various mechanics in tcl, if you intend to have a dash (-) in the name of a variable, you'll have to enclose it using {} when reading it. Ie: ${nick-PUB}. Otherwise, the dash is taken as the end of the variable name. As such, speechles' and TCL_no_TK's approach is fully valid, although perhaps not the best of practice in demonstration. The proper way to "tag" in the case of other characters than dash, once again you would use the {}; Ie: ${nick}-PUB.<br><br>So far, I've seen several different approaches to use newchanban, and all seem perfectly valid. Perhaps focus on figuring out why newchanban does not set the ban on the channel instead?<br><br>Branden:<br>Think you could post your channel settings (use .chaninfo from the dcc chat partyline)? Especially the dynamicbans and enforcebans (shouldn't matter since we've got it sticky though).<br>Could you check whether the new bans are added to your eggdrop's internal banlist (use .bans all from the dcc chat partyline)?<br>Also, have you verified that the generated banmask isn't blocked by the server (numerous ircd's these days bounce bans that match already active bans on the channel).<br>Other things to check, that the ban/invite/exempt-list isn't full, and that your eggdrop's setting match the ircd's capabilities..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Thu Jul 16, 2009 2:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2009-07-16T14:29:12-04:00</updated>

		<published>2009-07-16T14:29:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89568#p89568</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89568#p89568"/>
		<title type="html"><![CDATA[[TCL ERROR]  wrong # args {{Solved}}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89568#p89568"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind PUB l|l !ban pCoreBan proc pCoreBan {nick uhost hand chan text} {    set who [lindex [split $text] 0]    set why [join [lrange [split $text] 1 end]]    switch -- [regexp -- {\.} $who] {        0 {            if {[onchan $who]} {                set host [maskhost [getchanhost $who]]            }        }        1 {set host [maskhost $who]}        default {}    }    if {[info exists host]} {newchanban $chan $host $nick\-PUB $why 0 sticky}    return 0} </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Thu Jul 16, 2009 2:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2009-07-16T13:44:49-04:00</updated>

		<published>2009-07-16T13:44:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89565#p89565</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89565#p89565"/>
		<title type="html"><![CDATA[[TCL ERROR]  wrong # args {{Solved}}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89565#p89565"><![CDATA[
The Tcl interpreter will look for a variable named nick-PUB since there is nothing to suggest that -PUB is tagged onto the value of the variable nick.<br><br>Use $nick\-PUB<br><br>Though I accept it does work<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Thu Jul 16, 2009 1:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TCL_no_TK]]></name></author>
		<updated>2009-07-16T13:23:17-04:00</updated>

		<published>2009-07-16T13:23:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89563#p89563</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89563#p89563"/>
		<title type="html"><![CDATA[[TCL ERROR]  wrong # args {{Solved}}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89563#p89563"><![CDATA[
The use of <strong class="text-strong">$nick-PUB</strong> was to set the owner of the ban to the person's nickname that issued the command plus the tag "-PUB" <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> and Yes, its superfluous <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"> but i prefer to include it <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>As for newchanban not working, you could trying removing the putquick' and stuff, since added a ban via newchanban will already result in a ban and kick of any/all users matching the given address.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8130">TCL_no_TK</a> — Thu Jul 16, 2009 1:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2009-07-16T11:57:53-04:00</updated>

		<published>2009-07-16T11:57:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89562#p89562</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89562#p89562"/>
		<title type="html"><![CDATA[[TCL ERROR]  wrong # args {{Solved}}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89562#p89562"><![CDATA[
The variable why should be converted back to a string rather than left as a list<br><div class="codebox"><p>Code: </p><pre><code>set why [join [lrange [split $text] 1 end]] </code></pre></div>I don't see $nick-PUB defined anywhere within the scope of the proc CorePermBan, did you mean $nick?<br><br>"$why" is in quotes in the newchanban and doesn't need to be<br><br>The following code seems superfluous, since the newchanban is set as sticky explicitly<br><div class="codebox"><p>Code: </p><pre><code>if {![isbansticky $whohost $chan]} {     stick $whohost $chan }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Thu Jul 16, 2009 11:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Branden]]></name></author>
		<updated>2009-07-15T20:24:23-04:00</updated>

		<published>2009-07-15T20:24:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89560#p89560</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89560#p89560"/>
		<title type="html"><![CDATA[[TCL ERROR]  wrong # args {{Solved}}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89560#p89560"><![CDATA[
"newchanban" is still not working nor outputting any errors. :S<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9196">Branden</a> — Wed Jul 15, 2009 8:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TCL_no_TK]]></name></author>
		<updated>2009-07-15T20:21:58-04:00</updated>

		<published>2009-07-15T20:21:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89559#p89559</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89559#p89559"/>
		<title type="html"><![CDATA[[TCL ERROR]  wrong # args {{Solved}}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89559#p89559"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc CorePermBan { nick host hand chan text } {    set who [lindex [split $text] 0]    set why [lrange [split $text] 1 end]    set whohost [stricthost [lindex [split $text] 0] $chan]    putquick "MODE $chan +b $whohost"    putquick "KICK $chan $who :$why"    newchanban $chan $whohost $nick-PUB "$why" 0 sticky   if {![isbansticky $whohost $chan]} {    stick $whohost $chan   }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8130">TCL_no_TK</a> — Wed Jul 15, 2009 8:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Branden]]></name></author>
		<updated>2009-07-15T20:11:43-04:00</updated>

		<published>2009-07-15T20:11:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89558#p89558</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89558#p89558"/>
		<title type="html"><![CDATA[[TCL ERROR]  wrong # args {{Solved}}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89558#p89558"><![CDATA[
<blockquote class="uncited"><div>How do you supoose to stick the ban thats never been set correctly? Your using putquick'd mode changes, not eggdrops internal bans to catch this. Perhaps you should use:<div class="codebox"><p>Code: </p><pre><code>proc CorePermBan { nick host hand chan text } {   set who [lindex [split $text] 0]   set why [lrange [split $text] 1 end]   set whohost [stricthost [lindex [split $text] 0] $chan]   putquick "MODE $chan +b $whohost"   putquick "KICK $chan $who :$why"   newchanban $chan $whohost "$nick-PUB" $why 0   stick ban $whohost $chan}</code></pre></div>As you can see, you forgot the $chan parameter of the stick command. You also forgot to put the colon between $who and $why in your putquick'd kick, meaning the ircd would always kick users without giving your $why reason.</div></blockquote><br>Yeah, I was trying to do that instead, but the bot isn't setting the ban at all with newchanban, and it's not outputting any errors.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9196">Branden</a> — Wed Jul 15, 2009 8:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2009-07-15T20:12:25-04:00</updated>

		<published>2009-07-15T20:01:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89557#p89557</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89557#p89557"/>
		<title type="html"><![CDATA[[TCL ERROR]  wrong # args {{Solved}}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89557#p89557"><![CDATA[
How do you supoose to stick the ban thats never been set correctly? Your using putquick'd mode changes, not eggdrops internal bans to catch this. Perhaps you should use:<div class="codebox"><p>Code: </p><pre><code>proc CorePermBan { nick host hand chan text } {   set who [lindex [split $text] 0]   set why [lrange [split $text] 1 end]   set whohost [stricthost [lindex [split $text] 0] $chan]   putquick "MODE $chan +b $whohost"   putquick "KICK $chan $who :$why"   newchanban $chan $whohost "$nick-PUB" $why 0   stick ban $whohost $chan}</code></pre></div>As you can see, you forgot the $chan parameter of the stick command. You also forgot to put the colon between $who and $why in your putquick'd kick, meaning the ircd would always kick users without giving your entire $why reason. It would've only given the first word used, not the entire sentence. This is what the colon is for.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Wed Jul 15, 2009 8:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Branden]]></name></author>
		<updated>2009-07-15T19:46:14-04:00</updated>

		<published>2009-07-15T19:46:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89556#p89556</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89556#p89556"/>
		<title type="html"><![CDATA[[TCL ERROR]  wrong # args {{Solved}}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89556#p89556"><![CDATA[
ERROR:<br><br><br><div class="codebox"><p>Code: </p><pre><code>[00:27] Tcl error [CorePermBan]: wrong # args: should be "stick ban ?channel?"</code></pre></div><br><br>SCRIPT:<br><br><div class="codebox"><p>Code: </p><pre><code>proc CorePermBan { nick host hand chan text } {   set who [lindex [split $text] 0]   set why [lrange [split $text] 1 end]   set whohost [stricthost [lindex [split $text] 0] $chan]   putquick "MODE $chan +b $whohost"   putquick "KICK $chan $who $why"   stick ban $whohost}</code></pre></div><br><br>Sorry to be a pain!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9196">Branden</a> — Wed Jul 15, 2009 7:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Branden]]></name></author>
		<updated>2009-07-14T21:42:01-04:00</updated>

		<published>2009-07-14T21:42:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89548#p89548</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89548#p89548"/>
		<title type="html"><![CDATA[[TCL ERROR]  wrong # args {{Solved}}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89548#p89548"><![CDATA[
Thank you!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9196">Branden</a> — Tue Jul 14, 2009 9:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2009-07-14T21:33:17-04:00</updated>

		<published>2009-07-14T21:33:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89547#p89547</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89547#p89547"/>
		<title type="html"><![CDATA[[TCL ERROR]  wrong # args {{Solved}}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89547#p89547"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set whohost [stricthost [lindex [split $text] 0] $chan]</code></pre></div>You've tied chan as an argument in your procedure. This is why you can't invoke it without specifying the chan parameter as well as the host.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Tue Jul 14, 2009 9:33 pm</p><hr />
]]></content>
	</entry>
	</feed>
