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.

not working

Help for those learning Tcl or writing their own scripts.
Post Reply
User avatar
abah
Halfop
Posts: 92
Joined: Sun Dec 01, 2013 3:04 am
Location: Indonesia

not working

Post by abah »

I tried to modify this TCL
# Dec. 25, 2010
# forum request
#
# http://forum.egghelp.org/viewtopic.php?t=18208
#
# I'm simply looking for eggdrop to grep the idle time that is reported by '/whois <nick <nick>'
# (twice, if users are on different servers on network). I.e. how long the user has been idle on the server as such.
#
# In my desired script, I would be to type in a channel:
# <Gewan> !idle Ajnag
#
# This would then give something say like:
# <Eggdrop> Ajnag has been idle for 0 days 0 hours 41 mins 32 secs [signon: Sat Dec 25 04:52:53 2010]
#
#



bind pub - "idle" do:whois
setudef flag idle

proc do:whois {nick uhost handle chan text} {
global workingchan

if {"$text" == ""} {
putserv "privmsg $chan :Syntax: idle <nick> "
return
}

bind raw - 317 watch:317
bind raw - 402 watch:402

putserv "whois [split $text 0] [split $text 0]"
set workingchan $chan
}


proc watch:317 {from keyword text} {
global workingchan

putserv "privmsg #gadis :\[4Idle Checking\] 50Nickname 12- 55[lindex [split $text] 1]"
putserv "privmsg #gadis :\[4Idle Checking\] 50Idle 12- 56[duration [lindex [split $text] 2]] \[60signon [ctime [lindex [split $text] 3]]\]"

unbind raw - 317 watch:317
unbind raw - 402 watch:402
}


proc watch:402 {from keyword text} {
global workingchan

putserv "privmsg $workingchan :\"[string trimleft [lindex $text 2] :] [lrange [split $text] 3 end]\""

unbind raw - 317 watch:317
unbind raw - 402 watch:402
}


putlog "Loaded Idle Time determined from WHOIS ... :) see: http://forum.egghelp.org/viewtopic.php?t=18208 "
I can use the #Chan +idle chanset, is it because I tried it not going well
abah - Kota Makassar - Indonesia
User avatar
CrazyCat
Revered One
Posts: 1354
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Re: not working

Post by CrazyCat »

What do you intend to do ?
Actually you just added a custom flag to the channel but it's not used anywhere.
Post Reply