This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

idleking

Old posts that have not been replied to for several years.
Locked
A
Alexander
Voice
Posts: 16
Joined: Tue Jun 17, 2003 12:32 am

idleking

Post by Alexander »

Hi
i have a script that show the leading idle time.
my question, is it posible to make so that you can see the idle record of all time?
ex.
<nick1>!idleking
<bot><nick7> once watched porn movies for 1634 minutes and that is the alltime record.

this is the script atm
###############################################
#
# Idletime
#
# Originally named "Idle des jeunes" in French, which is funny as hell.
#
# modify by alex
###############################################


bind pub - !idle idle_getnick


proc idle_getnick {nick mask hand chan args} {
global botnick

if {$args == "" || $args == "{}" || ![info exists args]} {
set idle_max_idle "0"
set idle_max_idle_nick "Q"
foreach mec [chanlist $chan] {
set idle_idle [getchanidle $mec $chan]
if {$idle_idle > $idle_max_idle && $mec != $botnick} {set idle_max_idle $idle_idle ; set idle_max_idle_nick $mec}
}
putchan $chan "$idle_max_idle_nick, has been watching porn movies for $idle_max_idle minutes and is the current record holder. aka The_PornKing"
} else {
if {$args == $botnick} {
putchan $chan "Idle for about... 3 days, but I've been sleeping a lot."
return 71
}
if {[string toupper $args] == [string toupper $nick]} {
putchan $chan "Ahah. Verry funny."
return 72
}
if {![onchan $args $chan]} {
regsub "{" $args "" args
regsub "}" $args "" args
putchan $chan "$args last spoke on March 1986 ;)"
return 73
}
set idle [getchanidle $args $chan]
if {$idle == 0} {
putchan $chan "Errrr... $args *just* talked right now :/"
} else {
putchan $chan "$args has been idle for $idle minutes :/"
}
}
}
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Re: idleking

Post by user »

Alexander wrote:is it posible to make so that you can see the idle record of all time?
Of course, but using the code you provided as a "base" would not bring you any closer to the goal except from a few of the basics of fetching the idle time from eggdrop's internal chanlist.
For a script to store the highest idle time you'll have to check the idle time of anyone quitting/parting the channel against the record and check every user currently on the channel when someone types the !idleking trigger.
Have you ever read "The Manual"?
Locked