!Ping Reply

By Rage on Jul 26, 2006

When your freinds type !ping, it reply's to them with there ping msg. You can edit the msgs if you want.

on *:TExT:*:#:{ if (ping me isin $1-) || (!ping isin $1-) { ctcp $nick ping } }
on 1:ctcpreply:*ping*: { 
  if (ping isin $1-) { set %ping.reply $ctime - $2 }
  if (%ping.reply == 0) { notice $nick *** Currently No Lag: %ping.reply Seconds }
  if (%ping.reply == 1) { notice $nick *** Currently Minimal Lag: %ping.reply Seconds }
  if (%ping.reply == 2) { notice $nick *** Currently Minimal Lag: %ping.reply Seconds }
  if (%ping.reply == 3) { notice $nick *** Currently Minimal Lag: %ping.reply Seconds }
  if (%ping.reply == 4) { notice $nick *** Currently Minimal Lag: %ping.reply Seconds }
  if (%ping.reply == 5) { notice $nick *** Currently Too Much Lag: %ping.reply Seconds }
  if (%ping.reply == 6) { notice $nick *** Currently Too Much Lag: %ping.reply Seconds }
  if (%ping.reply >= 7) { notice $nick *** Currently Way Too Much Lag: %ping.reply Seconds }
  unset %ping.reply
}

Comments

Sign in to comment.
Manpreet   -  Jul 28, 2006

Very good. Works fine. It\'s in my IRC. Thanks!

 Respond  
krimson   -  Jul 27, 2006

why use so many if statements when you could have done this more elegant using $iif and comparing based on \'<\' and \'>\'

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.