mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2003
Posts: 3
K
Self-satisified door
OP Offline
Self-satisified door
K
Joined: Dec 2003
Posts: 3
I know very very little about writing scripts so please be gentle.

I am running a bot 24/7 on icq.irc and the bot seems to lose its channel operator status each night around the same time. There is nothing in my logs to indicate why the bot lost its op status but, as best as I can tell, the bot is losing op status due to some sort of server split or other server refresh that cancels the bots founder status on the channel and the bots nickserv identification.

As the channel is secure there is no real problem with other users taking over op status. But, the bot, while deop'ed, is not able to perform channel operator functions like kicking users for flooding etc.

I would like to insert some script to allow the bot to regain op status when this happens.

I believe that this can be done by resending the appropriate identify commands to chainserv and nickserv upon the occurance of the loss of op status event. However, I am not sure there is any event being triggered that can easily be captured.

The ON DEOP event looks like it would work fine but the help text indicates it only applies when another user deop's the bot.

There is the On ServerOP event lsited in the help text but
there is no mention of a converse event On ServerDEOP.

I suppose I could insert an ON 1:if ($me !isop) {blah} but I am concerned this statement would execute all the time and lag the bot.

My question is, is there an event that would tell me when my bot no longer has op status?

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
is the bot coded in mirc ?


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Dec 2003
Posts: 3
K
Self-satisified door
OP Offline
Self-satisified door
K
Joined: Dec 2003
Posts: 3
ummmm good question. Honestly, i don;t know, but the script.ini file does look like mirc coding as far as I can tell.

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Code:
on $me:DEOP:#:{ .msg [color:red]yournick[/color] I was deoped by $nick }

that goes in a remote file in the bot.. ALT + R .. the red stuff you change to your nickname..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Dec 2003
Posts: 3
K
Self-satisified door
OP Offline
Self-satisified door
K
Joined: Dec 2003
Posts: 3
Thank you for your response.

So what you are telling me is that the DEOP event is triggered anytime an operator losses op status? no matter who or how it lost status?

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
yes.. cos it deops your bot, the $me is your bots nick.. then it dosent mather who/what deops you.. its triggered anyway.. and i think that will work, try deop your bot and see if you get a message from it


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Link Copied to Clipboard