egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

notify script

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
andromeda
Guest





PostPosted: Wed Aug 21, 2002 7:45 am    Post subject: notify script Reply with quote

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





PostPosted: Mon Aug 26, 2002 11:10 am    Post subject: Reply with quote

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
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
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


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber