If the nick is taken, it will tell.
If you try to change your nick, into a nick that exceeds the max limited nick possible on the network, it will tell.
This works on a clean install of mIRC v6.3, please report bugs and errors here, updates will also be posted here.
Tested and works on version 6.15
- Code: Select all
alias nick {
if ($1) {
var %nicklen = $len($1)
if (%nicklen > $eval($+(%,::,maxnicklen.,$network),2)) {
echo -ti2c notify $active Error: Max nick length exceeded. Max nick length is $+($chr(2),$eval($+(%,::,maxnicklen.,$network),2),$chr(2),.)
echo -ti2c notify $active You are trying to change nick to $+($chr(2),$1,$chr(2)) which is $+($chr(2),%nicklen,$chr(2)) characters long.
echo -ti2c notify $active Short it down with $+($chr(2),$calc(%nicklen - $eval($+(%,::,maxnicklen.,$network),2)),$chr(2)) characters.
}
else { .set %ison $1 | .ison $1 }
}
}
raw 303:*: { if ($2) { echo -ti2c notify $active Error: Nickname is not available. } | else { .raw nick $+(:,%ison) } | .unset %ison | haltdef }
raw 005:*: { if ($gettok($matchtok($1-,MAXNICKLEN=,1,32),2,61)) { set %::maxnicklen. $+ $network $ifmatch } }