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

	<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>2002-07-17T04:54:36-04:00</updated>

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

		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-07-17T04:54:36-04:00</updated>

		<published>2002-07-17T04:54:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=8927#p8927</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=8927#p8927"/>
		<title type="html"><![CDATA[Internal userlist and .rehash]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=8927#p8927"><![CDATA[
Regardless, this should be tested, and fixed.<br><br>Finding issues, and just using a plain workaround will not do this.<br><br>By all means, use a workaround, but also notify people there is an issue.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Wed Jul 17, 2002 4:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-07-16T13:13:56-04:00</updated>

		<published>2002-07-16T13:13:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=8910#p8910</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=8910#p8910"/>
		<title type="html"><![CDATA[Internal userlist and .rehash]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=8910#p8910"><![CDATA[
Cool... well know I know how to work round it, I'll put up with it and try CVS and stuff when I get the chance <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by Guest — Tue Jul 16, 2002 1:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-07-16T09:45:04-04:00</updated>

		<published>2002-07-16T09:45:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=8909#p8909</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=8909#p8909"/>
		<title type="html"><![CDATA[Internal userlist and .rehash]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=8909#p8909"><![CDATA[
Well - It all sugests you are right.<br><br>There are 2 things you can do now.<br><br>1: Make sure your using the latest stable release, and then submit a bug report to the bugs address <a href="mailto:bugs@eggheads.org">bugs@eggheads.org</a><br><br>2: Download, and try the CVS version, to see if this has been fixed.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Tue Jul 16, 2002 9:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-07-16T09:23:07-04:00</updated>

		<published>2002-07-16T09:23:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=8908#p8908</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=8908#p8908"/>
		<title type="html"><![CDATA[Internal userlist and .rehash]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=8908#p8908"><![CDATA[
Here's the code that does it:<br><div class="codebox"><p>Code: </p><pre><code>proc bMotionChooseRandomBot { channel } {  putloglev 1 * "bMotion: checking $channel"  global botnick  set bots [chanlist $channel]  set botslist [list]  foreach bot $bots {    set handle [nick2hand $bot $channel]    putloglev 1 * "bMotion: checking $bot ($handle)"    if [matchattr [nick2hand $bot $channel] b&amp;K $channel] {      lappend botslist $bot    }  }  set bots $botslist  putloglev 1 * "bMotion: found [llength $bots] bots in $channel, $bots"  if {[llength $bots] == 0} {    return ""  }  set rbot $botnick  while {$rbot == $botnick} {    set rbot [lindex $bots [rand [llength $bots]]]  }  return $rbot}</code></pre></div>Before anyone has a go at me for messy code or anything, it was a lot cleaner before I started throwing debug stuff in <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>Indeed, it was just pretty much [chanlist $channel b&amp;K] when I started <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>The output from this immediately after a .rehash is:<br><div class="codebox"><p>Code: </p><pre><code>[14:11] bMotion: checking #___[14:11] bMotion: checking NoTopic (*)[14:11] bMotion: checking JamesOff (JamesOff)[14:11] bMotion: checking MonicaOff (*)[14:11] bMotion: checking KipAway (*)[14:11] bMotion: found 0 bots in #___,</code></pre></div>If I do a .channel and run the code again:<div class="codebox"><p>Code: </p><pre><code>[14:12] bMotion: checking #___[14:12] bMotion: checking NoTopic (NoTopic)[14:12] bMotion: checking JamesOff (JamesOff)[14:12] bMotion: checking MonicaOff (MonicaOff)[14:12] bMotion: checking KipAway (TurboKip)[14:12] bMotion: found 1 bots in #___, MonicaOff</code></pre></div>(Which is right, Monica's the bot I wanted it to find.)<br><br>Since this definitely seems to be the cause of the problem, I'll switch it all back to [chanlist $channel b|K] I think.<br><br>My investigations did include a putlog [chanlist $channel] and far too many .tcl putlog's from the bot, like this:<br><div class="codebox"><p>Code: </p><pre><code>.rehash&lt;snip&gt;.tcl putlog [chanlist #___][14:16] NoTopic JamesOff MonicaOff KipAway.tcl putlog [chanlist #___b]&lt;nothing&gt;.channel #___&lt;snip&gt;.tcl putlog [chanlist #___ b][14:18] NoTopic MonicaOff</code></pre></div>The problem is DEFINITELY .rehash screwing up the internal list chanlist uses <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by Guest — Tue Jul 16, 2002 9:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-07-16T08:58:23-04:00</updated>

		<published>2002-07-16T08:58:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=8907#p8907</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=8907#p8907"/>
		<title type="html"><![CDATA[Internal userlist and .rehash]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=8907#p8907"><![CDATA[
This will not cause matchattr to break, as it is unrelated to the channels userlist.<br><br>Matchattr is used to see if a handle matches certain flags (not channal modes like +o or +v).<br><br>The only reason matchattr would not work, is if chanlist is feeding the wrong information to it.<br><br>As such, it would be wise to post at least the non-functioning part of the script, to see if there are nay issues.<br><br>You should make sure you post includes where a variable is set.<br><br>EG<br>chanlist $chan<br><br>Show where the variable $chan is set.<br><br>What sort of debugging lines have you used?<br>Have you tried using "putlog [chanlist]" to check the output is there?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Tue Jul 16, 2002 8:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-07-16T08:38:42-04:00</updated>

		<published>2002-07-16T08:38:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=8906#p8906</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=8906#p8906"/>
		<title type="html"><![CDATA[Internal userlist and .rehash]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=8906#p8906"><![CDATA[
Hi folks <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>I've been trying to get chanlist and matchattr working for like the last hour, and I think I've cracked why they were behaving erratically... .rehash seems to clear eggdrop's internal userlist, breaking chanlist and matchattr so the only users they can match is anyone who talks (so that the bot can get their hostmask etc).<br><br>I've fixed it during debugging by doing a .channel for the channel i'm working in after I do a .rehash, but is there any way of programatically making the bot update? Can I push a WHO :#channel at the server from my script and eggdrop'll catch the reply?<br><br>Thanks in advance for any help <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by Guest — Tue Jul 16, 2002 8:38 am</p><hr />
]]></content>
	</entry>
	</feed>
