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.
Old posts that have not been replied to for several years.
a
andromeda
Post
by andromeda » Wed Aug 21, 2002 7:45 am
is it possible to make a tcl script that notify that a user has online/connected to IRC, like notify feature on mIRC. someone told me that using RAW command will help. but still i dont have any idea how to using it, anyone can help me? thx.
M
Mapherick
Post
by Mapherick » Mon Aug 26, 2002 11:10 am
Notify works like this:
1) User sends an ISON <nicks> command
2) Server sends a raw 303 with online entries of <nicks> in body
Example transaction:
Code: Select all
> ISON Engineer Developer Tester Mapherick
:slack.mk.dev 303 Mapherick :Developer Mapherick
Script for doing the above every 5 minutes:
Code: Select all
set ntfy_nickstocheck {
Engineer
Developer
Tester
Mapherick
}
proc ntfy_settimer {args} {
timer 5 ntfy_check
}
proc ntfy_check {args} {
global ntfy_nickstocheck
set intc [join $ntfy_nickstocheck]
putserv "ISON $intc"
ntfy_settimer
}
proc ntfy_process {from keyw args} {
global ntfy_nickstocheck
set ionl [split [lindex [split [lindex $args 0] ":"] 1]]
foreach nick $ionl {lappend ionll [string tolower $nick]}
foreach nick $ntfy_nickstocheck {
if {[lsearch $ionll [string tolower $nick]] == -1} {
lappend iofl $nick
}
}
putlog "NTFY: ONLINE: [join $ionl]"
putlog "NTFY: OFFLINE: $iofl"
}
bind raw - 303 ntfy_process