Note: The mainteinance of the scripting examples is discontinued since I no longer have an interest to continue doing so. The pages will remain here, for now, but that might not be the case in the future. You are free to download all the material on these pages and set a up mirror, or even continue the maintenance of the material by enhancing the examples yourself.

All the material in these examples are for the mIRC version 6.03. It is very likely that some or most of these examples won't work in future versions.

Taking your nick back with a script

This is written mostly for IRCnet users. IRCnet doesn't have any kind of nick registration and probably will never have. If your network uses nick registration, this information is useless since services take care of the situation. The only method I am going to explain here is how to automatize changing your nick after your original nick has become available. Using "nukes" or other illegal ways is not supported.

I assume that someone has took your nick in the intention of annoying you or just fooling with you. The first thing you should do is to ask the person to give your nick back. Calling others by insulting words isn't helping. It is possible that someone has taken your nick accidentally. Assuming that you "owned" a nick but someone else is using it and considers it his/her own, the easiest way to get away with it is to make up a new unique nick that no one else is interested of. There is no point in an endless battle over a nick. If you are in a fight you may have the nick today, someone else tomorrow, and who knows about the next week. Even if you didn't do anything illegal, such as using starting a Denial of Service (DoS) attack, you can never know what the other side will do.

It's possible to do all kind of checking systems to see whether a certain nick is online but the best option in mIRC is to use the internal system: notify list. Just add the nick you are trying to get into your notify list and do on UNOTIFY event that changes your nick. IRCnet has code that creates delays that prevent changing nick right after it has been released if the server the previous user was using is far away in the server tree. That's why it's a good idea to use a timer that tries to change the nick a couple of times.

Warning! Trying to take the nick back during a long netsplit might lead to a nick collision kill. It is not acceptable behavior on IRCnet, or any other network I know.

Type in the command-line

/notify mynick

Example script

on *:UNOTIFY: {
  if ( ($nick == mynick) && ($nick != $me) ) {
    nick mynick
    .timer 3 20 nick mynick
  }
}

You have to change mynick to the nick you want to get. All parts that need to be changed are highlighted. The script changes your nick every time the nick becomes available. The script allows you to temporarily change your nick to something else.

You must realize that this script is useful only if you have means to keep your connection alive 24 hours per day. If you don't keep the nick reserved, everyone else is free to use it if they choose to do so.


Last updated 2003-04-05, Janne 'Geetee' Nikula, jn-mirc@zkelvin.net