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.
M
MeJseL
Halfop
Posts: 61
Joined: Tue Nov 18, 2003 7:30 am
Location: Gothenburg , sweden

!ping

Post by MeJseL »

Anyone have a !ping <nick> script ... i type like !ping blah .. and the bot writes the lag time of nick in chan ..
:o
yeah!
User avatar
TALES
Halfop
Posts: 59
Joined: Sun Nov 09, 2003 8:45 am
Location: Netherlands
Contact:

Post by TALES »

Souperman has 1 search it here: http://eggdrop.za.net
M
MeJseL
Halfop
Posts: 61
Joined: Tue Nov 18, 2003 7:30 am
Location: Gothenburg , sweden

Post by MeJseL »

didnt work :(
yeah!
User avatar
]Kami[
Owner
Posts: 590
Joined: Thu Jul 24, 2003 2:59 pm
Location: Slovenia
Contact:

Post by ]Kami[ »

This should work:

Code: Select all

bind pub - !ping pub:ping
bind ctcr - PING pub:pingr

set pub_pingchan "#here.you.set.chan"

proc pub:ping {nick uhost hand chan args} {
	if {![auth:check $hand]} {return 0}
	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"
}
M
MeJseL
Halfop
Posts: 61
Joined: Tue Nov 18, 2003 7:30 am
Location: Gothenburg , sweden

Post by MeJseL »

Code: Select all

[05:03] Tcl error [pub:ping]: invalid command name "auth:check"
:roll:
yeah!
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Remove the if {![auth:check $hand]} {return 0} line.. I think that is ]Kami['s check to see if is an valid user or something..
Once the game is over, the king and the pawn go back in the same box.
M
MeJseL
Halfop
Posts: 61
Joined: Tue Nov 18, 2003 7:30 am
Location: Gothenburg , sweden

Post by MeJseL »

Code: Select all

Tcl error [pub:ping]: invalid command name "say"
:o
yeah!
M
MeJseL
Halfop
Posts: 61
Joined: Tue Nov 18, 2003 7:30 am
Location: Gothenburg , sweden

Post by MeJseL »

Code: Select all

Tcl error [pub:ping]: invalid command name "say"
:o
yeah!
M
MeJseL
Halfop
Posts: 61
Joined: Tue Nov 18, 2003 7:30 am
Location: Gothenburg , sweden

Post by MeJseL »

ops sry .. it just said that i couldnt replay so fast .. then i tryed again and i go 2 post sry :(
yeah!
User avatar
]Kami[
Owner
Posts: 590
Joined: Thu Jul 24, 2003 2:59 pm
Location: Slovenia
Contact:

Post by ]Kami[ »

oops, use this code:

Code: Select all

bind pub - !ping pub:ping 
bind ctcr - PING pub:pingr 

proc say {who what} {
	puthelp "PRIVMSG $who :$what"
}

proc cleanarg {arg} {
 set temp ""
	for {set i 0} {$i < [string length $arg]} {incr i} {
  set char [string index $arg $i]
  if {($char != "\12") && ($char != "\15")} {
   append temp $char
  }

set pub_pingchan "#here.you.set.chan" 

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

this should work fine..
M
MeJseL
Halfop
Posts: 61
Joined: Tue Nov 18, 2003 7:30 am
Location: Gothenburg , sweden

Post by MeJseL »

Code: Select all

[08:19] missing close-brace
    while executing
"proc cleanarg {arg}"
:o
yeah!
User avatar
]Kami[
Owner
Posts: 590
Joined: Thu Jul 24, 2003 2:59 pm
Location: Slovenia
Contact:

Post by ]Kami[ »

sorry, i was doing it before school, didnt had time to tets it..This work 100% (tested..)..

Code: Select all

bind pub - !ping pub:ping 
bind ctcr - PING pub:pingr 

proc say {who what} { 
   puthelp "PRIVMSG $who :$what" 
} 


set pub_pingchan "#here.you.set.chan" 

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" 
} 
You can see here:

Code: Select all

[11:45:54] <01]Kami[> !ping ]Kami[
[11:45:56] [Uber1337-Guard PING]
[11:45:57] <01Uber1337-Guard> PING reply from ]Kami[: 1 seconds
User avatar
FakeZ
Voice
Posts: 19
Joined: Tue Oct 28, 2003 2:25 pm

Post by FakeZ »

Thanx for the script :D

Ill test it too :mrgreen:
M
MeJseL
Halfop
Posts: 61
Joined: Tue Nov 18, 2003 7:30 am
Location: Gothenburg , sweden

Post by MeJseL »

ohh thx , but how about mili sec ? :D
yeah!
User avatar
FakeZ
Voice
Posts: 19
Joined: Tue Oct 28, 2003 2:25 pm

Post by FakeZ »

MeJseL wrote:ohh thx , but how about mili sec ? :D
if possible :D i would be happy too...

btw. the script runs fine ! Thanx again.

One last think .. i cant Ping myself... is that normal ?
Locked