Code: Select all
setudef flag relay
set spy(home) "#daigo"
set spy(chan) "#helpops"
bind PUBM -|- * spychan:chat
bind CTCP -|- "ACTION" spychan:action
bind SIGN -|- "$spy(chan) *" spychan:sign
bind JOIN -|- "$spy(chan) *" spychan:join
bind PART -|- "$spy(chan) *" spychan:part
bind SPLT -|- "$spy(chan) *" spychan:split
bind KICK -|- "$spy(chan) *" spychan:kick
bind RAW * "MODE" spychan:mode
proc spychan:part { nickname hostname handle channel reason } {
global spy
if {[string equal -nocase $channel $spy(chan)]} {
putserv "PRIVMSG $spy(home) :\[$channel\] * $nickname ($hostname) has left $spy(chan)"
}
}
proc spychan:join { nickname hostname handle channel } {
global spy
if {[string equal -nocase $channel $spy(chan)]} {
putserv "PRIVMSG $spy(home) :\[$channel\] * $nickname ($hostname) has joined $spy(chan)"
}
}
proc spychan:kick { nickname hostname handle channel target reason } {
global spy
if {[string equal -nocase $channel $spy(chan)]} {
putserv "PRIVMSG $spy(home) :\[$channel\] * $target was kicked from $spy(chan) by $nickname ($reason)"
}
}
proc spychan:mode { from key arguments } {
global spy
set channel [string trim [lindex [split $arguments] 0]]
set modechange [string trim [lindex [split $arguments] 1]]
set victims [string trim [join [lrange [split $arguments] 2 end]]]
set nickname [string trim [lindex [split $from "!"] 0]]
set hostname [string trim [lindex [split $from "!"] 1]]
if {[string equal -nocase $channel $spy(chan)]} {
putserv "PRIVMSG $spy(home) :\[$channel\] * $nickname sets mode: $modechange $victims"
}
}
proc spychan:sign { nickname hostname handle channel reason } {
global spy
if {[string equal -nocase $channel $spy(chan)]} {
putserv "PRIVMSG $spy(home) :\[$channel\] * $nickname ($hostname) has quit IRC ($reason)"
}
}
proc spychan:split { nickname hostname handle channel arguments } {
global spy
if {[string equal -nocase $channel $spy(chan)]} {
putserv "PRIVMSG $spy(home) :\[$channel\] * $nickname has split from the network"
}
}
proc spychan:chat { nickname hostname handle channel arguments } {
global spy
if {[string equal -nocase $channel $spy(chan)]} {
putserv "PRIVMSG $spy(home) :\[$channel\] <$nickname> $arguments"
}
}
proc spychan:action { nickname hostname handle channel keyword arguments } {
global spy
if {[string equal -nocase $channel $spy(chan)]} {
putserv "PRIVMSG $spy(home) :\[$channel\] * $nickname $arguments"
}
}