mIRC Home    About    Download    Register    News    Help

Print Thread
#238929 09/09/12 01:16 AM
B
bojak71730
bojak71730
B
Code:
on *:DEOP:#: { 
  IF ($nick == bojak || $nick == kaytee) {
   mode # $nick 
} 

}

i cant make my bot auto op after i was deop... $nick is the names i want my bot to protect from being deoped..

Last edited by bojak71730; 09/09/12 01:17 AM.
#238930 09/09/12 02:18 AM
Joined: Nov 2006
Posts: 1,552
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,552
Code:
on @*:DEOP:#: { 
  if ($opnick == bojak || $opnick == kaytee) {
   mode # +o $opnick 
  }
} 

* the @ event prefix will make it trigger only if the client running the script (the bot) is currently oped
* $nick in the op/deop event refers to the nick giving/taking op. $opnick is the nick oped/deoped
* you want to set mode +o = give op

B
bojak71730
bojak71730
B
how can i protect the bot from being deoped?

#238934 09/09/12 03:04 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
The best way is to have it on a network with channel services that can make it possible to deal with that situation. If you aren't on a network with channel services, the only option would be to have multiple bots or people who will automatically re-op the bot if it gets de-opped, and even then it's not foolproof.

In the end, if you are concerned about that, then you should reconsider who is allowed to be an op. Don't op anyone who you think will de-op the bot.


Link Copied to Clipboard