Advertisement
illpastethat

CTCP Replies zzbooze

Jan 17th, 2013
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.33 KB | None | 0 0
  1. alias r2 {
  2.   set %i 1
  3.   while (%i <= 26) {
  4.     set %string %string  Chr %i %+ : $chr(%i)
  5.     inc %i
  6.   }
  7.   say %string
  8.   unset %i
  9.   unset %string
  10. }
  11. On *:connect: {
  12.   ; Turn on debug to a special window and pass the args to an alias
  13.   .debug -ni $+(@<,$cid,>) MyCTCPCheck
  14.  
  15.   ; Hide the special window
  16.   window -h $+(@<,$cid,>)
  17.  
  18.   ; Ignore all CTCP's
  19.   .ignore -t *!*@*
  20. }
  21. alias MyCTCPCheck {
  22.   ;Tokenize the passed string so we can use $1,$2,etc...
  23.   tokenize 32 $1
  24.  
  25.   ;Check for a privmsg matching a CTCP/DCC event
  26.   if ($1 = <-) && ($3 = PRIVMSG) && (:* iswm $5-) {
  27.     ;tokenize nickname and the event in question
  28.     tokenize 32 $gettok($mid($2,2),1,33) $gettok($5-,2,1)
  29.  
  30.     ;if its not a DCC event, signal our special CTCP event
  31.     if ($2 != DCC) { .signal CustomCTCP $1- }
  32.   }
  33. }
  34. on *:signal:CustomCTCP: {
  35.   ;$1 = nick , $2 = CTCP event , $3 = args
  36.   if ($2 = VERSION) { .ctcpreply $1 VERSION You can put your custom reply here. | echo 4 -a $timestamp $+([,$1-2,]) }
  37.   if ($2 = PING) { .ctcpreply $1 PING You can put your custom reply here. | echo 4 -a $timestamp $+([,$1-2,]) }
  38.   if ($2 = TIME) { .ctcpreply $1 TIME You can put your custom reply here. | echo 4 -a $timestamp $+([,$1-2,]) }
  39.   if ($2 = FINGER) { .ctcpreply $1 FINGER You can put your custom reply here. | echo 4 -a $timestamp $+([,$1-2,]) }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement