Top

!Ping, !Time and !Version


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  5.0 (of 2 scores)
Date Added  Dec 22, 2007
Last Updated  Dec 22, 2007
Tags  ctcp  ping  time  version 

Introduction

!Ping: CTCP's the nick to get the ping reply.
!Time: CTCP's the nick to get the time reply.
!Version: CTCP's the nick to get the version reply.

Syntax:
* !Ping <Nick>
* !Time <Nick>
* !Version <Nick>

Grab the Code

on *:TEXT:*:#:{
  if ($1 == !Ping) || ($1 == !Time) || ($1 == !Version) {
    if ($2 != $null) {
      set %ctcp.chan $chan
      set %ctcp.nick $2
      set %ctcp.cmd $remove($1,!)
      ctcp %ctcp.nick %ctcp.cmd
    }
  }
}
 
on *:CTCPREPLY:$($+(%ctcp.cmd,*)):{
  if ($nick == %ctcp.nick) {
    if (%ctcp.cmd == Ping) { msg %ctcp.chan %ctcp.nick $+ 's ping reply is: $+($duration($calc($ctime - $2-)),.) }
    if (%ctcp.cmd == Time) { msg %ctcp.chan It is $2- at the place where %ctcp.nick lives. }
    if (%ctcp.cmd == Version) { msg %ctcp.chan %ctcp.nick is using: $+($2-,.) }
  }  
  unset %ctcp.*
}  
 
raw 401:*:{
  msg %ctcp.chan %ctcp.nick is not online.
  unset %ctcp.*
  halt
} 

Comments

  (2)  RSS
Claus999
Comments: 7
 
mIRC Snippet:  !Ping, !Time and !Version
Posted on May 3, 2009 12:32 pm
hmm !ping wont work propperly for me. when using !ping my bot gets the ping time but never sends it to me..
Dj_801
Comments: 102
 
mIRC Snippet:  !Ping, !Time and !Version
Posted on Jul 8, 2009 1:06 pm
@Claus999 works for me good

Quote:

<Alex> !time Alex
* Received a CTCP TIME from Alex|mIRC
<Alex|mIRC> It is Wed Jul 08 12:04:57 at the place where Alex lives.
<Alex> !version Alex
* Received a CTCP VERSION from Alex|mIRC
<Alex|mIRC> Alex is using: xchat 2.8.7e Windows 6.0 [i686/2.16GHz].
<Alex> !ping Alex
* Received a CTCP PING 1247076313 from Alex|mIRC
<Alex|mIRC> Alex's ping reply is: 1sec.

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom