mIRC Version Reply Changer

By Dani_l11 on May 08, 2011

Changers any CTCP reply.

This script changes the default mIRC version reply to any text you want, without DLL's or anything complicated. You can change version reply and edit or add more ctcp reply's from line 32. Just add
if (%action == whatever you want to add/change) ctcpreply %anick $v1 The reply you want
Just load the server and connect to a server to work, or type .timervchanger 0 1 vchanger yourself.

Multi-servers support

mIRC is scripted so you would always sent a reply, but you can work around it:

It ignore's all CTCP's (using /ignore), but opens debug window. Then it scans the debug window for CTCP, and it works from that. It looks complicated because of the multi-server support. It uses 2 variables, nothing else.

Check for the ####, that's where you can edit in between.

on *:Connect:{ if (!$timer(vchanger)) .timervchanger 0 1 vchanger
  unset %Vchanger.load*
}
on *:unload:{ .timervchanger off }
alias vchanger {
  if ($ignore(*!*@*).type != ctcp) || (%vchanger.loadignore != $scon(0)) { 
    var %x = 1
    while (%x <= $scon(0)) {
      scon %x .ignore -t *!*@*
      inc %x
    }
    set %Vchanger.loadignore $scon(0)
  }
  if (!$window(@Vchanger1)) || (%vchanger.loadwindow != $scon(0)) { 
    var %x = 1
    while (%x <= $scon(0)) {
      scon %x //var % $+ cd $!window(@Vchanger $+ %x $+ )
      if (!%cd) { scon %x .debug @Vchanger $+ %x | window -h @Vchanger $+ %x }
      inc %x
    }
    set %vchanger.loadwindow $scon(0)
  }
  var %x = 1,%y = 1
  while (%x <= $scon(0)) {
    while ($line(@Vchanger $+ %x,%y)) { 
      tokenize 32 $v1
      if  (* $+ $chr(1) $+ * iswm $left($5,2)) && ($chr(1) == $right($gettok($1-,-1,32),1)) && ($1 == <-) && ($3 == privmsg) && (Action !isin $5)  {
        scon %x 
        var %action = $upper($mid($remove($5-,$chr(1)),2))
        var %anick = $gettok($mid($2,2),1,33)
;#########
        if (%action == version) ctcpreply %anick VERSION Not mIRC!
        if (%Action == TIME) ctcpreply %anick TIME $fulldate
        if (%action == finger) ctcpreply %anick FINGER Don't you dare...!
        if ($gettok(%action,1,32) == ping) && ($gettok(%action,2,32) isnum) { ctcpreply %anick ping $ctime |   echo -a $chr(3) $+ $color(ctcp) $+ $timestamp $+($chr(91),%anick,$chr(32),PING,$chr(93)) }
        else   echo -a $chr(3) $+ $color(ctcp) $+ $timestamp $+($chr(91),%anick,$chr(32),%action,$chr(93)) 
      }
;#######
      inc %y
    }
    clear @vchanger $+ %x
    inc %x
  }
}

Comments

Sign in to comment.
jaytea   -  Aug 09, 2011

Tracing back from which server the version/ping came, was hard for me using 1 debug for all servers,

it sure would've been if you avoided the use of /debug -i ;P anyhow, it's all good practice!

 Respond  
Dani_l11   -  Aug 09, 2011

since multiple connections may use the same debug target

Tracing back from which server the version/ping came, was hard for me using 1 debug for all servers, so I just op[ened a new debug for every window. And yes I did find that out on myself, nobody in #mSL wanted to help me :(

 Respond  
jaytea   -  Aug 09, 2011

ah you use debug to directly call the alias, that's smart. But it isn't multi server.

since multiple connections may use the same debug target, it could be made to support multiple servers simply by performing /debug on CONNECT (or, more accurately, on ^LOGON) rather than on START. you can also specify an invalid filename such as 'NUL' or 'AUX' to prevent mIRC from writing to disk.

using /debug to spoof a version reply is the smart part, so kudos if you discovered that on your own Dani :P this method is actually close to 15 years old and comes from a time when /debug was undocumented and only took a single argument (on|off to turn on/off debugging to a file named debug.log) but nowadays it has indeed been made much easier with the addition of the -i switch.

 Respond  
Dani_l11   -  Aug 08, 2011

ah you use debug to directly call the alias, that's smart. But it isn't multi server.

 Respond  
xplo   -  Aug 06, 2011

Here is The version i use, really smaller and easy to understand.

alias vr.chk { 
  tokenize 32 $1 
  if ($1 == <-) { 
    if ($5 == :VERSION) { 
      ctcpreply $mid($gettok($2,1,33),2) VERSION 12m4IR8C $+(v,$version) SebLemery[at]facebook.com
    } 
  } 
}
on *:START: { 
  debug -i vrchk vr.chk 
  ignore -tw * 
}
 Respond  
Dani_l11   -  Aug 06, 2011

I'm sorry for you, but that wasn't my script. My script does nothing with nicklist colors or anything like that. It was another script you've used, I guess.

 Respond  
Merbo   -  Jul 30, 2011

no like, all the nicks in my nick colors list turned GRAY. I couldnt see anything how it shouldve been and i had to completely reinstall mirc.

 Respond  
Dani_l11   -  Jul 12, 2011

In normal text? No it doens't. In CTCP replies, it does, but you can just remove the 'custom' echo made by this script by removing the lines which say echo blabal

 Respond  
Merbo   -  Jul 11, 2011

This breaks nick colors :<

 Respond  
blackvenomm666   -  Jun 01, 2011

mmhmm i made one of these myself but it only changes reply for Version atm. its in dialog form for easy adding/removing of diff version replies and can do random or just one set version reply

 Respond  
Dani_l11   -  Jun 01, 2011

;-) Thanks blackvenom

 Respond  
KindOne   -  Jun 01, 2011

Thanks, Guess I overlooked that. Works like a charm now.

 Respond  
blackvenomm666   -  May 30, 2011

kindone delete the echo
else echo -a $chr(3) $+ $color(ctcp) $+ $timestamp $+($chr(91),%anick,$chr(32),%action,$chr(93))
delete that line and it should stop

 Respond  
KindOne   -  May 30, 2011

I am running mIRC 7.19, unaltered copy of your script.

My timestamp format is "HH:nn:ss" "17:56:16"
It seems whenever someone does a VERSION in me, I get "7:56:16 [SomeOne VERSION]" in my channel window. It looks like the script cuts off the "1" in the timestamp.
Is there a way to make the script not display the "7:56:16 [SomeOne VERSION]" not display in the channel?

 Respond  
Dani_l11   -  May 12, 2011

Updated, fixed a bug and added PING reply

 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.