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

	<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>2006-06-15T04:04:08-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2006-06-15T03:47:12-04:00</updated>

		<published>2006-06-15T03:47:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64032#p64032</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64032#p64032"/>
		<title type="html"><![CDATA[How do i set a random nickname]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64032#p64032"><![CDATA[
<blockquote class="uncited"><div>It still did not work, but i tried it a little different.<br>Here is what i came up with and it works.<br><div class="codebox"><p>Code: </p><pre><code>bind pub - !random pub_randomproc pub_random {nick uhost hand chan t} { global botnick  if {$t == ""} {   set users [chanlist $chan]   set rembot [lsearch $users $botnick]   set mylist [lreplace $users $rembot $rembot]   set listlength [llength $users]   set myindex [rand $listlength]   set target [lindex $users $myindex]  if {[set total [llength $users]] &lt; 3} {   puthelp "NOTICE $nick :We are the only ones here $nick!"  return 0 }  set randomuser $nick   while {$randomuser != $nick &amp;&amp; ![isbotnick $randomuser]} {    set randomuser [lindex $users [rand $total]]   }  putserv "PRIVMSG $chan : Hi $nick, a random user is $target" }}</code></pre></div>Thanks for all the help ^^</div></blockquote>Excellent job. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> Witha little help and an effort on your part your problem was solved. <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=3646">Alchera</a> — Thu Jun 15, 2006 3:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[chaokusc]]></name></author>
		<updated>2006-06-15T00:59:43-04:00</updated>

		<published>2006-06-15T00:59:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64027#p64027</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64027#p64027"/>
		<title type="html"><![CDATA[How do i set a random nickname]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64027#p64027"><![CDATA[
It still did not work, but i tried it a little different.<br>Here is what i came up with and it works.<br><div class="codebox"><p>Code: </p><pre><code>bind pub - !random pub_randomproc pub_random {nick uhost hand chan t} { global botnick  if {$t == ""} {   set users [chanlist $chan]   set rembot [lsearch $users $botnick]   set mylist [lreplace $users $rembot $rembot]   set listlength [llength $users]   set myindex [rand $listlength]   set target [lindex $users $myindex]  if {[set total [llength $users]] &lt; 3} {   puthelp "NOTICE $nick :We are the only ones here $nick!"  return 0 }  set randomuser $nick   while {$randomuser != $nick &amp;&amp; ![isbotnick $randomuser]} {    set randomuser [lindex $users [rand $total]]   }  putserv "PRIVMSG $chan : Hi $nick, a random user is $target" }}</code></pre></div>Thanks for all the help ^^<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7689">chaokusc</a> — Thu Jun 15, 2006 12:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2006-06-14T19:56:50-04:00</updated>

		<published>2006-06-14T19:56:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64023#p64023</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64023#p64023"/>
		<title type="html"><![CDATA[How do i set a random nickname]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64023#p64023"><![CDATA[
<blockquote class="uncited"><div>So the full code would be this ?</div></blockquote>The code with Sir_Fz's changes. <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=3646">Alchera</a> — Wed Jun 14, 2006 7:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[chaokusc]]></name></author>
		<updated>2006-06-13T16:50:06-04:00</updated>

		<published>2006-06-13T16:50:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63990#p63990</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63990#p63990"/>
		<title type="html"><![CDATA[How do i set a random nickname]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63990#p63990"><![CDATA[
So the full code would be this ?<br><div class="codebox"><p>Code: </p><pre><code>bind pub - !random pub_randomproc pub_random {nick uhost hand chan t} { if {$t == ""} {  set users [chanlist $chan]   if {[set total [llength $users]] &lt; 3} {    puthelp "NOTICE $nick :We are the only ones here $nick!"   return 0  } set randomuser $nick  while {$randomuser != $nick &amp;&amp; ![isbotnick $randomuser]} {   set randomuser [lindex $users [rand $total]]  }  putserv "NOTICE $nick : Hi $nick, a random user is $randomuser" }}</code></pre></div>or<br><div class="codebox"><p>Code: </p><pre><code>bind pub - !random pub_randomproc pub_random {nick uhost hand chan t} { if {$t == ""} {  set users [chanlist $chan]   if {[set total [llength $users]] &lt; 3} {    puthelp "NOTICE $nick :We are the only ones here $nick!"   return 0  } set randomuser ""  while {$randomuser != $nick &amp;&amp; ![isbotnick $randomuser]} {   set randomuser [lindex $users [rand $total]]  }  putserv "NOTICE $nick : Hi $nick, a random user is $randomuser" }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7689">chaokusc</a> — Tue Jun 13, 2006 4:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-06-13T11:58:14-04:00</updated>

		<published>2006-06-13T11:58:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63987#p63987</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63987#p63987"/>
		<title type="html"><![CDATA[How do i set a random nickname]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63987#p63987"><![CDATA[
<blockquote class="uncited"><div>a random username from the current people on the channel?!<div class="codebox"><p>Code: </p><pre><code>set users [chanlist $chan]if {[set total [llength $users]] &lt; 3} {   puthelp "NOTICE $nick :We are the only ones here!"  return 0}set randomuser $nickwhile {$randomuser != $nick &amp;&amp; ![isbotnick $randomuser]} {   set randomuser [lindex $users [rand $total]]}</code></pre></div>The counter to 10 just makes sure to not loop infinite, if the user and the bot are the only one in the channel <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"></div></blockquote>you <strong class="text-strong">set randomuser $nick</strong> then check if $randomuser != $nick in the while condition, the code will never enter the loop then. You probably meant to <strong class="text-strong">set randomuser ""</strong> instead of $nick.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Tue Jun 13, 2006 11:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2006-06-15T04:04:08-04:00</updated>

		<published>2006-06-13T06:22:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63972#p63972</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63972#p63972"/>
		<title type="html"><![CDATA[How do i set a random nickname]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63972#p63972"><![CDATA[
a random username from the current people on the channel?!<div class="codebox"><p>Code: </p><pre><code>set users [chanlist $chan]if {[set total [llength $users]] &lt; 3} {   puthelp "NOTICE $nick :We are the only ones here!"  return 0}set randomuser $nickwhile {$randomuser == $nick || [isbotnick $randomuser]} {   set randomuser [lindex $users [rand $total]]}</code></pre></div>The check for &lt;3 just makes sure to not loop infinite, if the user and the bot are the only one in the channel <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=2382">De Kus</a> — Tue Jun 13, 2006 6:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[chaokusc]]></name></author>
		<updated>2006-06-13T05:50:10-04:00</updated>

		<published>2006-06-13T05:50:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63969#p63969</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63969#p63969"/>
		<title type="html"><![CDATA[How do i set a random nickname]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63969#p63969"><![CDATA[
When a user types <strong class="text-strong">!random</strong> it should post a random username in the string, except the bots name or the user who posted the command... but im unsure how to do it.<br>Any help is greatly appreciated.<br><div class="codebox"><p>Code: </p><pre><code>bind pub - !random pub_randomproc pub_random {nick uhost hand chan t} {if {$t == ""} {putserv "NOTICE $nick : Hi $nick, a random user is $randomuser" }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7689">chaokusc</a> — Tue Jun 13, 2006 5:50 am</p><hr />
]]></content>
	</entry>
	</feed>
