| View previous topic :: View next topic |
| Author |
Message |
andromeda Guest
|
Posted: Wed Aug 21, 2002 7:45 am Post subject: notify script |
|
|
| 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. |
|
| Back to top |
|
 |
Mapherick Guest
|
Posted: Mon Aug 26, 2002 11:10 am Post subject: |
|
|
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: | > ISON Engineer Developer Tester Mapherick
:slack.mk.dev 303 Mapherick :Developer Mapherick |
Script for doing the above every 5 minutes:
| Code: | 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 |
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|