replace #YOUR_CHANNEL_NAME_HERE with your channel name
on *:text:*:*: {
if ($$1 = !peak) && (%peakwait == wait) { msg $chan 4,8Please wait 30seconds before checking Peak Users again. }
if ($$1 = !peak) && (%peakwait == $null) {
set -u30 %peakwait wait
msg %botchan 7Most users to chat on4 $chan 7is4 %mostusers }
}
on *:load: {
echo -a Welcome to !peak script By PuNkTuReD
echo -a Type !peak to check Channel Peak
set %mostusers 0
}
on *:JOIN:#PUT_YOUR_CHANNEL_NAME_HERE: {
if (%mostusers < $nick($chan,0)) { set %mostusers $nick($chan,0) }
else { halt }
}
um this should make it like that just after you load the code type /hfree peak so you can start fresh..
#Peak on
on $@*:text:/^@peak$/iS:#:if ($nick isop #) msg # $iif(!$hget(Peak,$+($network,#)),Sorry No count yet.,Most users on04 # was04 $gettok($hget(Peak,$+($network,#)),1-11,32) before $+($duration($calc($ctime - $gettok($hget(Peak,$+($network,#)),12,32)),1),!))
on !*:join:#: {
if ($nick(#,0) > $gettok($hget(Peak,$+($network,#)),1,32) || !$hget(Peak,$+($network,#))) {
.hadd -m Peak $+($network,#) $nick(#,0) Users on04 $date(m/d/yy) at04 $time(h:nn tt) with last joiner $+($nick,$chr(44)) $ctime
msg # !!New User Peak Record Reached!! In04 # With04 $gettok($hget(Peak,$+($network,#)),1-7,32)
}
}
#Peak end
on *:start:{ $Peakstartup }
on *:connect:{ $Peakstartup }
on *:exit:{ $Peakclose }
on *:disconnect:{ $Peakclose }
alias -l Peakclose { .hsave Peak $qt($scriptdirPeak.hsh) }
alias -l Peakstartup {
if (!$hget(Peak)) { .hmake Peak 100 }
if ($exists($qt($scriptdirPeak.hsh))) { .hload Peak $qt($scriptdirPeak.hsh) }
}
menu Channel,menubar {
.Turn Peak $iif($group(#Peak) = On,Off,On): $iif($group(#Peak) = On,.disable,.enable) #Peak | echo -a Peak Script is now $group(#Peak)
}
ah i know what i spotted missing that i wanted to ask to be added.. on Noutorius's version you had
05<02:43pm> -Titan_Bot- Most users on #Socialchat were 10 with last joiner Sleeping_On_The_Job, before 5secs! on the @peak command..
can you edit yours to include this ?
with last joiner $+($gettok($($+(%,peak,$chan),2),2,124),$chr(44))
thats the bit on Noutorius's that did that
um I don't use ! in my triggers for the most part cuz of conflicts with anope. I mostly use @ ,but if you want to use ! just change the @ to a ! or if you want to use both @ and ! you can do..
for !
on $@*:text:/^!peak$/iS:#:
for @
on $@*:text:/^@peak$/iS:#:
for either or
on $@*:text:/^[!@]peak$/iS:#:
nice edit. ty napa.. there may be another edit coming up soon.
see below for the results so far.
12<20812:208pm12> * Joins: Lanceallen (Lanceallen@)
12<20812:208pm12> !!New User Peak Record Reached!! In04 #roleplayofallkinds With04 81 Users on04 4/24/10 at04 8:08 pm12<20812:209pm12> ChanServ sets mode: +qo Cheiron Cheiron
12<20812:209pm12> !!New User Peak Record Reached!! In04 #Socialchat With04 9 Users on04 4/24/10 at04 8:09 pm
12<20812:209pm12> <angel{MQ}> wb Cheiron
12<20812:209pm12> woo hoo
12<20812:210pm12> !peak
12<20812:210pm12> hmmm
12<20812:210pm12> that still dont work though
12<20812:210pm12> hmm
12<20812:210pm12> Melly grrs
12<20812:210pm12> @peak
12<20812:210pm12> Most users on04 #Socialchat was04 9 Users on04 4/24/10 at04 8:09 pm
i will add another post here once i work out what edit we need so keep eyes peeled :)
um it's
on @*:text:*:#:
but that is for the bot or who ever is running the code. for the nicks triggering the code it's
if ($nick isop #)
or
if ($nick(#,$nick,o))
here is a one i made awhile back using hash...
#Peak off
on $@*:text:/^@peak$/iS:#:if ($nick isop #) msg # $iif(!$hget(Peak,$+($network,#)),Sorry No count yet.,Most users on04 # was04 $hget(Peak,$+($network,#)))
on !*:join:#: {
if ($nick(#,0) > $gettok($hget(Peak,$+($network,#)),1,32) || !$hget(Peak,$+($network,#))) {
.hadd -m Peak $+($network,#) $nick(#,0) Users on04 $date(m/d/yy) at04 $time(h:nn tt)
msg # !!New User Peak Record Reached!! In04 # With04 $hget(Peak,$+($network,#)))
}
}
#Peak end
on *:start:{ $Peakstartup }
on *:connect:{ $Peakstartup }
on *:exit:{ $Peakclose }
on *:disconnect:{ $Peakclose }
alias -l Peakclose { .hsave Peak $qt($scriptdirPeak.hsh) }
alias -l Peakstartup {
if (!$hget(Peak)) { .hmake Peak 100 }
if ($exists($qt($scriptdirPeak.hsh))) { .hload Peak $qt($scriptdirPeak.hsh) }
}
menu Channel,menubar {
.Turn Peak $iif($group(#Peak) = On,Off,On): $iif($group(#Peak) = On,.disable,.enable) #Peak | echo -a Peak Script is now $group(#Peak)
}
¬ 03:19:26pm| Neisen: !peak
¬ 03:19:27pm| --> NOTICE: From [ testyu ] : Sorry, #test hasn\'t got it\'s peak yet.
¬ 03:19:28pm| * Attempting to rejoin channel #test
¬ 03:19:29pm| --> JOIN: You are now talking in #test
¬ 03:19:30pm| Neisen: !peak
¬ 03:19:31pm| --> NOTICE: From [ testyu ] : Most users on #test were 3 with last joiner Neisen, before 1sec!
on *:JOIN:#:if ($+(%peak,$chan) <= $nick($chan,0)) set $+($chr(37),peak,$chan) $+($nick($chan,0),$chr(124),$nick,$chr(124),$ctime)
on *:TEXT:*:*:if ($1 == !peak) && ($chan) notice $nick $iif($numtok($($+(%,peak,$chan),2),124) = 3,Most users on $chan were $gettok($($+(%,peak,$chan),2),1,124) with last joiner $+($gettok($($+(%,peak,$chan),2),2,124),$chr(44)) before $+($duration($calc($ctime - $gettok($($+(%,peak,$chan),2),3,124)),1),!),$+(Sorry,$chr(44)) $chan hasn\'t got it\'s peak yet.)
Here you go! :)
um you have msg %botchan and there is no way of setting that on ur script.
or you can do it all like this
on *:text:!peak:#: {
msg $chan $iif($($+(%,peak,$nick,$chan),2),4 $+ $chr(44) $+ 8Please wait 30seconds before checking Peak Users again.,7Most users to chat on4 $chan 7is4 $($+(%,mostusers,$chan),2) 7on4 $($+(%,$chan,mostusers),2))
set -u30 $+(%,peak,$nick,$chan) wait
}
on *:load: {
echo -a Welcome to !peak script By PuNkTuReD
echo -a Type !peak to check Channel Peak
}
on !*:join:#: {
if ($nick($chan,0) > $($+(%,mostusers,$chan),2)) || (!$($+(%,mostusers,$chan),2)) {
set $+(%,mostusers,$chan) $nick($chan,0)
set $+(%,$chan,mostusers) $date(mm/dd/yy)
}
}
but anyway nice work 6/10
you would use
on *:JOIN:#: {
if ($($+(%,mostusers,$chan),2) < $nick($chan,0)) { set %mostusers $+ $chan $nick($chan,0) }
else { halt }
}
on *:text:*:*: {
if ($$1 = !peak) && (%peakwait == wait) { msg $chan 4,8Please wait 30seconds before checking Peak Users again. }
if ($$1 = !peak) && (%peakwait == $null) {
set -u30 %peakwait wait
msg %botchan 7Most users to chat on4 $chan 7is4 $($+(%,mostusers,$chan),2) }
}