This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

outputing raw server msgs in realtime

Old posts that have not been replied to for several years.
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Post by egghead »

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.
S
SmokeyOne
Halfop
Posts: 69
Joined: Tue Jan 14, 2003 6:04 am

Post by SmokeyOne »

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
S
SmokeyOne
Halfop
Posts: 69
Joined: Tue Jan 14, 2003 6:04 am

joing the kline and kill msgs into 1 proc

Post by SmokeyOne »

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
}
}
Locked