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

	<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>2003-06-15T03:07:23-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-06-15T03:07:23-04:00</updated>

		<published>2003-06-15T03:07:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21852#p21852</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21852#p21852"/>
		<title type="html"><![CDATA[set commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21852#p21852"><![CDATA[
First remove this line<div class="codebox"><p>Code: </p><pre><code>putlog "[strlwr $chan] [lrange $line 1 end]"</code></pre></div>and add this line<div class="codebox"><p>Code: </p><pre><code>if {[info exists players([strlwr $chan])]} { continue }</code></pre></div>before the<blockquote class="uncited"><div>if {![string match -nocase [strlwr $chan] [lindex $line 0]]} { continue }</div></blockquote>and should do fine..<br><br>PS: ReaLz: after I've restarted it:<blockquote class="uncited"><div>(10:06:27) ::: &lt;caesar&gt; .tcl array get players<br>(10:06:27) ::: &lt;looser&gt; Tcl: #bla moo</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sun Jun 15, 2003 3:07 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-06-15T02:59:22-04:00</updated>

		<published>2003-06-15T02:59:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21851#p21851</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21851#p21851"/>
		<title type="html"><![CDATA[set commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21851#p21851"><![CDATA[
Actualy ReaLz you should read the manual about the arrays first then say something about them. The array are erased upon a .die not a .restart or even a .rehash. Anywway, I'll have a look on it, I have a hint where that buggy may be. <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=187">caesar</a> — Sun Jun 15, 2003 2:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ReaLz]]></name></author>
		<updated>2003-06-15T01:27:58-04:00</updated>

		<published>2003-06-15T01:27:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21843#p21843</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21843#p21843"/>
		<title type="html"><![CDATA[set commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21843#p21843"><![CDATA[
I'm not sure but I think that this happens because the .restart command makes the bot &lt;&lt;forget&gt;&gt; the arrays, to solve this problem you can use other ways to make it remember the players.<br>Like adding a flag to the users that play and when you execute the !players command will check all the users in its userlist and will return the ones with the given flag.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2044">ReaLz</a> — Sun Jun 15, 2003 1:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Storm]]></name></author>
		<updated>2003-06-14T23:00:50-04:00</updated>

		<published>2003-06-14T23:00:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21839#p21839</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21839#p21839"/>
		<title type="html"><![CDATA[set commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21839#p21839"><![CDATA[
it does not work properly. first part: setting works !set players players. When I do restart and then !players the bot responds Players: 0<br> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3065">Storm</a> — Sat Jun 14, 2003 11:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-06-14T18:53:56-04:00</updated>

		<published>2003-06-14T18:53:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21832#p21832</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21832#p21832"/>
		<title type="html"><![CDATA[set commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21832#p21832"><![CDATA[
This sems to be your lucky day! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><div class="codebox"><p>Code: </p><pre><code>set playersfile "players.txt"bind pub o "!set" pub:setbind pub o "@players" get:players if {![file exists $playersfile]} {close [open $playersfile w]} set file [open $playersfile r] while {![eof $file]} {  gets $file line   if {[string trim $line] == ""} { continue }   foreach chan [channels] {    if {![string match -nocase [strlwr $chan] [lindex $line 0]]} { continue }    array set players "[strlwr $chan] [lrange $line 1 end]"    putlog "[strlwr $chan] [lrange $line 1 end]"  } }close $fileproc pub:set {nick host handle chan arg} {  global players  switch -- [lindex $arg 0] {    "players" {      array set players "[strlwr $chan] [list [lrange $arg 1 end]]"      set file [open "$::playersfile" w]      foreach ch [channels] {        puts $file "$ch $players([strlwr $ch])"      }      catch {close $file}      putserv "PRIVMSG $chan :Added [llength [lrange $arg 1 end]] players: [lrange $arg 1 end]."    }  }}proc get:players {nick host handle channel arg} {   global players   if {![info exists players([strlwr $channel])]} {     array set players "[strlwr $channel] 0"   }   putserv "PRIVMSG $channel :Players: $players([strlwr $channel])"}</code></pre></div>Let me know if something is not working propertly..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sat Jun 14, 2003 6:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Storm]]></name></author>
		<updated>2003-06-14T18:36:17-04:00</updated>

		<published>2003-06-14T18:36:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21831#p21831</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21831#p21831"/>
		<title type="html"><![CDATA[set commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21831#p21831"><![CDATA[
Caesar could u plz help me?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3065">Storm</a> — Sat Jun 14, 2003 6:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Storm]]></name></author>
		<updated>2003-06-06T19:05:07-04:00</updated>

		<published>2003-06-06T19:05:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21386#p21386</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21386#p21386"/>
		<title type="html"><![CDATA[set commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21386#p21386"><![CDATA[
anyone knows how to do it?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3065">Storm</a> — Fri Jun 06, 2003 7:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Storm]]></name></author>
		<updated>2003-06-04T11:08:53-04:00</updated>

		<published>2003-06-04T11:08:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21234#p21234</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21234#p21234"/>
		<title type="html"><![CDATA[set commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21234#p21234"><![CDATA[
hey. Thanks, it works, but it does not save, so when I do rehash / restart, it removes. Can u pls edit it so it will auto save  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3065">Storm</a> — Wed Jun 04, 2003 11:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-06-03T01:39:35-04:00</updated>

		<published>2003-06-03T01:39:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21164#p21164</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21164#p21164"/>
		<title type="html"><![CDATA[set commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21164#p21164"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind pub o "!set" pub:setproc pub:set {nick host handle chan arg} {global players  switch -- [lindex $arg 0] {    "players" {      array set players "[strlwr $chan] [list [lrange $arg 1 end]]"      putserv "PRIVMSG $chan :added [llength [lrange $arg 1 end]] players: [lrange $arg 1 end]"    }  }}bind pub o "@players" pub:get:playersproc pub:get:players {nick host handle chan arg} {  global players  foreach channel [array names players] {    if {![string match [strlwr $chan] [strlwr $chan]]} {      array set players "[strlwr $chan] 0"    }  }  putserv "PRIVMSG $chan :$players([strlwr $chan])"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Jun 03, 2003 1:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Storm]]></name></author>
		<updated>2003-06-03T00:02:24-04:00</updated>

		<published>2003-06-03T00:02:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21153#p21153</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21153#p21153"/>
		<title type="html"><![CDATA[set commands]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21153#p21153"><![CDATA[
Hey!  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <br>Allright, I finally decided to make this topic. I was thinking to post this topic or not. For users who use GamesNet Server will be easy to understand me, but I hope everyone will understand <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile">.<br>There is a list of commands in @commands: players, server, rules, help...<br>I know this is possible to make this script, but I have no idea how. The script allows u to set each command for each channel through IRC, not by editing TCL script in text editor. So it will be like in #chan1: <span style="text-decoration:underline">!set players Players Names </span> and in #chan1 by using @players the bot will display <span style="text-decoration:underline">!set players Players Names</span> and in other channels commands can be different. I hope everyone understood my point. Just give me 1 example of how to do this please  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> .Thanks  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile">  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3065">Storm</a> — Tue Jun 03, 2003 12:02 am</p><hr />
]]></content>
	</entry>
	</feed>
