SmokeyOne wrote:okay i have it working, though it now displays ever server msgs, and then Displays in the channel the output style i have. I'm not sure on the right sntax on how to ge it to only look for "KILL"
I was thinking [lindex [split $arg == "KILL" 0]]
would this be right ?
Can you copy and paste the tcl you have written or post a link to it? If you are only interested in KILL's you probably can bind to the RAW with keyword KILL.
bind raw - NOTICE kill2_phrase
proc kill2_phrase {from key text} {
global blah(chan)
set oper [lindex $text 10]
set target [lindex $text 8]
set reason [lindex $text 13]
set server [lindex $from 0]
putserv "privmsg #channel :\002OPERKILL\002:$oper Killed $target for $reason on $server"
return 0
}
this will receive all the server msgs, I've tried to just bind it to KILL, still nothing, this looks like the only way i can get the kill msg. I know I would either split the text, or some how only get it to look for "KILL" then output the information
okay I'm haveing a bit of trouble here, cause in the kill phrase it only sees the kill, but for the k-line part its picking up every and all server msgs, how can i fix this ? here is how the proc goes right now
proc kill_kline_phrase_2 {from key text} {
if {[string match "*KILL*" $text] || [string match "*K-line*" $text]} {
set text [split $text]
set oper [lindex $text 10]
set target [string trimright [lindex $text 8] "."]
set reason [string trim [join [lrange $text 13 end]] "()"]
putserv "privmsg #Smokey :\002New Kill Active\002: Oper:(\002$oper\002) Killed:(\002$target\002) for Reason:(\002$reason\002)"
return 0
} else {
set oper [lindex $text 4]
set target [string trim [lindex $text 8] "[]"]
set reason [string trim [lindex $text 9] "[]"]
putserv "privmsg #smokey :\002New Kline Active\002: Oper:(\002$oper\002) Klined:(\002$target\002) for Reason:(\002$reason\002)"
return 0
}
}