Extended ascii compatibility for mIRC 7

By FordLawnmower on Apr 23, 2011

This a very simple script that attempts to address a major problem on servers that allow extended ascii characters in nicknames. These nicknames cause problems for mIRC 7 users because mIRC processes all commands with it's unicode engine before sending it to the server. The end result of this is that some characters are being changed before being sent to the server, resulting in a false No such nickname error.

The simple solution to this is to use /raw -n with raw server syntax , when addressing a user with a special character in their nickname. Not very practical , especially if you are in PM and you have to use /raw everytime you say something.

So this script is basically just a bunch of replacement aliases that use /raw -n.
To use , just load into remotes and use all of your mIRC commands as you normally would.

Any problems or suggestions, please post them here.

Note That there is a small section at the bottom of this script that addresses the same issue with versions of mIRC prior to 7. In earlier versions mIRC had the same issue but only when you used the command from the editbox. This script will also correct those problems.

;Extended ascii compatibility for mIRC7 by Ford_Lawnmower irc.geekshed.net #Script-Help
On *:Start: {
  if ($version < 7) { .disable #mIRC7 | .enable #mIRC-7 }
  else { .enable #mIRC7 | .disable #mIRC-7 }
}
#mIRC7 On
alias mode .raw -n mode $$1-
alias ctcp .raw -n privmsg $$1 $+(:,$chr(1),$$2-)
alias version ctcp $$1 version
alias whois .raw -n whois $$1
alias nick .raw -n nick $$1
alias who .raw -n who $$1-
alias whowas .raw -n who $$1
alias userhost .raw -n userhost $$1-
alias userip .raw -n userip $$1-
alias watch .raw -n watch $$1-
alias ison .raw -n ison $$1-
alias invite .raw -n invite $$1-
alias kill .raw -n kill $$1-
alias shun .raw -n shun $$1-
alias zline .raw -n zline $$1-
alias kline .raw -n kline $$1-
alias gline .raw -n gline $$1-
alias gzline .raw -n gzline $$1-
alias sajoin .raw -n sajoin $$1-
alias sapart .raw -n sapart $$1-
alias chghost .raw -n chghost $$1-
alias chgident .raw -n chgident $$1-
alias chgname .raw -n chgname $$1-
alias cs .msg chanserv $$1-
alias ns .msg nickserv $$1-
alias ms .msg memoserv $$1-
alias os .msg operserv $$1-
alias hs .msg hostserv $$1-
alias chanserv .msg chanserv $$1-
alias nickserv .msg nickserv $$1-
alias memoserv .msg memoserv $$1-
alias operserv .msg operserv $$1-
alias hostserv .msg hostserv $$1-
alias me2 {
  .raw -n privmsg $active $+(:,$chr(1),ACTION) $$1-
  echo -mt $active $+(,$color(Action text),*,$chr(32),$me,$chr(32),$1-)
}
alias names .raw -n names $$1
alias ison .raw -n ison $$1-
alias msg {
  .raw -n privmsg $$1 $2-
  haltdef
  noop $regex($nick(#,$me).pnick,/(^[+%@&~!])?/g)
  echo -qt $$1 $+(<,,$cnick($iif($regml(1),$regml(1),.)).color,$regml(1),$me,,>,$chr(32),,$color(Own Text),$2-)
}
alias notice {
  .raw -n notice $$1-
  echo -aq *Noticed* $1 $+(:,$chr(3),$color(Notice text)) $2-
} 
alias say {
  msg $active $$1-
  if ($regex($nick(#,$me).pnick,/(^[+%@&~!])?/g)) {
    echo -mt $chan $+(<,,$cnick($iif($regml(1),$regml(1),.)).color,$regml(1),$me,,>,$chr(32),,$color(Own Text),$1-)
  }  
}
alias invite .raw -n invite $$1-
alias kick .raw -n kick $$1-
alias mode .raw -n mode $$1-
On *:input:?: {
  if ($version >= 7) {
    if ($1 == /me) || ($1 == /action) {
      haltdef
      me2 $$2-
    }
  }
}
alias ban {
  var %props $iif(-* iswm $1,$1), %chan $iif($iif(%props,$2,$1) ischan,$v1), %opt $numtok(%props %chan,32), $&
    %nick $($+($,$calc(%opt + 1)),2), %chan $iif(!%chan,#,%chan), %type $iif($($+($,$calc(%opt + 2)),2) isnum 0-9,$v1), $&
    %comment $($+($,$calc(%opt + $iif(%type,3,2)),-),2)
  .ialcheck %nick %chan
  if (%props) {
    if (k isincs %props) {
      if (%nick ison %chan) kick %chan %nick %comment
      else var %error $errr %nick %nick
    }
    if (u isincs %props) {
      if ($regex(%props,/([\d+])/)) {
        var %delay $regml(1)
        if ($regex(%nick,/[\*\!@]/)) .timer 1 %delay mode %chan -b %nick
        elseif (%nick ison %chan) .timer 1 %delay mode %chan -b $address(%nick,$iif(%type,$v1,5))
        else var %error $errr %nick %nick
      }
    }
    if (r isincs %props) {
      if ($regex(%nick,/[\*\!@]/)) mode %chan -b %nick
      elseif (%nick ison %chan) mode %chan -b $address(%nick,$iif(%type,$v1,5))
      else $errr %nick
      return
    }    
  }
  if ($regex(%nick,/[\*\!@]/)) { mode %chan +b %nick }
  elseif (%nick ison %chan) mode %chan +b $address(%nick,$iif(%type,$v1,5))
  else var %error $errr %nick %nick
  %error 
}
alias -l ialcheck { if (!$ial($1) && $1 ison $2) .who $1 }
alias -l errr return echo $color(Info Text) -qgs * /ban no such user
#mIRC7 End
#mIRC-7 Off
On *:Input:*: {
  if ($version < 7) && ($left($1,1) == /) && ($true !isin $+($ctrlenter,$inpaste)) {
    if ($isutf($1-) == 2) {
      haltdef
      if ($left($1,2) == //) $($utfdecode($1-, 0),2)
      else $utfdecode($1-, 0)
    }
  }
}
#mIRC-7 End

Comments

Sign in to comment.
FordLawnmower   -  Apr 27, 2011

Thanks Amiga600 :)
Thanks to the person who gave me the 1 rating too :)

 Respond  
Amiga600   -  Apr 27, 2011

Great job ford, as always your scripts are great, of course it would be nice if Khaled fixed this mess to start with.

 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.