On Mon, 2004-04-19 at 02:45, Ciro wrote:
> Is there a way to "chain" post() calls, so that I can ensure that these 
> two get done in the right order? (Won't deny it being highly useful 
> elsewhere as well ;) )

Seems my private email to you is bouncing because of a spam blacklist :/

Here's the contents anyway:

The fact that PoCo::IRC forks and returns back to your caller doesn't
mean that the events will be executed in a different order.  Posted
events are in a FIFO (First In First Out) queue.  So the nickserv
privmsg will be sent before the chanserv privmsg if that's the order you
post them.  The ircd in turn will receive them in the correct order. 
Try setting 'options' => { 'trace' => 1 } when creating your POE session
and watch what's happening with your events.  

As far as your problem with chanserv not recognizing your privileges -
it might be that your services package is to blame for not updating it's
internal structure after you identify before it gets your chanserv
request.  I'd recommend a back-off timer, or a handler that waits for
the nickserv identified message to come back before sending the chanserv
commands.  You could probably also just get away with sending the
nickserv identify off before you join a channel, and when you receive
the irc_names (forgot the numeric, 353 I think...) event when you join
then fire off the chanserv message.

Shaun


Reply via email to