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

	<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>2010-02-21T07:54:47-04:00</updated>

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

		<entry>
		<author><name><![CDATA[F-user]]></name></author>
		<updated>2010-02-21T07:54:47-04:00</updated>

		<published>2010-02-21T07:54:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92187#p92187</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92187#p92187"/>
		<title type="html"><![CDATA[Invkick.tcl help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92187#p92187"><![CDATA[
Ok thanks. Now leave for kick works perfectly but still /invite botnick #channel doesn't work <br><br>From dcc partyline.<br><br>13:53 &lt;botnick&gt; [13:53] Tcl error [invitechan]: invalid channel prefix<br>13:53 &lt;botnick&gt; [13:53] Anom!<a href="mailto:anonym@anonymworksi.com">anonym@anonymworksi.com</a> invited me to #channel<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11089">F-user</a> — Sun Feb 21, 2010 7:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2010-02-09T17:48:21-04:00</updated>

		<published>2010-02-09T17:48:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92028#p92028</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92028#p92028"/>
		<title type="html"><![CDATA[Invkick.tcl help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92028#p92028"><![CDATA[
It's because the coder of this script is making the mistake of using the special token "args" within his procedure header for invitechan. Then they craft crude work-arounds to cleanup what this does.<div class="codebox"><p>Code: </p><pre><code>set opts [split $args "{:}"]set chan [lindex $opts 2] </code></pre></div>Usually when you split raws this way,  you want lindex position 1. But here, notice they've used lindex position 2. This is because of the extra bracings introduced by using the special token "args" when using it to replace one argument within a bind. This throws everything off, and special characters will now cause problems and break this script easily. I've rewritten it for you clean, and according to the golden rules of tcl. Enjoy <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><div class="codebox"><p>Code: </p><pre><code># 0 = no, 1 = yesset oponly "1"# how many channels is the max# you want your bot in?# set to zero to not use a limit.set chanlim "20"# bindsbind raw - INVITE invitechanbind kick - * gotkicked# inviteproc invitechan {from key text} {global chanlim oponlyset nick [lindex [split $from "!"] 0]set chan [lindex [split $text :] 1]if {$oponly &amp;&amp; ![matchattr [nick2hand $nick] "o"]} { return 0 }if {$chanlim &gt; 0 &amp;&amp; [llength [channels]] &gt;= $chanlim} {puthelp "NOTICE $nick :Sadly I cannot join any more channels."return 0}channel add $chansave}# kickproc gotkicked {nick uhost hand chan target reason} {global chanfileif {[isbotnick $target]} {set channelconf [open $chanfile r]while {![eof $channelconf]} {gets $channelconf regelif {$regel == "" || [string match "#*" $regel]} { continue }if {[string match -nocase "channel?add?$chan*" $regel]} {channel remove $chanbreak}}close $channelconf}}putlog "invite script loaded."# the reason for using eof is simple, if you downloaded this# and do NOT see "#eof" as the last line here, then you# do not have the complete script....#eof</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Tue Feb 09, 2010 5:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[F-user]]></name></author>
		<updated>2010-02-06T04:52:45-04:00</updated>

		<published>2010-02-06T04:52:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91974#p91974</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91974#p91974"/>
		<title type="html"><![CDATA[Invkick.tcl help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91974#p91974"><![CDATA[
Okey i have found this script <a href="http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&amp;id=1005" class="postlink">invkick.tcl </a>on egghelp but one problem it isnt working properly!<br><br>This error comes in partyline everytime i try to invite bot channel.<br> Tcl error [invitechan]: invalid channel prefix<br><br>Is this problem on script or in my bot?<br><br>command /invite botnick #chan<br><blockquote class="uncited"><div># Bot invite and kick script, makes the bot respond to invitations and stay away after being kicked.<br># There is a build in check for +o status you might want to disable, look at the commented line in the code.<br># By [NUT] (<a href="mailto:nut@fun-industries.nl">nut@fun-industries.nl</a>) a.k.a. dFt^Nut <a href="http://www.dftclan.nl" class="postlink">http://www.dftclan.nl</a><br><br>### Config ###<br><br>###<br># If you dont want invite to be opper only, change this value [1 = on, 0 is off]<br>###<br><br>set oponly "1"<br><br>###<br># If you are not using an irc network that has a channel limit, set the number of max channels to 0,<br># this will disable the maxchan value. Simply set this to your networks maxchan value otherwise.<br># [Set to 20 as default (Quakenet)]<br>###<br><br>set chanlim "20"<br><br>### Change Log ###<br># Version 1<br># - Initial release<br># Version 1.01<br># - Fixed a small bug<br># - Changed some configuration options<br># Version 1.02<br># - Fixed another small bug <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_neutral.gif" width="15" height="15" alt=":|" title="Neutral"><br># Version 1.03<br># - discovered quick and dirty (untested) bug fixes are bad <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br># - discovered my nickname was disliked by TCL <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br># - fixed bugs <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br>###<br><br>###<br># Remember to quit and restart the bot and check for conflicting scripts!<br># Not doing this will result in a nonfunctional script. After loading this script and discovering<br># it doesnt work dcc into your bot and type .binds (be sure to have scroll back on!) and check the<br># binds for command types kick and raw.<br>###<br><br>bind raw - INVITE invitechan<br>bind kick - * gotkicked<br><br>proc invitechan {mask word args} {<br>global chanlim oponly<br> set opts [split $mask "!"]<br> set nick [lindex $opts 0]<br> set opts [split $args "{:}"]<br> set chan [lindex $opts 2]<br> set uhand [nick2hand $nick]<br><br> if {$oponly} {<br>if {![matchattr $uhand "o"]} { return 0 }<br> }<br><br> if {$chanlim &gt; 0} {<br>if {[llength [channels]] &gt;= $chanlim} {<br>puthelp "NOTICE $nick :Sadly I cannot join any more channels."<br>return 0<br>}<br> }<br><br> channel add $chan {}<br> save<br>}<br><br>proc gotkicked {nick mask handle chan target reason} {<br> global botnick chanfile<br><br> if {[string match $botnick $target]} {<br>        set isdynamic 0<br>        set channelconf [open $chanfile r]<br>        while {![eof $channelconf]} {<br>                gets $channelconf regel<br>                if {$regel == "" || [string match "#*" $regel]} { continue }<br>                if {[string match -nocase "channel?add?$chan*" $regel]} { set isdynamic 1 } else { continue }<br>        }<br><br>        if {$isdynamic == "1"} {<br>                channel remove $chan<br>                save<br>        }<br> }<br>}<br><br>putlog "invkick 1.03 Loaded. Made by NUT"</div></blockquote>Thanks for help<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11089">F-user</a> — Sat Feb 06, 2010 4:52 am</p><hr />
]]></content>
	</entry>
	</feed>
