spy.tcl

By ChanZin on Apr 10, 2010

How to active:
1- Change "#arbeit.spy" to channel will echo the actions.
2- Access your bot via dcc and active the channel that you want to spy by:
.chanset #channel +spy

Notes:

  • Just a reporting channel
  • You can are spying multiple channels
setudef flag spy
set spyechochannel "#arbeit.spy"

bind join - * spyjoinecho
proc spyjoinecho {n u h c} {
   if {[lsearch -exact [channel info $c] {+spy}] != "-1"} {
     global spyechochannel
     putserv "privmsg $spyechochannel :\0034SPY:\003 \002CHANNEL:\002 $c | $n joined channel"
   }
}
bind part - * spypartecho
proc spypartecho {n u h c t} {
   if {[lsearch -exact [channel info $c] {+spy}] != "-1"} {
     global spyechochannel
     putserv "privmsg $spyechochannel :\0034SPY:\003 \002CHANNEL:\002 $c | $n left channel ($t)"
   }
}
bind kick - * spykickecho
proc spykickecho {n u h c w e} {
   if {[lsearch -exact [channel info $c] {+spy}] != "-1"} {
     global spyechochannel
     putserv "privmsg $spyechochannel :\0034SPY:\003 \002CHANNEL:\002 $c | $w has been kicked by $n ($e)"
   }
}
bind pubm - * spymsgecho
proc spymsgecho { n u h c t } {
   if {[lsearch -exact [channel info $c] {+spy}] != "-1"} {
     global spyechochannel
     putserv "privmsg $spyechochannel :\0034SPY:\003 \002CHANNEL:\002 $c | $n said: $t"
   }
}
bind mode - * spymodeecho
proc spymodeecho { n u h c m t } {
   if {[lsearch -exact [channel info $c] {+spy}] != "-1"} {
     global spyechochannel
     putserv "privmsg $spyechochannel :\0034SPY:\003 \002CHANNEL:\002 $c | $n sets mode: $m $t"
   }
}
bind nick - * spynickecho
proc spynickecho {n u h c nn} {
   if {[lsearch -exact [channel info $c] {+spy}] != "-1"} {
     global spyechochannel
     putserv "privmsg $spyechochannel :\0034SPY:\003 \002CHANNEL:\002 $c | $n is now known as: $nn"
   }
}
bind ctcp - action spyactionecho
proc spyactionecho {n u h d k t} {
   global botnick
   if {$d == $botnick} { 
       return 0
   } elseif {[lsearch -exact [channel info $d] {+spy}] != "-1"} {
       global spyechochannel
       putserv "privmsg $spyechochannel :\0034SPY:\003 \002CHANNEL:\002 $d | ACTION: $n $t"
   }
}

Comments

Sign in to comment.
Get_A_Fix   -  Apr 14, 2010

heh, I used to use the above method to match userdefined settings

if {[lsearch -exact [channel info $c] {+spy}] != "-1"} {

now, it's just easier to do

if {[channel get $c spy]} {

I also stopped using shortargs, like n u h c t, etc. It can become problematic.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.