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

	<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>2008-05-09T09:49:14-04:00</updated>

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

		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-05-09T09:49:14-04:00</updated>

		<published>2008-05-09T09:49:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82828#p82828</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82828#p82828"/>
		<title type="html"><![CDATA[Invite Script - Multi Channel ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82828#p82828"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc add_1 { nick uhost hand args } {   global chan_1 db   set args [split $args " "]   set user [lindex $args 0]   set user [string range $user 1 end]   set pass [lindex $args 1]   set pass [string range $pass 0 end-1]...snipped irrelevant sections...proc inv_1 { nick uhost hand arg } {   global chan_1 db   set arg [split $arg " "]   set user1 [lindex $arg 0]   set user1 [string range $user1 0 end]   set pass1 [lindex $arg 1]   set pass1 [string range $pass1 0 end] </code></pre></div>HAW.. Do you see the problem here?<br>The top proc incorrectly uses the special variable $args (you aren't using multiple binds with different sets of parameters to trigger this proc meaning args is used for no reason) and needs to do string range tricks ('1' and 'end-1' rather than '0' and 'end') to keep curly bracings out of the output.. lmao<br><br>Notice the bottom proc needlessly uses string range for no apparent reason (using it with 0-end range is equivalent to not using it at all), this is because the scripter probably couldn't figure out why they had to use it in the top proc (they used args, they had to to keep curly bracings from leading and ending the output..HAW) and not in the bottom.. lmao <blockquote class="uncited"><div>&lt;scripter&gt; why are curly braces showing up?<br>&lt;scripter&gt; oh well, some bitching string ranges will clean that up</div></blockquote>LMAO! I'm sure all of us have used kludges such as this to fix issues that were out of our tcl scope (as you learn more, of course, you too can spot these things easily and fix them correctly).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Fri May 09, 2008 9:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Elfriede]]></name></author>
		<updated>2008-05-09T09:32:13-04:00</updated>

		<published>2008-05-09T09:32:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82827#p82827</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82827#p82827"/>
		<title type="html"><![CDATA[Invite Script - Multi Channel ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82827#p82827"><![CDATA[
Works perfect now ! Thank you very much !<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9204">Elfriede</a> — Fri May 09, 2008 9:32 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2008-05-09T09:22:05-04:00</updated>

		<published>2008-05-09T09:22:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82825#p82825</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82825#p82825"/>
		<title type="html"><![CDATA[Invite Script - Multi Channel ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82825#p82825"><![CDATA[
hmm.. made a small modification, try it now<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Fri May 09, 2008 9:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Elfriede]]></name></author>
		<updated>2008-05-09T08:05:38-04:00</updated>

		<published>2008-05-09T08:05:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82822#p82822</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82822#p82822"/>
		<title type="html"><![CDATA[Invite Script - Multi Channel ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82822#p82822"><![CDATA[
Thx, but on doing the invite command, nothing happens <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br><br>Hopefully you'll help me out<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9204">Elfriede</a> — Fri May 09, 2008 8:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2008-05-09T09:21:37-04:00</updated>

		<published>2008-05-09T07:06:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82821#p82821</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82821#p82821"/>
		<title type="html"><![CDATA[Invite Script - Multi Channel ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82821#p82821"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>############################################                     # Channel invite 0.1 BETA         # Scripted by Dreamer            #                      ############################################   # Type /msg &lt;botnick&gt; @add &lt;nick&gt; &lt;pass&gt;# to add someone to the database# Type /msg &lt;botnick&gt; @invite &lt;nick&gt; &lt;pass&gt;# to get invited in to channel## History:# 0.1: First version############################################# EDIT FROM HERE# Channel where the bot wil inviteset chan_1 "#chav #chan2 #chan3"# Name of the databaseset db scripts/chan.invite# STOP EDITING FROM HEREset ver "0.1"bind msg - @add add_1bind msg - @invite inv_1putlog "Channel invite $ver by Dreamer loaded"# Script starts nowproc add_1 { nick uhost hand args } {   global chan_1 db   set args [split $args " "]   set user [lindex $args 0]   set user [string range $user 1 end]   set pass [lindex $args 1]   set pass [string range $pass 0 end-1]   if { $user == "" || $pass == "" } {         putserv "PRIVMSG $nick :Please instert a Nickname and a password"         return 0   }   set up $user|$pass   set wfile [open $db a+]   puts $wfile $up   close $wfile   putserv "PRIVMSG $chan_1 :\[\00314DB UPDATE\003\] $user is added to Database by $nick"}proc inv_1 { nick uhost hand arg } {   global chan_1 db   set arg [split $arg " "]   set user1 [lindex $arg 0]   set user1 [string range $user1 0 end]   set pass1 [lindex $arg 1]   set pass1 [string range $pass1 0 end]   set up1 $user1|$pass1   set found 0   set fs [open $db r]   while {![eof $fs]} {   gets $fs line   if {$line == $up1} { set found 1 }   }   close $fs   if {$found} {foreach ch [split $chan_1 " "] {putserv "PRIVMSG $ch :\[\00314INVITE\003\] $user1 invited him/herself as $nick"putserv "invite $nick $ch"}   } else {   putserv "PRIVMSG $nick :Wrong pass or username !!!!"   putserv "PRIVMSG $chan_1 :\[\0034INTRUDER\003\] $nick tried to get in the channel"   }} </code></pre></div> this should do the trick<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Fri May 09, 2008 7:06 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Elfriede]]></name></author>
		<updated>2008-05-09T06:22:17-04:00</updated>

		<published>2008-05-09T06:22:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82820#p82820</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82820#p82820"/>
		<title type="html"><![CDATA[Invite Script - Multi Channel ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82820#p82820"><![CDATA[
Hi everybody <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>I've got the following of the tcl archive. No way to reach the author. Can someone help to make this script multichannel ?<br><div class="codebox"><p>Code: </p><pre><code>############################################# Channel invite 0.1 BETA# Scripted by Dreamer# ############################################# Type /msg &lt;botnick&gt; @add &lt;nick&gt; &lt;pass&gt; # to add someone to the database# Type /msg &lt;botnick&gt; @invite &lt;nick&gt; &lt;pass&gt;# to get invited in to channel## History:# 0.1: First version############################################# EDIT FROM HERE# Channel where the bot wil inviteset chan_1 "#chav"# Name of the databaseset db scripts/chan.invite# STOP EDITING FROM HEREset ver "0.1"bind msg - @add add_1bind msg - @invite inv_1putlog "Channel invite $ver by Dreamer loaded"# Script starts nowproc add_1 { nick uhost hand args } {global chan_1 dbset args [split $args " "]set user [lindex $args 0]set user [string range $user 1 end]set pass [lindex $args 1]set pass [string range $pass 0 end-1]if { $user == "" || $pass == "" } { putserv "PRIVMSG $nick :Please instert a Nickname and a password" return 0}set up $user|$passset wfile [open $db a+]puts $wfile $upclose $wfileputserv "PRIVMSG $chan_1 :\[\00314DB UPDATE\003\] $user is added to Database by $nick"}proc inv_1 { nick uhost hand arg } {global chan_1 dbset found 0set arg [split $arg " "]set user1 [lindex $arg 0]set user1 [string range $user1 0 end]set pass1 [lindex $arg 1]set pass1 [string range $pass1 0 end]set up1 $user1|$pass1set found 0 set fs [open $db r] while {![eof $fs]} { gets $fs line if {$line == $up1} { set found 1 } } close $fs if {$found} { putserv "PRIVMSG $chan_1 :\[\00314INVITE\003\] $user1 invited him/herself as $nick" putserv "invite $nick $chan_1"} else {putserv "PRIVMSG $nick :Wrong pass or username !!!!"putserv "PRIVMSG $chan_1 :\[\0034INTRUDER\003\] $nick tried to get in the channel"} }</code></pre></div>Thx 4 help !<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9204">Elfriede</a> — Fri May 09, 2008 6:22 am</p><hr />
]]></content>
	</entry>
	</feed>
