logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

POE::Component::IRC::Cookbook::Disconnecting - How to disconnect gracefully with PoCo-IRC

Author

       Rocco Caputo and Hinrik Örn Sigurðsson.

perl v5.32.1                                       2021-09-30             POE::Component:...::Disconnecting(3pm)

Description

       There are two ways you can shut down an IRC bot/client. The quick and dirty way is rather simple:

        exit;

       It exits the program, shutting down the socket, and everybody online sees yet another "Connection reset
       by peer" or "Remote end closed the socket" or something.

       As of version 6.50, all you need to do in order to shut down gracefully is to send a "shutdown" event to
       the IRC component.  It will make sure your quit message (if any) gets delivered, and will forcibly
       disconnect if there are any problems (faulty server or network issues). After doing this, it will
       unregister all sessions and clean up after itself.

       If you want to do something more elaborate on your own, take a look at the following documentation:
       logged in, "connected", "quit", "disconnect", and "unregister".

Name

       POE::Component::IRC::Cookbook::Disconnecting - How to disconnect gracefully with PoCo-IRC

Synopsis

       Shutting down an IRC bot can be quick and messy, or slow and graceful.

See Also