Hi there,
Could anyone help me with a ping script that takes the ping words from the channel then ping the nick, after that write the ping's result in the channel.
thank u in advance
cooly
Since the eggping.tcl from the tcl archive dosn't seem to work for me i get some weird answers when i try to load it and once i loaded it correctly it didn't replay to the pings lol... I'm also interested in this... anyone?
fc/FunChatter - You call it life... I call it IRC!!
indeed it doesn't work any one ?? would be great if it existed but make it so, that it can work from a shell whitout having root acces and / or it works on windrop as well ..
##########################################
# Ping.tcl 0.1 by #egghelp@efnet (KuNgFo0)
#
# Set the next line as the flag required to use the command
# (Leave "-" so anyone can use)
set ping_flag "-"
# Set the next line as the channels you want to run in
set ping_chans "#lovenet #nexushells #mono #advs #web4u"
# Set the next line as the command you want to initiate the ping
set ping_command "!ping"
bind msg $ping_flag $ping_command msg_ping
bind pub $ping_flag|$ping_flag $ping_command pub_ping
bind ctcr - PING ctcr_ping
putlog "*** Ping.tcl 0.1 by #egghelp@efnet loaded"
proc msg_ping {nick uhost hand arg} {
pub_ping $nick $uhost $hand $nick $arg
}
proc pub_ping {nick uhost hand chan arg} {
global ping_chans ping_data botnick
if {(([lsearch -exact [string tolower $ping_chans] [string tolower $chan]] != -1) || ($ping_chans == "*") || $
if {($arg != "") && ([matchattr $hand o])} {
set targnick [string tolower [join [lrange [split $arg] 0 0]]]
} else {
set targnick [string tolower $nick]
}
if {([lsearch -exact $targnick [string tolower [array names ping_data]]] == -1) && ($targnick != [string tol$
putserv "PRIVMSG $targnick :\001PING [clock clicks]\001"
set ping_data($targnick) $chan
timer 5 "ping_unset $targnick"
}
}
}
proc ctcr_ping {nick uhost hand dest keyword arg} {
global ping_chans ping_data
set targnick [string tolower $nick]
if {[info exists ping_data($targnick)]} {
if {![catch {expr $arg}]} {
set ping_reply "[expr ([clock clicks] - $arg) / 1000000.0] seconds"
} else {
set ping_reply $arg
}
puthelp "PRIVMSG $ping_data($targnick) :\[$nick PING reply\]: $ping_reply"
unset ping_data($targnick)
foreach i [timers] {
if {[lindex $i 1] == "ping_unset $targnick"} {
killtimer [lindex $i 2]
}
}
}
}
proc ping_unset {targnick} {
global ping_data
unset ping_data($targnick)
}
this TCL script is written by KuNgFo0 @ #egghelp (efnet).
Well, what ceaser means is the line that u wrote : Tcl error [pub_ping]: syntax error in expression "(([lsearch -exact [string tolower $ping_chans] [string tolow" is not complete, he wants u to paste the whole complete error message so he would know what the problem is.
By the way the script doesn't give any errors in my egg.