[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: delay in perlscripts?
Matt Heckaman wrote:
> Yes, but how would I make that handler active ONLY when I type the command
> that initiates the whole thing? I wouldn't want to add a handler for
> invite to be on all the time, only when I actually call the command that
> tells the bot to invite and starts the sequence.
Well, the problem here is, that you will have to have the handler... the trick
is this:
add a handler for the invite
set up a flag that says whether to handle the invite or not (Use a global
variable)
when the invite handler gets called, check the flag
process if necessary and clear the flag.
now, when the command is called that initiates the whole thing will send the
invite request... and set the flag to handle the invite.
your first lines of the invite handler could be as simple as:
return undef unless $Handle_Invite_Flag;
$Handle_Invite_Flag = undef;
# code to process the invite follows
--
Mike Guidero [KD7ILU] - Genius in disguise.
*** aibohphobia, n., The fear of palindromes. ***
PGP Public Key: (Unavailable at this time)
Fingerprint : DD87 C663 1767 B11F 1EDE D2AA 0DD1 89C6 56D7 109A
-
XChat-discuss: mailing list for XChat users
Archive: http://mail.nl.linux.org/lists/
Posted By: Mike Guidero <kymermosst@penguinpowered.com>