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

	<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>2006-05-10T06:59:39-04:00</updated>

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

		<entry>
		<author><name><![CDATA[GeeX]]></name></author>
		<updated>2006-05-10T06:59:39-04:00</updated>

		<published>2006-05-10T06:59:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62880#p62880</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62880#p62880"/>
		<title type="html"><![CDATA[Ban user]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62880#p62880"><![CDATA[
Thanks, i solved the problem <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6744">GeeX</a> — Wed May 10, 2006 6:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2006-05-09T12:32:06-04:00</updated>

		<published>2006-05-09T12:32:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62844#p62844</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62844#p62844"/>
		<title type="html"><![CDATA[Ban user]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62844#p62844"><![CDATA[
This is a really stupid mistake. It took me looking 3 times at it to find it. And I only found it, because I recognized that this error can only occur within if expressions and the I noticed something:<div class="codebox"><p>Code: </p><pre><code>} elseif {</code></pre></div>this is supposed to be just an "else", it tries to evaluate the whole body after elseif as an if expression. therefore the string "set" without an equalizer operator doesnt make any sense for if and returns an error for the whole line which starts with the first line.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Tue May 09, 2006 12:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[GeeX]]></name></author>
		<updated>2006-05-09T12:27:21-04:00</updated>

		<published>2006-05-09T12:27:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62843#p62843</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62843#p62843"/>
		<title type="html"><![CDATA[Ban user]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62843#p62843"><![CDATA[
Doens't work  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6744">GeeX</a> — Tue May 09, 2006 12:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-05-09T12:19:06-04:00</updated>

		<published>2006-05-09T12:19:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62841#p62841</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62841#p62841"/>
		<title type="html"><![CDATA[Ban user]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62841#p62841"><![CDATA[
Try changing<div class="codebox"><p>Code: </p><pre><code>if {![channel get $chan protection(flag)]} {</code></pre></div>to<div class="codebox"><p>Code: </p><pre><code>if {![channel get $chan $protection(flag)]} {</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Tue May 09, 2006 12:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[GeeX]]></name></author>
		<updated>2006-05-09T08:04:34-04:00</updated>

		<published>2006-05-09T08:04:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62833#p62833</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62833#p62833"/>
		<title type="html"><![CDATA[Ban user]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62833#p62833"><![CDATA[
Errorinfo:<br><div class="codebox"><p>Code: </p><pre><code>result: syntax error in expression " set protection(banuser) [lindex [split $arg...": variable references require preceding $  ("if" test expression)  while compiling "if {![channel get $chan protection(flag)]} { putserv "NOTICE $nick :Error. Protection is disabled. Enable it by typing $protection(tri..." (compiling body of proc "protection:ban", line 3) invoked from within  "protection:ban $_pub1 $_pub2 $_pub3 $_pub4 $_pub5" </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6744">GeeX</a> — Tue May 09, 2006 8:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-05-08T19:25:19-04:00</updated>

		<published>2006-05-08T19:25:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62811#p62811</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62811#p62811"/>
		<title type="html"><![CDATA[Ban user]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62811#p62811"><![CDATA[
Show us the info from <strong class="text-strong">.set errorInfo</strong>.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Mon May 08, 2006 7:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[GeeX]]></name></author>
		<updated>2006-05-08T16:09:47-04:00</updated>

		<published>2006-05-08T16:09:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62801#p62801</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62801#p62801"/>
		<title type="html"><![CDATA[Ban user]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62801#p62801"><![CDATA[
Can you tell why it says: set protection(banuser) [lindex [split $arg] 0] ...": variable references require preceding $<br>when I use this proc?<br><div class="codebox"><p>Code: </p><pre><code>        proc protection:ban { nick host hand chan arg } {            global protection            if {![channel get $chan protection(flag)]} {                putserv "NOTICE $nick :Error. Protection is disabled. Enable it by typing $protection(trigger)protection on in order to use ban."                return            } elseif {$arg == ""} {                putserv "NOTICE $nick :Error. Wrong syntax. Use $protection(trigger)ban 'nick' 'duration' 'reason'."            } elseif {                set protection(banuser) [lindex [split $arg] 0]                set protection(banhost) "*![getchanhost $protection(banuser) $chan]"                set protection(duration) [lindex [split $arg] 1]                set protection(reason) [join [lrange [split $arg] 2 end]]                if {![isnumber $protection(duration)]} {                    set protection(reason) [join [lrange [split $arg] 1 end]]                    set protection(duration) "60"                }                if {![onchan $protection(banuser) $chan] &amp;&amp; ![string match "*!*" $protection(banuser)} {                    set protection(banhost) "$protection(banuser)*!*@"                    putquick "MODE $chan +b $protection(banhost)"                    putserv "NOTICE $nick :Done. $protection(banhost) successfully added."                }                if {[string match "*!*" $protection(banuser)] &amp;&amp; [matchattr [nick2hand $nick] n|n $chan]} {                    set protection(banhost) "$protection(banuser)"                    if {$protection(banhost) == "*!*@*"} {                        return                    } else {                        putquick "mode $chan +b $protection(banhost)"                        putserv "NOTICE $nick :Done. $protection(banhist) successfully added."                    }                }                if {[isbot $protection(banuser)]} {                    putserv "NOTICE $nick :Error. You cannot ban the bot."                    return                }                if {[matchattr [nick2hand $nick] o|o $chan] &amp;&amp; [matchattr [nick2hand $protection(banuser)] mn|mn $chan]} {                    putserv "NOTICE $nick :Error. You cannot ban $protection(banuser) from $chan (higher access level)."                    return                }                if {[matchattr [nick2hand $nick] m|m $chan] &amp;&amp; [matchattr [nick2hand $protection(banuser)] n|n $chan]} {                    putserv "NOTICE $nick :Error. You cannot ban $protection(banuser) from $chan (higher access level)."                    return                }                if {[isdynamicip $protection(banhost)]} {                    set protection(banhost) "[maskhost $protection(banhost)]"                }                set protection(id) [channel get $chan "$protection(kickid)"]                incr protection(id)                channel set $chan protection(kickid) "$protection(id)"                regsub -all -- {:reason:} $protection(kickmsg) $protection(reason) protection(kickmsg)                regsub -all -- {:id:}     $protection(kickmsg) $protection(id) protection(kickmsg)                newchanban $chan $protection(banhost) $handle "$protection(kickmsg)" $protection(duration)                putquick "KICK $chan $protection(banuser) :$protection(kickmsg)"            }        }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6744">GeeX</a> — Mon May 08, 2006 4:09 pm</p><hr />
]]></content>
	</entry>
	</feed>
