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

	<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>2005-03-18T20:51:22-04:00</updated>

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

		<entry>
		<author><name><![CDATA[FuE-]]></name></author>
		<updated>2005-03-18T20:51:22-04:00</updated>

		<published>2005-03-18T20:51:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47898#p47898</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47898#p47898"/>
		<title type="html"><![CDATA[Uptime Contest]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47898#p47898"><![CDATA[
i voice users but it just say<br><div class="codebox"><p>Code: </p><pre><code>(01:49:19) (@FuE-) !start(01:49:19)     —› topic: (_aLexi) changes topic to (New compo started on 19 Mar 01:49:19 with 0 voiced clients.)</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5711">FuE-</a> — Fri Mar 18, 2005 8:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-03-13T13:09:06-04:00</updated>

		<published>2005-03-13T13:09:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47535#p47535</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47535#p47535"/>
		<title type="html"><![CDATA[Uptime Contest]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47535#p47535"><![CDATA[
You can check it outside the loop.<br><br>if {![botisop $gamechan]} { return 0 }<br><br>I just put it in the loop, so bot check's its op everytime it adds a voice to the pushmode queue. Suppose if it is unfortunately, deoped when it is running the loop then it will be unable to voice that person and people onwards from that. <br><br>Anyway we generally don't need to check for ops also, the bot doesn't generate an error even if you ask it todo something and it doesn't have op's. The source code is pretty neat and handles stuff like this. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>But that was an extra precaution you can just check ops once, before the foreach loop, and go ahead and voice all the people then after that.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sun Mar 13, 2005 1:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2005-03-12T17:35:58-04:00</updated>

		<published>2005-03-12T17:35:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47510#p47510</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47510#p47510"/>
		<title type="html"><![CDATA[Uptime Contest]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47510#p47510"><![CDATA[
awyeah : No need for '[botisop $gamechan]' inside the loop, and I think you meant 'or' (||) not 'and' (&amp;&amp;).<br><br>Tips: Use something like if {$foo} { when $foo will always be a number bigger than/or 1 and if {!$foo} { when $foo will be 0, example:<div class="codebox"><p>Code: </p><pre><code>if {$foo} {# something} else {# something else }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sat Mar 12, 2005 5:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-03-12T11:00:44-04:00</updated>

		<published>2005-03-12T11:00:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47483#p47483</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47483#p47483"/>
		<title type="html"><![CDATA[Uptime Contest]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47483#p47483"><![CDATA[
I modified the above code for the topic also. It was just 2 lines of code.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sat Mar 12, 2005 11:00 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[FuE-]]></name></author>
		<updated>2005-03-12T10:54:25-04:00</updated>

		<published>2005-03-12T10:54:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47482#p47482</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47482#p47482"/>
		<title type="html"><![CDATA[Uptime Contest]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47482#p47482"><![CDATA[
i don't want to br roud or so, i really like that you help us... when i have start the game, the bot voice all users in the chan?<br>and then i would like to have that the bot set the topic<br><div class="codebox"><p>Code: </p><pre><code>New compo started at 01-03-2005 22:00 CEST with 231 voiced clients </code></pre></div>like that <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=5711">FuE-</a> — Sat Mar 12, 2005 10:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-03-12T11:03:34-04:00</updated>

		<published>2005-03-12T10:49:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47481#p47481</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47481#p47481"/>
		<title type="html"><![CDATA[Uptime Contest]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47481#p47481"><![CDATA[
The first idea of caesar. Here is a rough piece of code, might need tweaking as I wrote it in 5 mins, but very basic.<br><div class="codebox"><p>Code: </p><pre><code>#Set the channel for this script to work onset gamechan "#channel"#Set the time 'in seconds' after how long to check for voiced users.set gametimer "1"bind pub n "!start" start:gameproc start:game {nick uhost hand chan text} { global botnick gamechan  set voices 0  foreach user [chanlist $gamechan] {   if {![isop $user $gamechan] &amp;&amp; ![isvoice $user $gamechan] &amp;&amp; ![isbotnick $user] &amp;&amp; [botisop $gamechan]} {    pushmode $gamechan +v $user    incr voices    }  } flushmode $gamechan set time [unixtime]; set timenow [ctime $time] putserv "TOPIC $gamechan :New compo started on [string trim [lindex $timenow 2]] [string trim [lindex $timenow 1]] [string trim [lindex $timenow 3]] with $voices voiced clients."}utimer $gametimer check:voicesproc check:voices { } { global gamechan  set voices 0  set winner "none"   foreach user [chanlist $gamechan] {    if {[isvoice $user $gamechan] &amp;&amp; ![isbotnick $user]} {     inc voices    }   }   if {$voices == 1} {    foreach user [chanlist $gamechan] {     if {[isvoice $user $gamechan] &amp;&amp; ![isbotnick $user]} {     set winner $user     break    }   }   putserv "privmsg $gamechan :$winner is the winner!!"   return 0  }  if {$voices == 0} {   putserv "privmsg $gamechan :ERROR: No voiced user left!"   putserv "privmsg $gamechan :Game stopped."   return 0  } utimer $gametimer check:voices}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sat Mar 12, 2005 10:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2005-03-12T09:15:39-04:00</updated>

		<published>2005-03-12T09:15:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47467#p47467</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47467#p47467"/>
		<title type="html"><![CDATA[Uptime Contest]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47467#p47467"><![CDATA[
All the players that want to join the game get voiced and the contest ends when there is only one with voice in the channel? That's simple, and I can think of two ways to do it: just voice them all then:<br><br>1. (easy way but not so acurate, depends on the timer) via a timed foreach loop you get the number of voiced users and when this is equal with 1 then game over, or..<br><br>2. (hard way, more acurate than the first one but the bot should be on irc 24/7 to corectly keep the game running) make a list where you add the voiced users and remove them one by one upon devoice (if this allowed)/quit/part/kick untill in the list will remain only one user. <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> — Sat Mar 12, 2005 9:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[FuE-]]></name></author>
		<updated>2005-03-12T06:12:46-04:00</updated>

		<published>2005-03-12T06:12:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47460#p47460</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47460#p47460"/>
		<title type="html"><![CDATA[Uptime Contest]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47460#p47460"><![CDATA[
hello, i saw yesterday that a dude in qnet had a uptimed-contest...<br><div class="codebox"><p>Code: </p><pre><code> - New compo started 01-03-2005 @ 22:56 CET with 76 users)</code></pre></div>and the contest is all the 76 users get voice, and the last player who have voice in the chan wins... do you know if the script is on the web somewhere?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5711">FuE-</a> — Sat Mar 12, 2005 6:12 am</p><hr />
]]></content>
	</entry>
	</feed>
