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

	<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>2013-03-13T01:12:57-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Get_A_Fix]]></name></author>
		<updated>2013-03-13T01:12:57-04:00</updated>

		<published>2013-03-13T01:12:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101225#p101225</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101225#p101225"/>
		<title type="html"><![CDATA[auto nick change]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101225#p101225"><![CDATA[
lulz pwnt<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6204">Get_A_Fix</a> — Wed Mar 13, 2013 1:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2013-03-12T13:25:12-04:00</updated>

		<published>2013-03-12T13:25:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101223#p101223</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101223#p101223"/>
		<title type="html"><![CDATA[auto nick change]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101223#p101223"><![CDATA[
<blockquote class="uncited"><div>why in the hell would you complicate the code that much and make a foreach to create bindings? just put a damn BIND CRON..<br><div class="codebox"><p>Code: </p><pre><code>bind cron - "*/15 * * * *" change:nick</code></pre></div></div></blockquote>Seriously?<br><br>You don't know why??! It's clearly obvious what I've done there. Let me simplify it into the simplest terms. The most elegant example of consumerism. To the rookie eye they see problems because they narrow their audience too often. I on the other hand, expand my audience. You see dirty, tcl8.5 includes cron. tcl8.4 does not. The issue is, to perfect a concept you need an audience. Execution of the concept into a product needs to be worthwhile. For it to be worthwhile you need as large an audience as possible. The product in this case, is that snippet of code above. The audience is everyone using eggdrop. Without cron used, it expands the audience of eggdrop users to its full potential (EVERYONE CAN USE IT NOW). Adding cron, I've now crippled the product. Flawed it's execution. I've limited the audience.. You get it?! No?!<br><br>I've simply made a business decision here. That's all. A smart one at that. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Tue Mar 12, 2013 1:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dirty]]></name></author>
		<updated>2013-03-12T05:29:39-04:00</updated>

		<published>2013-03-12T05:29:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101221#p101221</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101221#p101221"/>
		<title type="html"><![CDATA[auto nick change]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101221#p101221"><![CDATA[
why in the hell would you complicate the code that much and make a foreach to create bindings? just put a damn BIND CRON..<br><div class="codebox"><p>Code: </p><pre><code>bind cron - "*/15 * * * *" change:nick</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12189">dirty</a> — Tue Mar 12, 2013 5:29 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2013-03-12T14:04:32-04:00</updated>

		<published>2013-03-11T21:08:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101219#p101219</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101219#p101219"/>
		<title type="html"><![CDATA[auto nick change]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101219#p101219"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>bind time - "00 * * * *" change:nickset temp(nick) {"nick111""nick222"}proc change:nick {min hour day month year} {global tempset randnick [lindex $temp(nick) [rand [llength $temp(nick))]]]if {$randnick != ""} {if {[string match -nocase $::botnick $randnick]} {putserv "NICK [lindex $temp(nick) [rand [llength $temp(nick))]]]"} else {change:nick $min $hour $day $month $year}}}</code></pre></div></div></blockquote>Not to nit pick at all. But I can help you here, figure out the problem you had. The problem is, if the list is "nick111" and "nick222" how then can we ever get "". It should never be "". But in your code, it was. Hence you have to check it isn't that. This is because of how you constructed your code. Using <ul> <li>instead of hand-constructing your list will eliminate empty "" sets in your list. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>I've adapted your code and gave it the ability to cycle through nicknames as well as randomly choose one. Comments so hopefully its clear what everything is doing. Changed the global varname from (temp) which is rather generic to a more unique (_nicks) as well. Other changes should be identifiable without noting.<br><div class="codebox"><p>Code: </p><pre><code># put your time strings here when nicknames should be changed# as it is below, it will issue a nick change every 15 minutes.set _nicks(bindtime) [list 15* 30* 45* 00*]# cycle through our binds to timeforeach b $_nicks(bindtime) {  bind time - $b change:nick}# using list here will eliminate possibility of# having empty "" elelemts in the list.# this should be a list of nicknames.set  _nicks(nicks) [list "nick111" "nick222"]# cycle through the nicks or randomly choose# 1 = cycle , 2 = randomset _nicks(type) 1proc change:nick {min hour day month year} {global _nicks        # to init loop pick must equal botnick        set pick $::botnick        # as long as pick is botnick, loop        while {[isbotnick $pick]} {           # cycle nicks means we count           if {$_nicks(type) &lt; 2} {             # if counting var doesnt exist, init it             if {![info exists _nicks(count)]} { set _nicks(count) -1 }             # increment counter and check it isn't equal to length of list of nicks             # if  it is set counter to zero             if {[incr _nicks(count)] == [llength $_nicks(nicks)]} { set _nicks(count) 0 }             # choose our pick based on counter position             set pick [lindex $_nicks(nicks) $_nicks(count)]           } else {             # randomly pick based on length of list of nicks             set pick [lindex $_nicks(nicks) [rand [llength $_nicks(nicks)]]]           }        }        # change nick        putserv "NICK $pick"}</code></pre></div></li></ul><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Mon Mar 11, 2013 9:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Evilish]]></name></author>
		<updated>2013-03-03T07:19:43-04:00</updated>

		<published>2013-03-03T07:19:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101164#p101164</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101164#p101164"/>
		<title type="html"><![CDATA[auto nick change]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101164#p101164"><![CDATA[
thnx<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11660">Evilish</a> — Sun Mar 03, 2013 7:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Madalin]]></name></author>
		<updated>2013-02-27T18:10:00-04:00</updated>

		<published>2013-02-27T18:10:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101133#p101133</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101133#p101133"/>
		<title type="html"><![CDATA[auto nick change]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101133#p101133"><![CDATA[
Try this<br><div class="codebox"><p>Code: </p><pre><code>bind time - "00 * * * *" change:nickset temp(nick) {"nick111""nick222"}proc change:nick {min hour day month year} {global tempset randnick [lindex $temp(nick) [rand [llength $temp(nick))]]]if {$randnick != ""} {if {[string match -nocase $::botnick $randnick]} {putserv "NICK [lindex $temp(nick) [rand [llength $temp(nick))]]]"} else {change:nick $min $hour $day $month $year}}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6396">Madalin</a> — Wed Feb 27, 2013 6:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Evilish]]></name></author>
		<updated>2013-02-27T14:45:04-04:00</updated>

		<published>2013-02-27T14:45:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101129#p101129</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101129#p101129"/>
		<title type="html"><![CDATA[auto nick change]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101129#p101129"><![CDATA[
can someone make a script that will make the bot change his nick after X time ?<br>X may be in days<br>nicks r defined by me<br>thnx<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11660">Evilish</a> — Wed Feb 27, 2013 2:45 pm</p><hr />
]]></content>
	</entry>
	</feed>
