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

	<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>2023-04-24T08:32:28-04:00</updated>

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

		<entry>
		<author><name><![CDATA[vam2u]]></name></author>
		<updated>2023-04-24T08:32:28-04:00</updated>

		<published>2023-04-24T08:32:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111863#p111863</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111863#p111863"/>
		<title type="html"><![CDATA[Uptime contest]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111863#p111863"><![CDATA[
<blockquote class="uncited"><div>If the eggdrop doesn't say "Uptime contest is now running!" when you type !start, there is a trouble with the bind.<br>Don't you use a script which colorize your line ? or having set your irc client to use colors by default ?</div></blockquote>My bad, It's my flag setting <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":-)" title="Smile"><br>Btw, how do I add a !status to check for current alive and still in the contest users?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12907">vam2u</a> — Mon Apr 24, 2023 8:32 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2023-04-24T04:48:46-04:00</updated>

		<published>2023-04-24T04:48:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111860#p111860</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111860#p111860"/>
		<title type="html"><![CDATA[Uptime contest]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111860#p111860"><![CDATA[
If the eggdrop doesn't say "Uptime contest is now running!" when you type !start, there is a trouble with the bind.<br>Don't you use a script which colorize your line ? or having set your irc client to use colors by default ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Mon Apr 24, 2023 4:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[vam2u]]></name></author>
		<updated>2023-04-23T11:33:36-04:00</updated>

		<published>2023-04-23T11:33:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111856#p111856</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111856#p111856"/>
		<title type="html"><![CDATA[Uptime contest]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111856#p111856"><![CDATA[
<blockquote class="uncited"><div>Did you do !start ?</div></blockquote>Yes I did in the channel <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=12907">vam2u</a> — Sun Apr 23, 2023 11:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2023-04-23T11:08:01-04:00</updated>

		<published>2023-04-23T11:08:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111855#p111855</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111855#p111855"/>
		<title type="html"><![CDATA[Uptime contest]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111855#p111855"><![CDATA[
Did you do !start ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Sun Apr 23, 2023 11:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[vam2u]]></name></author>
		<updated>2023-04-23T10:14:15-04:00</updated>

		<published>2023-04-23T10:14:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111854#p111854</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111854#p111854"/>
		<title type="html"><![CDATA[Uptime contest]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111854#p111854"><![CDATA[
I need help, done below but I'm still not able to get the script started.<br><br>.chanset +upcontest #my_channel.<br>Successfully set modes { +upcontest  } on #my_channel.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12907">vam2u</a> — Sun Apr 23, 2023 10:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sauk]]></name></author>
		<updated>2022-10-08T15:13:54-04:00</updated>

		<published>2022-10-08T15:13:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111455#p111455</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111455#p111455"/>
		<title type="html"><![CDATA[Uptime contest]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111455#p111455"><![CDATA[
<blockquote class="uncited"><div>Quite complex to do as (I think) a netsplit runs two binds: the SIGN and the SPLT.<br>I can't provoc netsplits on my network, so I can't test which one called first.<br><br>And another difficulty: if someone leaves the channel during the netsplit, how can I manage ?<br><br>I'll make some tries but I can't promise I'll have a fix for the script.</div></blockquote>Maybe checking after split who still voiced.<br><br>Thank you for your time.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12877">sauk</a> — Sat Oct 08, 2022 3:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2022-10-08T09:30:32-04:00</updated>

		<published>2022-10-08T09:30:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111454#p111454</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111454#p111454"/>
		<title type="html"><![CDATA[Uptime contest]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111454#p111454"><![CDATA[
Quite complex to do as (I think) a netsplit runs two binds: the SIGN and the SPLT.<br>I can't provoc netsplits on my network, so I can't test which one called first.<br><br>And another difficulty: if someone leaves the channel during the netsplit, how can I manage ?<br><br>I'll make some tries but I can't promise I'll have a fix for the script.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Sat Oct 08, 2022 9:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sauk]]></name></author>
		<updated>2022-10-07T10:54:28-04:00</updated>

		<published>2022-10-07T10:54:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111451#p111451</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111451#p111451"/>
		<title type="html"><![CDATA[Uptime contest]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111451#p111451"><![CDATA[
Hey hello again, after some months of using script it works perfectly but has one "error" if we can call it like that.<br><br>Sometimes on NetSplits the bot eliminates netsplitted people when they dont deserve to get eliminated cause they didnt disconnect from server and they still voiced and with same uptime on server.<br><br>Can that "Error" be fixed somehow?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12877">sauk</a> — Fri Oct 07, 2022 10:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2022-05-22T07:09:44-04:00</updated>

		<published>2022-05-22T07:09:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111144#p111144</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111144#p111144"/>
		<title type="html"><![CDATA[Uptime contest]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111144#p111144"><![CDATA[
Ok, source corrected, I changed the way it works when developing and forget that.<br><br>To correct that without copy/paste the source, find the following line:<div class="codebox"><p>Code: </p><pre><code>unset ::uptime::tend</code></pre></div>Replace with:<div class="codebox"><p>Code: </p><pre><code>unset ::uptime::tstart</code></pre></div>I'll add your two new queries in the day, but it will be the last additions. The script is quite simple, you can now use it (or its parts) as example to add what you want in it.<br><br><strong class="text-strong">Edit :</strong> the last version is <a href="https://gitlab.com/tcl-scripts/games/uptime" class="postlink">on gitlab</a><br>Remind I won't accept new demands for this script.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Sun May 22, 2022 7:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sauk]]></name></author>
		<updated>2022-05-22T04:59:17-04:00</updated>

		<published>2022-05-22T04:59:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111143#p111143</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111143#p111143"/>
		<title type="html"><![CDATA[Uptime contest]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111143#p111143"><![CDATA[
I got this error when I try !stop.<br><blockquote class="uncited"><div>-10:58:22- (Uptime) [09:58:22] Tcl error [::uptime::stop]: can't unset "::uptime::tend": no such variable</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12877">sauk</a> — Sun May 22, 2022 4:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sauk]]></name></author>
		<updated>2022-05-22T04:54:01-04:00</updated>

		<published>2022-05-22T04:54:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111142#p111142</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111142#p111142"/>
		<title type="html"><![CDATA[Uptime contest]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111142#p111142"><![CDATA[
You have no idea how grateful I am for the help.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12877">sauk</a> — Sun May 22, 2022 4:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sauk]]></name></author>
		<updated>2022-05-22T04:53:05-04:00</updated>

		<published>2022-05-22T04:53:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111141#p111141</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111141#p111141"/>
		<title type="html"><![CDATA[Uptime contest]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111141#p111141"><![CDATA[
Very good job, we can upgrade..<br><br>Seting up a command !setprize and setting add the prize of the contest, example:<br><br>!setprize .com domain<br><br>Then the bot when we start the contest puts also the prize in topic. <br>Like:<br><blockquote class="uncited"><div>putserv "TOPIC $chan :New Uptime contest started at [clock format $::uptime::tstart -format $::uptime::tformat] - <strong class="text-strong">Prize: .com domain</strong>"</div></blockquote>Also will be great when contest finishes on the topic upgrade setup a counter with total finished contests.<br><br><blockquote class="uncited"><div>putserv "TOPIC $chan :Uptime contest finished ([clock format $::uptime::tstart -format $::uptime::tformat] - [clock format [clock seconds] -format $::uptime::tformat]) - Uptime winner is [lindex $::uptime::players($chan) 0] with [::uptime::duration $::uptime::tstart]" - <strong class="text-strong">Total contests: 30</strong></div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12877">sauk</a> — Sun May 22, 2022 4:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sauk]]></name></author>
		<updated>2022-05-21T20:02:45-04:00</updated>

		<published>2022-05-21T20:02:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111140#p111140</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111140#p111140"/>
		<title type="html"><![CDATA[Uptime contest]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111140#p111140"><![CDATA[
I will test soon, and reply after. Thank you<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12877">sauk</a> — Sat May 21, 2022 8:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2022-05-22T07:05:49-04:00</updated>

		<published>2022-05-21T10:12:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111139#p111139</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111139#p111139"/>
		<title type="html"><![CDATA[Uptime contest]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111139#p111139"><![CDATA[
New version :<div class="codebox"><p>Code: </p><pre><code>namespace eval uptime {variable triggerS "!start"variable triggerE "!stop"# list of excluded nickvariable excluded {$::botnick "Q" "ChanServ" "\[Bot1\]"}# Format of the date (see strftime documentation)variable tformat "%d/%m/%Y %H:%M:%S"# precision of the durationvariable precision 3variable playersbind pub -|- $::uptime::triggerS ::uptime::startbind pub -|n $::uptime::triggerE ::uptime::stopvariable tstartproc start {nick uhost handle chan text} {if {[info exists ::uptime::players($chan)] &amp;&amp; [llength ::uptime::players($chan)]&gt;0} { return }set ::uptime::players($chan) {}foreach u [chanlist $chan] {if {[isbotnick $u] || [lsearch -nocase $::uptime::excluded $u]&gt;-1} { continue }pushmode $chan +v $ulappend ::uptime::players($chan) $u}flushmode $chanset ::uptime::tstart [clock seconds]putserv "TOPIC $chan :New Uptime contest started at [clock format $::uptime::tstart -format $::uptime::tformat]"putserv "PRIVMSG $chan :Uptime contest is now running!"}proc stop {nick uhost handle chan text} {if {![info exists ::uptime::players($chan)] || [llength ::uptime::players($chan)]==0} { return }foreach u $::uptime::players($chan) {pushmode $chan -v $u}flushmode $chanunset ::uptime::players($chan)unset ::uptime::tstartputserv "PRIVMSG $chan :Uptime contest stopped by $nick"putserv "TOPIC $chan :Uptime contest stopped by $nick at [clock format [clock seconds] -format $::uptime::tformat]"}bind nick - * ::uptime::renuserproc renuser {nick uhost handle chan nnick} {if {![info exists ::uptime::players($chan)]} { return }set ind [lsearch $::uptime::players($chan) $nick]if { $ind &gt; -1} {set ::uptime::players($chan) [lreplace $::uptime::players($chan) $ind $ind $nnick]}}bind part - * ::uptime::partproc part {nick uhost handle chan text} {if {![info exists ::uptime::players($chan)]} { return }::uptime::lose $chan $nick}bind sign - * ::uptime::signproc sign {nick uhost handle chan text} {if {![info exists ::uptime::players($chan)]} { return }::uptime::lose $chan $nick}bind kick - * ::uptime::kickproc kick {nick uhost handle chan target reason} {if {![info exists ::uptime::players($chan)]} { return }::uptime::lose $chan $target}proc lose {chan nick} {if {![info exists ::uptime::players($chan)]} { return }set ind [lsearch $::uptime::players($chan) $nick]if {$ind &gt; -1} {putserv "PRIVMSG $chan :$nick is no more playing ! LoOose !"set ::uptime::players($chan) [lreplace $::uptime::players($chan) $ind $ind]}if {[llength $::uptime::players($chan)]==1} {putserv "PRIVMSG $chan :And the winner is... [lindex $::uptime::players($chan) 0]"putserv "TOPIC $chan :Uptime contest finished ([clock format $::uptime::tstart -format $::uptime::tformat] - [clock format [clock seconds] -format $::uptime::tformat]) - Uptime winner is [lindex $::uptime::players($chan) 0] with [::uptime::duration $::uptime::tstart]"unset ::uptime::players($chan)}}proc duration {start {end 0}} {set slang {year month day hour minute second}if {$end eq 0} {set end [clock seconds]}set out {}set years [expr {[clock format $end -format %Y]  - [clock format $start -format %Y]}]set delay [clock format [expr {$end - $start}] -format "%m-%d %H:%M:%S"]regexp {(\d+)-(\d+) 0?(\d+):0?(\d+):0?(\d+)} $delay -&gt; months days hours minutes secondsset tdata [list $years [incr months -1] [incr days -1] [incr hours -1] $minutes $seconds]set i 0foreach val $tdata {if {$val &gt; 0} {if {$val&gt;1} { set s "s" } else { set s "" }lappend out "$val [lindex $slang $i]$s"}incr i}if {$::uptime::precision &lt;= 2 || [llength $out]&lt;$::uptime::precision} {set tmpret [join [lrange $out 0 [expr {$::uptime::precision - 1}]] " and "]} else {set tmpret [join [lrange $out 0 [expr {$::uptime::precision - 2}]] ", "]set tmpret "$tmpret and [join [lindex $out [expr {$::uptime::precision - 1}]]]"}return $tmpret}putlog "Uptime Contest v220521 by CrazyCat &lt;https://forum.eggdrop.fr&gt; Loaded"}</code></pre></div><blockquote class="uncited"><div>16:06:56 &lt;CrazyCat&gt; !start<br>16:06:57 -- Raspdrop a changé le titre pour #test de "Uptime contest finished (21/05/2022 - 15:43:46 - 21/05/2022 - 16:02:40) - Uptime winner is CrazyCat in 18 minutes and 54 seconds" en "New Uptime contest started at 21/05/2022 16:06:56"<br>16:06:58 &lt;Raspdrop&gt; Uptime contest is now running!<br>16:07:19 &lt;-- CrazyCat a éjecté Myrddin (just a trys)<br>16:07:20 --&gt; Myrddin [Excalibur] (<a href="http://www.eggdrop.fr" class="postlink">http://www.eggdrop.fr</a>) (<a href="mailto:Myrddin@eggdrop.fr">Myrddin@eggdrop.fr</a>) a rejoint #test<br>16:07:20 &lt;Raspdrop&gt; Myrddin is no more playing ! LoOose !<br>16:07:53 -- Mode #test [+o Raspdrop] par CrazyCat<br>16:08:07 &lt;-- Z (4ed93d66@zeolia-D3E23F37) a quitté (Quit: Connection closed)<br>16:08:08 &lt;@Raspdrop&gt; Z is no more playing ! LoOose !<br>16:08:09 &lt;@Raspdrop&gt; And the winner is... CrazyCat<br>16:08:10 -- Raspdrop a changé le titre pour #test de "New Uptime contest started at 21/05/2022 16:06:56" en "Uptime contest finished (21/05/2022 16:06:56 - 21/05/2022 16:08:07) - Uptime winner is CrazyCat with 1 minute and 11 seconds"</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Sat May 21, 2022 10:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sauk]]></name></author>
		<updated>2022-05-20T19:07:15-04:00</updated>

		<published>2022-05-20T19:07:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111138#p111138</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111138#p111138"/>
		<title type="html"><![CDATA[Uptime contest]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111138#p111138"><![CDATA[
I already added n|n on the start command, so only bot owner can start.<br><br>Bot owner should be able to stop only.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12877">sauk</a> — Fri May 20, 2022 7:07 pm</p><hr />
]]></content>
	</entry>
	</feed>
