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

	<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-08-07T02:38:29-04:00</updated>

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

		<entry>
		<author><name><![CDATA[samhain]]></name></author>
		<updated>2008-07-31T17:50:59-04:00</updated>

		<published>2008-07-31T17:50:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84338#p84338</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84338#p84338"/>
		<title type="html"><![CDATA[Need someone to code this important script for me.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84338#p84338"><![CDATA[
Thanks so much I'll run it tomorrow when my freakin bot is up <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> I really appreciate it. speechless and dark <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=8567">samhain</a> — Thu Jul 31, 2008 5:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-08-07T02:36:57-04:00</updated>

		<published>2008-07-31T17:10:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84337#p84337</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84337#p84337"/>
		<title type="html"><![CDATA[Need someone to code this important script for me.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84337#p84337"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set modeD(channel) "#yourchan"# time in minutes to poll set modeD(timermin) "1" ;#minimum time wait until pollset modeD(timermax) "3" ;#maximum time wait until pollbind RAW - 355 modeD:receives:namesbind RAW - 352 modeD:receives:whoproc modeD:send:names { } {        global modeD        if {[validchan $modeD(channel)]} {                if {[regexp {D|d} [lindex [getchanmode $modeD(channel)] 0]]} {                        putquick "NAMES -d $modeD(channel)"                }        }        timer [expr $modeD(timermin)+[rand [expr $modeD(timermax)-$modeD(timermin)]]] [list modeD:send:names]}proc modeD:receives:names { from raw text } {        global modeD        set chan [lindex [split $text] 2]        set nicklist [lindex [split $text :] 1]        if {[string tolower $chan] == [string tolower $modeD(channel)] &amp;&amp; $nicklist != "" } {                foreach user [split $nicklist] {                        puthelp "WHO $user"                }        }}proc modeD:receives:who { from raw text } {        global modeD        set identd [lindex [split $text] 2]        set host [lindex [split $text] 3]        set nick [lindex [split $text] 5]        set chan $modeD(channel)        if {![matchban $nick!$identd@$host] &amp;&amp; ![matchban $nick!$identd@$host $chan]} {                if {[onchan X $chan]} {                        utimer [rand 8] [list puthelp "PRIVMSG X :voice $chan $nick"]                }        }        # hidden user appear in ".channel #chan" command and        # stays there even when they parts or disconnect.        resetchan $chan}timer [expr $modeD(timermin)+[rand [expr $modeD(timermax)-$modeD(timermin)]]] [list modeD:send:names]</code></pre></div>Every 1-3 minutes the script will poll the names list and act upon it. If instead you wanted seconds, use the script I posted which used utimer. It's events were based upon seconds.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Thu Jul 31, 2008 5:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[samhain]]></name></author>
		<updated>2008-07-31T17:06:35-04:00</updated>

		<published>2008-07-31T17:06:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84336#p84336</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84336#p84336"/>
		<title type="html"><![CDATA[Need someone to code this important script for me.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84336#p84336"><![CDATA[
Can you please modify it and give me the full code once again. I can modify those two things. but my english is not good and can't fully understand what you just said.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8567">samhain</a> — Thu Jul 31, 2008 5:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-07-31T17:06:47-04:00</updated>

		<published>2008-07-31T16:58:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84335#p84335</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84335#p84335"/>
		<title type="html"><![CDATA[Need someone to code this important script for me.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84335#p84335"><![CDATA[
<blockquote class="uncited"><div>what If I want to do it after every minute? I have to change utimer '10' to '60' ?</div></blockquote>Then use the time binding originally given. Or use a timer similar to how I've used the utimer. The best both can do is every minute. If you mean 45 seconds up to 90 seconds. Put the timermin at 45, and timermax at 90 and somewhere in that range the script will randomly pick each time to pull it's name list. Keep in mind the other script has no range, doesn't randomize it''s polling so eventually services may get disturbed a bot is doing this. Randomly polling gives the impression of human behavior.<br><br>To keep the randomness and use minutes:<div class="codebox"><p>Code: </p><pre><code>set modeD(channel) "#yourchan"set modeD(timermin) "10"'set modeD(timermax) "15" </code></pre></div>This is the only part you really need to tailor..Change all the timermin/timermax values to reflect minutes (they currently are set to values in seconds, remember) and change the word utimer into timer in 2 places.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Thu Jul 31, 2008 4:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[samhain]]></name></author>
		<updated>2008-07-31T16:56:55-04:00</updated>

		<published>2008-07-31T16:56:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84334#p84334</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84334#p84334"/>
		<title type="html"><![CDATA[Need someone to code this important script for me.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84334#p84334"><![CDATA[
what If I want to do it after every minute? I have to change utimer '10' to '60' ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8567">samhain</a> — Thu Jul 31, 2008 4:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-08-07T02:38:29-04:00</updated>

		<published>2008-07-31T16:40:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84333#p84333</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84333#p84333"/>
		<title type="html"><![CDATA[Need someone to code this important script for me.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84333#p84333"><![CDATA[
<blockquote class="uncited"><div>I wish I was a coder, so then I would have changed that to something more appropriate, and as I am not a coder, that's why I asked you to change it for me sir. to something appropriate.</div></blockquote><blockquote class="uncited"><div>    (37) TIME (stackable)<br>         bind time &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>         proc-name &lt;minute&gt; &lt;hour&gt; &lt;day&gt; &lt;month&gt; &lt;year&gt;<br><br>         Description: allows you to schedule procedure calls at certain<br>           times. mask matches 5 space separated integers of the form:<br>           "minute hour day month year". minute, hour, day, month have a<br>           zero padding so they are exactly two characters long; year is<br>           extended to four characters in the same way.<br>         Module: core</div></blockquote>In effect, the best this can ever do is bind to time every minute. Polling a /names -d #chan userlist, then checking every single name against a ban, if it isn't banned, if X is on the channel, X will voice it, basically identical to the behavior of using timer, as the best it can do is every minute as well.<br><br>If you want to go crazy, and it sounds like you do with "polling every 10-15 seconds", well... We can venture into the realm of insanity to prove a point:<div class="codebox"><p>Code: </p><pre><code>set modeD(channel) "#yourchan"set modeD(timermin) "10"'set modeD(timermax) "15"bind RAW - 355 modeD:receives:namesbind RAW - 352 modeD:receives:whoproc modeD:send:names { } {        global modeD        if {[validchan $modeD(channel)]} {                if {[regexp {D|d} [lindex [getchanmode $modeD(channel)] 0]]} {                        putquick "NAMES -d $modeD(channel)"                }        }        utimer [expr $modeD(timermin)+[rand [expr $modeD(timermax)-$modeD(timermin)]]] [list modeD:send:names]}proc modeD:receives:names { from raw text } {        global modeD        set chan [lindex [split $text] 2]        set nicklist [lindex [split $text :] 1]        if {[string tolower $chan] == [string tolower $modeD(channel)] &amp;&amp; $nicklist != "" } {                foreach user [split $nicklist] {                        puthelp "WHO $user"                }        }}proc modeD:receives:who { from raw text } {        global modeD        set identd [lindex [split $text] 2]        set host [lindex [split $text] 3]        set nick [lindex [split $text] 5]        set chan $modeD(channel)        if {![matchban $nick!$identd@$host] &amp;&amp; ![matchban $nick!$identd@$host $chan]} {                utimer [rand 8] [list puthelp "PRIVMSG X :voice $chan $nick"]        }        # hidden user appear in ".channel #chan" command and        # stays there even when they parts or disconnect.        resetchan $chan}utimer [expr $modeD(timermin)+[rand [expr $modeD(timermax)-$modeD(timermin)]]] [list modeD:send:names]</code></pre></div>This is basically a utimer event occuring at least every 10 seconds (modeD(timermin)). The script will randomly select a time between the timermin and timermax you set which will poll for a names -d #chan list (services might not tolerate this repeated polling.. who knows and is why we randomly time it so it doesn't appear so scripted..heh). It will then interpret that list, and if the nick isn't banned and X is on the channel will voice that user who was previously -d.  This is even more a resource hog than binding to time, but it fits your request. Play with the timermin/timermax until you find a comfortable range.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Thu Jul 31, 2008 4:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[samhain]]></name></author>
		<updated>2008-07-31T16:17:30-04:00</updated>

		<published>2008-07-31T16:17:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84332#p84332</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84332#p84332"/>
		<title type="html"><![CDATA[Need someone to code this important script for me.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84332#p84332"><![CDATA[
I wish I was a coder, so then I would have changed that to something more appropriate, and as I am not a coder, that's why I asked you to change it for me sir. to something appropriate.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8567">samhain</a> — Thu Jul 31, 2008 4:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-07-31T16:03:46-04:00</updated>

		<published>2008-07-31T16:03:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84331#p84331</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84331#p84331"/>
		<title type="html"><![CDATA[Need someone to code this important script for me.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84331#p84331"><![CDATA[
<blockquote class="uncited"><div>I want it to voice everyone hidden on the channel? will it do the same?</div></blockquote>The code he posted using $text and not $args should. But you might want to change this part.<div class="codebox"><p>Code: </p><pre><code>bind TIME - "* * * * *" modeD:send:names </code></pre></div>The above will be a resource hog biding time to all wildcards.... You may want to use something more sane.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Thu Jul 31, 2008 4:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[samhain]]></name></author>
		<updated>2008-07-31T15:56:54-04:00</updated>

		<published>2008-07-31T15:56:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84330#p84330</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84330#p84330"/>
		<title type="html"><![CDATA[Need someone to code this important script for me.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84330#p84330"><![CDATA[
I want it to voice everyone hidden on the channel? will it do the same?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8567">samhain</a> — Thu Jul 31, 2008 3:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-07-31T15:33:25-04:00</updated>

		<published>2008-07-31T15:33:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84329#p84329</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84329#p84329"/>
		<title type="html"><![CDATA[Need someone to code this important script for me.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84329#p84329"><![CDATA[
<blockquote class="uncited"><div>With args, the list end with "}" but not with text. Thanks nml375. I have learned something today</div></blockquote>Args invokes the interpreter to 'swallow' all the arguments passed to it into a list. This involves encapsulating it all within curly braces {}, using double-quotes "" around the parameter if it contains spaces and escaping any potential tcl special characters. It creates a list by doing as I just explained so that you can have a variable number of arguments invoke your procedure. Your use of [split $args] suggested to me that you misunderstood this. $args is already a list, and splitting it in effect destroys this list and creates a 2nd list. The 2nd list will escape the present curly braces from the first list, and use these in the new list [split] creates (hence you seeing those { and } in odd places). It will also potentially escape escapes and destroy several other things. That is why it is best to avoid using $args ever unless you fully understand the consequences.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Thu Jul 31, 2008 3:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DarkRaptor]]></name></author>
		<updated>2008-07-31T15:08:25-04:00</updated>

		<published>2008-07-31T15:08:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84328#p84328</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84328#p84328"/>
		<title type="html"><![CDATA[Need someone to code this important script for me.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84328#p84328"><![CDATA[
i hope this work<br><div class="codebox"><p>Code: </p><pre><code>set modeD(channel) "#yourchan"bind TIME - "* * * * *" modeD:send:namesbind RAW - 355 modeD:receives:namesbind RAW - 352 modeD:receives:whoproc modeD:send:names { minutes hours days months years } {        global modeD sl_flooded        if {[validchan $modeD(channel)]} {                if {[regexp {D|d} [lindex [getchanmode $modeD(channel)] 0]] &amp;&amp;                    $sl_flooded([string tolower $modeD(channel)]) != "1" } {                        putquick "NAMES -d $modeD(channel)"                }        }}proc modeD:receives:names { from raw text } {        global modeD        set chan [lindex [split $text] 2]        set nicklist [lindex [split $text :] 1]        if {[string tolower $chan] == [string tolower $modeD(channel)] &amp;&amp; $nicklist != "" } {                foreach user [split $nicklist] {                        puthelp "WHO $user"                }        }}proc modeD:receives:who { from raw text } {        global modeD        set identd [lindex [split $text] 2]        set host [lindex [split $text] 3]        set nick [lindex [split $text] 5]        set chan $modeD(channel)        if {![matchban $nick!$identd@$host] &amp;&amp; ![matchban $nick!$identd@$host $chan]} {                if {[onchan X $chan]} {                        utimer [rand 8] [list puthelp "PRIVMSG X :voice $chan $nick"]                }        }        resetchan $chan}</code></pre></div>With args, the list end with "}" but not with text. Thanks nml375. I have learned something today<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7635">DarkRaptor</a> — Thu Jul 31, 2008 3:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2008-07-31T14:26:49-04:00</updated>

		<published>2008-07-31T14:26:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84327#p84327</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84327#p84327"/>
		<title type="html"><![CDATA[Need someone to code this important script for me.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84327#p84327"><![CDATA[
What speechles is pointing out, is that "args" is a special argument-name. It allows a proc to accept 0 or more parameters; each parameter will be added as a list item to args. When using bindings with eggdrop, it is advised to avoid using "args", as bindings always will call the proc with a fixed number of arguments (specified by the binding).<br><br>Simple fix would be to rename args into something different (such as "arg" or "text") throughout the script.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Thu Jul 31, 2008 2:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DarkRaptor]]></name></author>
		<updated>2008-07-31T14:20:50-04:00</updated>

		<published>2008-07-31T14:20:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84326#p84326</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84326#p84326"/>
		<title type="html"><![CDATA[Need someone to code this important script for me.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84326#p84326"><![CDATA[
work only if nickname is like {nick} [nick]. I have forget to verify with nickname like [nick} {nick[...<br><br><br><br>@speechles: I'm not TCL expert. If you think you can correct this, show us how. I'm just asking to learn.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7635">DarkRaptor</a> — Thu Jul 31, 2008 2:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[samhain]]></name></author>
		<updated>2008-07-31T13:49:26-04:00</updated>

		<published>2008-07-31T13:49:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84321#p84321</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84321#p84321"/>
		<title type="html"><![CDATA[Need someone to code this important script for me.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84321#p84321"><![CDATA[
# hidden user appear in ".channel #chan" command and<br>        # stays there even when they parts or disconnect. <br>what does this mean? and speechless can you please work at it and fix it for me. i really need it badly, regards.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8567">samhain</a> — Thu Jul 31, 2008 1:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-07-31T13:33:21-04:00</updated>

		<published>2008-07-31T13:33:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84319#p84319</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84319#p84319"/>
		<title type="html"><![CDATA[Need someone to code this important script for me.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84319#p84319"><![CDATA[
How come you use 'args' and then you [split] it??!  Args will already be a list, this script is flawed majorly.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Thu Jul 31, 2008 1:33 pm</p><hr />
]]></content>
	</entry>
	</feed>
