mIRC Homepage
Posted By: Scratch Check if sock bot is op - 26/02/05 02:50 AM
I'm writing a simple socket bot, and I need the socket script to determine if the socket bot is a channel op on the channel, and if it is, set the topic and channel modes.

How do I determine if the bot is indeed an op?
Posted By: DaveC Re: Check if sock bot is op - 26/02/05 05:26 AM
do you mean...

/IF (socketbotname isop #channel) { ... }
Posted By: Scratch Re: Check if sock bot is op - 26/02/05 01:58 PM
Nope, you can't use that with sockets. You need to parse the raw server data to determine if the bot is a channel op, but I'm not sure on what to parse, etc.
Posted By: Armada Re: Check if sock bot is op - 26/02/05 07:40 PM
Your best bet is to do a "names #Room" and check that line for your sockbots name
raw 353 is the reply and 366 is the end Look for your bots name with a @ next to it
Posted By: DaveC Re: Check if sock bot is op - 26/02/05 08:52 PM
man oh man i was having a bad day that day, i think i read every message wrong, I thought u ment from another nick see if the bot was an op, LOL now i think of it, like what possable help would that be?!?!?
Posted By: Relinsquish Re: Check if sock bot is op - 27/02/05 07:02 PM
You could have your script set a variable, hash table item, or something when +o and -o has been set on your bot. When you want to change the topic or modes, you can easily recall the data entry for that channel.
© mIRC Discussion Forums