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.

PING

Old posts that have not been replied to for several years.
C
COOLY
Voice
Posts: 14
Joined: Sun Feb 24, 2002 8:00 pm

Post by COOLY »

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
F
FunChatter
Voice
Posts: 16
Joined: Thu Jun 05, 2003 2:46 am
Location: Athens, Greece.
Contact:

Post by FunChatter »

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? :D
fc/FunChatter - You call it life... I call it IRC!!
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

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 ..
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

this one replies for Ping requests when someone types !ping in the channel

Code: Select all

##########################################
# 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).
F
FunChatter
Voice
Posts: 16
Joined: Thu Jun 05, 2003 2:46 am
Location: Athens, Greece.
Contact:

Post by FunChatter »

I get the following... Tcl error [pub_ping]: syntax error in expression "(([lsearch -exact [string tolower $ping_chans] [string tolow"
fc/FunChatter - You call it life... I call it IRC!!
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Yes, it dose seems to be missing something from this line:

Code: Select all

if {([lsearch -exact $targnick [string tolower [array names ping_data]]] == -1) && ($targnick != [string tol$ 
Paste the entire line.
Once the game is over, the king and the pawn go back in the same box.
F
FunChatter
Voice
Posts: 16
Joined: Thu Jun 05, 2003 2:46 am
Location: Athens, Greece.
Contact:

Post by FunChatter »

Thats the line... the code is just some posts up... :D
fc/FunChatter - You call it life... I call it IRC!!
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Well, is not complete, that why is not working. doh!
Once the game is over, the king and the pawn go back in the same box.
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

euhm where exacly do i put that line ??
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

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.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Actualy no, I've said that there is something missing in that line.
Once the game is over, the king and the pawn go back in the same box.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

yeah that's what I meant in this post, that u want him to post the error again with the missing parts
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Get from here the latest version.
Once the game is over, the king and the pawn go back in the same box.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Good thing u posted this :P
I was using 0.1 while there's 0.3 hehe
F
FunChatter
Voice
Posts: 16
Joined: Thu Jun 05, 2003 2:46 am
Location: Athens, Greece.
Contact:

Post by FunChatter »

Anyone have tryed the 0.3 version? Seems it dosn't work... like is it never saw the !ping in the channels i set :\
fc/FunChatter - You call it life... I call it IRC!!
Locked