egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

isop dumb question

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
droolin
Halfop


Joined: 24 Jul 2003
Posts: 64

PostPosted: Wed Sep 05, 2007 9:36 pm    Post subject: isop dumb question Reply with quote

Im putting together a script for a IRC radio channel, and I was doing a check on the status of a nick to see if they were an oper in any of the radio channels that this nick would be valid for. This command was issued with a msg, which required the logic of the script to loop through a list of channels to see if this nick was an oper on any of them.

Because it has been awhile sence I have done any tcl, I am stopping and starting the bot alot as I work my way through stupid errors.

When the nick(me, owner of the channel) issues the command to the bot after it joins the channel. The 'isop' returns a value of 0. But, if I hop the channel after the bot joins. I receive a status of 1. I just wondered if anyone knew why this is so?

Quote:
* Joins: ozzy (ozzy@AwesomeChatter-2229ACBA.awesomechat.net)
* ChanServ sets mode: +o ozzy
-Absolutely.AwesomeChat.Net- *** Notice -- Client connecting at OWC.Awesomechat.Net: scrawl27 (fathic@data.searchirc.org)
-Absolutely.AwesomeChat.Net- *** Notice -- Client exiting at OWC.Awesomechat.Net: scrawl27!fathic@data.searchirc.org (Outrageously Wicked Chat at AwesomeChat.Net scrawl27)
-> *ozzy* -djtime [censored] yea
<@ozzy> xxxxxx xxxxxxDexter
<@ozzy> Checking channel oper status
<@ozzy> Check channels in foreach for Dexter on #DextersLaboratory
<@ozzy> this is returning 0
<@ozzy> bot has a status of 1
<@ozzy> returned back from sub routine is



Quote:
* Attempting to rejoin channel #DextersLaboratory
* Rejoined channel #DextersLaboratory
* Set by droolin on Mon Aug 13 20:54:00
* ChanServ sets mode: +oq Dexter Dexter
-> *ozzy* -djtime [censored] yea
-ozzy- You have 1 note waiting.
-ozzy- For a list: /MSG ozzy NOTES <pass> INDEX
<@ozzy> xxxxx xxxxx Dexter
<@ozzy> Checking channel oper status
<@ozzy> Check channels in foreach for Dexter on #DextersLaboratory
<@ozzy> this is returning 1
<@ozzy> bot has a status of 1
<@ozzy> Dexter is oppered in channel #DextersLaboratory
<@ozzy> returned back from sub routine is 1


Thanks in advance

droolin
Back to top
View user's profile Send private message Visit poster's website
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Wed Sep 05, 2007 11:52 pm    Post subject: Reply with quote

When the bot immediately joins, it needs time to update its internal channel-memberlist. If you immediately on join execute that script it would return some false values (some ops, would not be detected as ops), it has happened with my bot on a few occasions.

This is rare however and is mostly more favourable on channels which have large usercounts, so it takes the bot time to update the memberlist.

So my conclusion for this would be, not to immediately execute the command after the bot connects to the server and starts joining its channels.

- Give a small delay of 5-10 seconds after you execute the command --> If you restarted the bot (bot connected to irc server and rejoined the channel)
- You normally don't need to give a delay if you made the bot cycle the channel.

Hence, on connect if the bot has alot of channels to join it takes time for it to retrieve channel modes, memberlists and can hence sometimes not-detect ops/voices if you immediately request something from it after it joins.
_________________
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber