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.

Automatical requesting of channel operator status from a bot

Many channels use bots, especially the channels in networks with no channel service. The most common function in bots is giving out channel operator status either automatically or per request. Bots often give the operator status automatically if the hostmask you are using can be trusted. Usually this is not the case. The majority of people use internet service provider which assigns the user a new IP number on each connection. If you use a typical dial-up, well configured bots will never give you ops automatically. Instead they might give ops if you provide the right command with the right password. Now one might think that if the hostmask of the bot can be trusted, you could send the password automatically. This is exactly what this page is about.

I assume that you have an access to a bot which has a static username@hostname combination. Usually it's an eggdrop which usually accepts /msg <nick> op <password> If you are unsure about the bot address, /whois the bot and ask the person who runs the bot.

The IRC server tells you only the nicknames of the users when you join. Since you want to check the full addresses, you need to do /who #channel for the channels you want to request ops for. This is often already done by other scripts. However plain mIRC with no scripts doesn't do it by default. See the links at the bottom of the page for more information about requesting /who and the numeric replies.

Example script

; Put this ONLY if you don't already do /who #channel on join
on *:JOIN:#mirc,#chat: who $chan

; Request ops from geetee@hawking.pp.htv.fi on #mirc with the password 'arnie'
raw 352:& #mirc geetee hawking.pp.htv.fi *: {
  if ( $6 isop #mirc ) {
    echo -se Sending #mirc password to $6
    .msg $6 op arnie
  }
}

; Request ops from nicebot@example.com on #chat with the password 'iamnice'
raw 352:& #chat nicebot example.com *: {
  if ( $6 isop #chat ) {
    echo -se Sending #chat password to $6
    .msg $6 op iamnice
  }
}

Warning! Don't use this script if you don't know what you are doing! If you have no idea what username@hostname combination is, then don't use this script. If you have no idea about what kind of commands the bots accept, then don't use this script. I don't want to make threats but with a little bit of thinking you should realize what might happen if the password gets to the wrong people. Basically you can let the entire channel to be taken over. Remember that I will take absolutely no responsibility of this script. If you decide to use this, you are on your own.


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