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?
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.
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.
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.