Sorry about this. Thanks to the responses I got here and in #perl on 
freenode, I managed to get most of what I was trying, by way of a very 
ugly kludge. Now I've found an only slightly related bug.

I have the following two statements ($self->sendmsg is a wrapper for 
PoCo::IRC's 'privmsg' method)

$self->sendmsg($server, $nickserv, "identify $nickservpass");
$self->sendmsg($server, $chanserv, "op $channel $chansrvpass");

If I understand correctly, each of these (more accurately, each of the 
$poe_kernel->post() they call) actually forks it out, then immediately 
continues on with the session. I'm working on the assumption that that is 
(roughly) how it works.

The problem seems to come in at the nanosecond level. Sometimes the 
nickserv command finishes first, thus allowing the chanserv command to be 
successful. Sometimes the chanserv command finishes first, and fails 
because the nick isn't identified. 

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 ;) )

Thanks!

-C

-- 
"You know how dumb the average Luser is? Well, half of 'em are dumber 
than that" -- The Roadie in NANAE

Reply via email to