bind pub - !ping pub:ping
bind ctcr - PING pub:pingr
proc say {who what} {
puthelp "PRIVMSG $who :$what"
}
set pub_pingchan "#teste"
proc pub:ping {nick uhost hand chan args} {
set args [split [cleanarg $args]]
if {[llength $args]<1} {
set who $nick
} else {
set who [lindex $args 0]
}
global pub_pingchan
set time [unixtime]
say $who "\001PING $time\001"
set pub_pingchan $chan
}
proc pub:pingr {nick uhost hand dest keyword args} {
global pub_pingchan
set temp [unixtime]
set time [expr $temp - $args]
say $pub_pingchan "PING reply from $nick: $time seconds"
}
then use a regsub or string map so filter \n and \r @_o. I believe a search on the forum wil help if you don't know how to use them.
*still hates redudant functions that are already solved by built in ones*.
just looking at these 10 lines of nonsense gives me the chill .