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.
There's a little dance you can do to send a quit message and log out gracefully. It goes like this:
- Send the QUIT command to the IRC server, with your quit message.
- Wait for irc_disconnected to come back.
- Unregister all events. This is like the ("register", "all") you probably posted near the connect command, but replace "register" with "unregister". Once POE::Component::IRC knows your session isn't interested, it lets you go and things shut down.
Todo: Supply some code.