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

	<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>2010-05-22T19:16:36-04:00</updated>

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

		<entry>
		<author><name><![CDATA[doggo]]></name></author>
		<updated>2010-05-22T19:16:36-04:00</updated>

		<published>2010-05-22T19:16:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93154#p93154</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93154#p93154"/>
		<title type="html"><![CDATA[Peak Script Request (Not the one you think)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93154#p93154"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code># To enable peak tracking for a channel:#   .chanset #channel +peak# !record public command.setudef flag peakbind join - * join:peakproc join:peak {nick host hand chan} {if {(([lsearch -exact [channel info $chan] {+peak}] != -1) &amp;&amp; ([set curnum [llength [chanlist $chan -b]]] &gt; [set lastmax [lindex [set peak [getpeak $chan]] 0]]))} {puthelp "PRIVMSG $chan :New Record $curnum users !!  Last time i saw this many n00bs was [timeago [lindex $peak 1]] ago."setpeak $chan $curnum [clock seconds]}}proc getpeak {chan} { global peakif {[info exists peak([set chan [string tolower $chan]])]} {set peak($chan)} elseif {[file readable "peak.$chan.txt"]} {if {[gets [set fid [open "peak.$chan.txt" {RDONLY}]] peak($chan)] &lt; 9} { set peak($chan) [list 0 [clock seconds]] }close $fidset peak($chan)} else {set peak($chan) [list [llength [chanlist $chan -b]] [clock seconds]]}}proc setpeak {chan curnum unixtime} { global peakset chan [string tolower $chan]puts [set fid [open "peak.$chan.txt" {WRONLY CREAT}]] [set peak($chan) [list $curnum $unixtime]]close $fid}bind pub -|- !record pub:peakproc pub:peak {nick host hand chan arg} {if {[lsearch -exact [channel info $chan] {+peak}] != -1} {puthelp "PRIVMSG $chan :Current Record: [lindex [set peak [getpeak $chan]] 0] users, [timeago [lindex $peak 1]] ago."} elseif {[matchattr $hand n|n $chan]} { channel set $chan +peakputhelp "PRIVMSG $chan :Peak is now enabled for this channel.  To disable again, use: .chanset $chan -peak"savechannels}return 1}proc timeago {lasttime} {set totalyear [expr [clock seconds] - $lasttime]if {$totalyear &gt;= 31536000} {set yearsfull [expr $totalyear/31536000]set years [expr int($yearsfull)]set yearssub [expr 31536000*$years]set totalday [expr $totalyear - $yearssub]}if {$totalyear &lt; 31536000} {set totalday $totalyearset years 0}if {$totalday &gt;= 86400} {set daysfull [expr $totalday/86400]set days [expr int($daysfull)]set dayssub [expr 86400*$days]set totalhour 0}if {$totalday &lt; 86400} {set totalhour $totaldayset days 0}if {$totalhour &gt;= 3600} {set hoursfull [expr $totalhour/3600]set hours [expr int($hoursfull)]set hourssub [expr 3600*$hours]set totalmin [expr $totalhour - $hourssub]if {$totalhour &gt;= 14400} { set totalmin 0 }}if {$totalhour &lt; 3600} {set totalmin $totalhourset hours 0}if {$totalmin &gt; 60} {set minsfull [expr $totalmin/60]set mins [expr int($minsfull)]set minssub [expr 60*$mins]set secs 0}if {$totalmin &lt; 60} {set secs $totalminset mins 0}if {$years &lt; 1} {set yearstext ""} elseif {$years == 1} {set yearstext "$years year, "} {set yearstext "$years years, "}if {$days &lt; 1} {set daystext ""} elseif {$days == 1} {set daystext "$days day, "} {set daystext "$days days, "}if {$hours &lt; 1} {set hourstext ""} elseif {$hours == 1} {set hourstext "$hours hour, "} {set hourstext "$hours hours, "}if {$mins &lt; 1} {set minstext ""} elseif {$mins == 1} {set minstext "$mins minute"} {set minstext "$mins minutes"}if {$secs &lt; 1} {set secstext ""} elseif {$secs == 1} {set secstext "$secs second"} {set secstext "$secs seconds"}string trimright "$yearstext$daystext$hourstext$minstext$secstext" {, }}putlog "peak"</code></pre></div>im not the author but this work well and im sure you could mod it to watr you want....<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11046">doggo</a> — Sat May 22, 2010 7:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Football]]></name></author>
		<updated>2010-04-19T05:27:48-04:00</updated>

		<published>2010-04-19T05:27:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92872#p92872</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92872#p92872"/>
		<title type="html"><![CDATA[Peak Script Request (Not the one you think)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92872#p92872"><![CDATA[
Hey, I`m looking for a script where you can output to the eggdrop what channels you want it to monitor, from those channels it lists all the UNIQUE users (for example, if I`m on #a and on #b it will count me only once).<br><br>You will also input to the eggdrop what is the "home channel" for example, #EPL, and then it will calculate in percentage how many users are on #EPL compared to its target audience (the list of channels you inputed into the eggdrop that you want it to monitor)<br><br>I.E.<br><br>&lt;BOT&gt; #EPL reaches 34.1% (106/311) of its target audience.<br><br>Another feature added to the script would be that the eggdrop announces a new high percentage and when the previous one was reached<br><br>&lt;BOT&gt; A new high percentage was reached! 50% (101/202), Last peak reached was 34.1% (106/311) 5 days ago.<br><br>And of course a trigger to see the current high peak. <br><br>!Audience <br><br>&lt;Bot&gt; Current high peak is 50% (101/202) and was reached 25 seconds ago. (or when it comes to a few days, it will declare how many days ago)<br><br><br>Please help,<br><br>Thanks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10393">Football</a> — Mon Apr 19, 2010 5:27 am</p><hr />
]]></content>
	</entry>
	</feed>
