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

	<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>2008-05-08T08:28:45-04:00</updated>

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

		<entry>
		<author><name><![CDATA[starpossen]]></name></author>
		<updated>2008-05-08T08:28:45-04:00</updated>

		<published>2008-05-08T08:28:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82811#p82811</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82811#p82811"/>
		<title type="html"><![CDATA[Peak in choosen channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82811#p82811"><![CDATA[
Ofcourse i'll keep the script unchanged which you posted so credits are where they should be, and also it works very nicely, thanks for all your help, and especially the very quick reply's.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7219">starpossen</a> — Thu May 08, 2008 8:28 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-05-08T00:30:58-04:00</updated>

		<published>2008-05-08T00:30:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82807#p82807</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82807#p82807"/>
		<title type="html"><![CDATA[Peak in choosen channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82807#p82807"><![CDATA[
To add it, copy the steps below. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"> <div class="codebox"><p>Code: </p><pre><code># code provided by user via egghelp forums# url @ http://forum.egghelp.org/viewtopic.php?t=9009&amp;start=3proc throttled {id seconds} {   global throttle   if {[info exists throttle($id)]&amp;&amp;$throttle($id)&gt;[clock sec]} {      set id 1   } {      set throttle($id) [expr {[clock sec]+$seconds}]      set id 0   }}# delete expired entries every 10 minutesbind time - ?0* throttledCleanupproc throttledCleanup args {   global throttle   set now [clock sec]   foreach {id time} [array get throttle] {      if {$time&lt;=$now} {unset throttle($id)}   }} </code></pre></div>Add the above to bottom of the script (in it's entirety without changing anything, user deserves credit). Then make the change below, that's it.<div class="codebox"><p>Code: </p><pre><code>#changeif {![lsearch -exact [split $::peakchanlist] $channel]} {return}#intoif {[throttled $hostname,$channel 30] || ![lsearch -exact [split $::peakchanlist] $channel]} {return}</code></pre></div>This allows one trigger per "!ident@hostname,#channel" every 30 seconds. If instead you think once public in channel is enough, use the code below.<div class="codebox"><p>Code: </p><pre><code>#intoif {[throttled $channel 30] || ![lsearch -exact [split $::peakchanlist] $channel]} {return}</code></pre></div>Once every 30 seconds per channel, regardless of who why or what triggered it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Thu May 08, 2008 12:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[starpossen]]></name></author>
		<updated>2008-05-07T23:54:46-04:00</updated>

		<published>2008-05-07T23:54:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82805#p82805</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82805#p82805"/>
		<title type="html"><![CDATA[Peak in choosen channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82805#p82805"><![CDATA[
Somewhat a flood-control, let's say users can't use the peak command twice in a row, a 30 second denial of usage, to prevent spam/flood, could be very usefull, in case of flagged users getting a bit to hyper with the command.<br><br>And yes I know I can restrict the command so only I can use it, but still, a flood-control kinda thing would be great.<br><br>*EDIT* maybe i'm to tired, but it looks like I kinda repeated what you wrote, except my text looks confusing.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7219">starpossen</a> — Wed May 07, 2008 11:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-05-07T23:47:49-04:00</updated>

		<published>2008-05-07T23:47:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82804#p82804</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82804#p82804"/>
		<title type="html"><![CDATA[Peak in choosen channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82804#p82804"><![CDATA[
<blockquote class="uncited"><div>Number 2 is absolutly what I wanted, thanks alot for the help, and the quick replys.<br><br>So I guess there's nothing more to add to this script, or do you have any additions or ideas?</div></blockquote>A throttle mechanism to keep clueless users from repeating the command several thousand times (+f/o users can be clueless and yes i noticed you restricted binding to just those flags <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink">)<br><a href="http://forum.egghelp.org/viewtopic.php?t=9009&amp;start=3" class="postlink">User has written a great one</a> that could easily be incorporated.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Wed May 07, 2008 11:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[starpossen]]></name></author>
		<updated>2008-05-07T23:07:35-04:00</updated>

		<published>2008-05-07T23:07:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82803#p82803</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82803#p82803"/>
		<title type="html"><![CDATA[Peak in choosen channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82803#p82803"><![CDATA[
Number 2 is absolutly what I wanted, thanks alot for the help, and the quick replys.<br><br>So I guess there's nothing more to add to this script, or do you have any additions or ideas?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7219">starpossen</a> — Wed May 07, 2008 11:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-05-07T21:36:45-04:00</updated>

		<published>2008-05-07T21:36:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82802#p82802</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82802#p82802"/>
		<title type="html"><![CDATA[Peak in choosen channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82802#p82802"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>#changeputhelp "PRIVMSG $channel :Peak for $channel: [lindex $peakdata 3] (by [lindex $peakdata 0]![lindex $peakdata 1] at [clock format [lindex $peakdata 2] -format {%d/%m/%y %H:%M:%S}])" #into either#1) gives 'nick at date' as reply.puthelp "PRIVMSG $channel :Peak for $channel: [lindex $peakdata 3] (by [lindex $peakdata 0] at [clock format [lindex $peakdata 2] -format {%d/%m/%y %H:%M:%S}])"#or#2) gives 'nick duration ago' as reply, this is a better replacement.puthelp "PRIVMSG $channel :Peak for $channel: [lindex $peakdata 3] (by [lindex $peakdata 0] [duration [expr [unixtime] - [lindex $peakdata 2]]] ago)"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Wed May 07, 2008 9:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[starpossen]]></name></author>
		<updated>2008-05-07T21:32:35-04:00</updated>

		<published>2008-05-07T21:32:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82801#p82801</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82801#p82801"/>
		<title type="html"><![CDATA[Peak in choosen channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82801#p82801"><![CDATA[
I tried that and it seemed to work, so thank you<br>one thing that bothers me, is the output:<br><div class="codebox"><p>Code: </p><pre><code>&lt;bot&gt; Peak for #channel: 30 (by nick !host@hots.host at 08/05/08 02:48:57)</code></pre></div>I don't like the idea of it showing the host, I just want nick and date/time, I tried removing the host part in the script, but once again realized that i'm no pro scripter, so the bot crashed, any idea of which line to edit/remove to make it only show nick and date/time?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7219">starpossen</a> — Wed May 07, 2008 9:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-05-07T21:12:51-04:00</updated>

		<published>2008-05-07T21:12:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82800#p82800</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82800#p82800"/>
		<title type="html"><![CDATA[Peak in choosen channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82800#p82800"><![CDATA[
It kinda already does that, using .chanset. If you meant a static channel list, you can use the changes below.<div class="codebox"><p>Code: </p><pre><code>#changesetudef flag peak #intovariable peakchanlist "#chan1 #chan2 #etc" ;#space delimited#changeif {![channel get $channel peak]} {return}#intoif {![lsearch -exact [split $::peakchanlist] $channel]} {return}#change if {![channel get $channel peak]} {#intoif {[lsearch -exact [split $::peakchanlist] $channel]} {</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Wed May 07, 2008 9:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[starpossen]]></name></author>
		<updated>2008-05-07T20:45:26-04:00</updated>

		<published>2008-05-07T20:45:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82799#p82799</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82799#p82799"/>
		<title type="html"><![CDATA[Peak in choosen channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82799#p82799"><![CDATA[
I found this script on an old backup cd:<div class="codebox"><p>Code: </p><pre><code>bind PUB fo|fo -peak pub:peakbind JOIN -|- *  join:peaksetudef str peak-datasetudef flag peakproc pub:peak {nickname hostname handle channel arguments} {  if {![channel get $channel peak]} {return}  if {[set peakdata [channel get $channel peak-data]] == ""} {    puthelp "PRIVMSG $channel :No peak data available yet (try rejoining)."  } else {    puthelp "PRIVMSG $channel :Peak for $channel: [lindex $peakdata 3] (by [lindex $peakdata 0]![lindex $peakdata 1] at [clock format [lindex $peakdata 2] -format {%d/%m/%y %H:%M:%S}])"  }}proc join:peak {nickname hostname handle channel} {  if {[channel get $channel peak]} {    if {[set peakdata [channel get $channel peak-data]] == ""} {      channel set $channel peak-data [list $nickname $hostname [clock seconds] [llength [chanlist $channel]]]    } elseif {[lindex $peakdata 3] &lt; [llength [chanlist $channel]]} {      channel set $channel peak-data [list $nickname $hostname [clock seconds] [llength [chanlist $channel]]]      # if you want to announce there is a new peak, do it here (just remove the comment)      puthelp "PRIVMSG $channel :New peak ([llength [chanlist $channel]]) by $nickname!"    }  }}</code></pre></div>It works and all, but i'd like to define channels in which to use it<br>is that hard to make it do so?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7219">starpossen</a> — Wed May 07, 2008 8:45 pm</p><hr />
]]></content>
	</entry>
	</feed>
