mIRC Home    About    Download    Register    News    Help

Print Thread
#112671 26/02/05 02:50 AM
Joined: Jan 2005
Posts: 37
S
Scratch Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Jan 2005
Posts: 37
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
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
do you mean...

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

#112673 26/02/05 01:58 PM
Joined: Jan 2005
Posts: 37
S
Scratch Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Jan 2005
Posts: 37
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
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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
Vogon poet
Offline
Vogon poet
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.


- Relinsquish

Link Copied to Clipboard