This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Joining / Parting

Old posts that have not been replied to for several years.
Locked
n
nso
Voice
Posts: 19
Joined: Fri Apr 25, 2003 4:45 pm

Joining / Parting

Post by nso »

is there any way to make the bot wait to execute the channel remove untill you have done all the stuff in the middle, if you have add/remove in same proc.. without using timer?
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

that depends on what the stuff in the middle is.
(Your bot will not join the channel before the proc returns if you do a channel add inside a proc.)
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

This has been answered a few times allready.

Are you trying to add a channel, get information about it, then delete the channel?

If yes, then it is not the remove channle that is at issue.

When you add a channel, the channel JOIN is sent, if at all possible (IE, don't if not connect to a server).

The rpoblem now is, all the infromation you may wish to obtain, IE, bans, topic, who is in there and so on, is not available.

Eggdrop has to request and parse this information. This doesn't seem like a issue, until you look at everything else. Your script is currently running, and as such, is preventing the bot from parsing this information (it is usualy waiting in a queue, depending on how fast the script is).

Eggdrop can only do one thing at a time, and currently, it is runnign your script.

The information will not be parsed until after your script removes the channel. Thus eggdrop forgets the info anyway.

You would need to enter a channel. Using a timer, then perform the lookup stuff, then leave the channel.

And, no, there is no other way.
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

ppslim wrote:And, no, there is no other way.
Actually there is...

Make a raw bind on JOIN that sends "WHO #chan" or what ever you might wanna do then return 1.
This should prevent the bot from processing the JOIN any further (making it leave if it's not a valid channel).
Remember to PART when you're done :) (ie. on end of /who #chan)

NAMES and TOPIC is sent to users on join without having to ask for it, so if that's all you're after, just make a couple of raw binds to pick them up and forget about the JOIN thing i mentioned above.
n
nso
Voice
Posts: 19
Joined: Fri Apr 25, 2003 4:45 pm

Post by nso »

Code: Select all

bind raw * JOIN onjoin_proc
 
proc onjoin_proc {from keyword arg} {
        set bannmb1 [chanbans #mychan]
        set bannmb2 [llength $bannmb1]
        putlog $bannmb2]
return 1
}
while testing just trying to get usernmb
not working with what you suggested tho

and yeah, need more then just info, also gonna act on info
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

The internal ban list will only be compiled if you add the channel in a normal fashion, so ditch the raw stuff unless you want to parse the banlist manually.
Locked