mIRC Home    About    Download    Register    News    Help

Print Thread
#112671 26/02/05 02:50 AM
S
Scratch
Scratch
S
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?

#112672 26/02/05 05:26 AM
D
DaveC
DaveC
D
do you mean...

/IF (socketbotname isop #channel) { ... }

#112673 26/02/05 01:58 PM
S
Scratch
Scratch
S
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.

#112674 26/02/05 07:40 PM
Joined: Mar 2004
Posts: 540
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Mar 2004
Posts: 540
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

#112675 26/02/05 08:52 PM
D
DaveC
DaveC
D
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?!?!?

#112676 27/02/05 07:02 PM
Joined: Mar 2004
Posts: 175
R
Vogon poet
Offline
Vogon poet
R
Joined: Mar 2004
Posts: 175
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.


Link Copied to Clipboard