

connect ()Īlternatively, some clients may still want to decode the input using aĭifferent encoding. Overridden before the connection is established): server = irc. The buffer may be overridden on a per-instance basis (as long as it’s Will avoid UnicodeDecodeError in all cases (but may produce unexpectedīehavior if an IRC user is using another encoding). The LenientDecodingLineBuffer attempts UTF-8 but falls back to latin-1, which ServerConnection by overriding the class attribute.įor example: from jaraco.stream import buffer irc. The buffer_class attribute may be assigned for all instances of Re-assigned with another class, following the interface of buffer.LineBuffer. Input stream, using the buffer module in jaraco.stream. ServerConnection determines which class is used for buffering lines from the Library provides options to customize decoding of input by customizing the Since assuming UTF-8 is not reasonable in the general case, the IRC

UTF-8, even though the IRC spec stipulates that no specific encoding can beĮxpected. For example, use \\#test orīy default, the IRC library attempts to decode all incoming streams as NOTE: If you’re running one of the examples on a unix command line, you need Invitations and echos back sent DCC chat messages. The bot enters a channel and listens for commands in servermap connects to an IRC server,įinds out what other IRC servers there are in the net and printsĪ tree-like map of their interconnections.Īn example bot that uses the SingleServerIRCBot class from Same as above, but using the AioSimpleIRCClient classĪnother simple example. Same as above, but uses the asyncio-based event loop inĪioReactor instead of the select() based Reactor.

The same as above, but using the SimpleIRCClient class. Text from stdin and writes it to a specified user or channel on
OSU BEST IRC CLIENT HOW TO
Invoke the server with python -m irc.server.Įxample scripts in the scripts directory:Ī simple example of how to use the IRC client. Interface/API is otherwise functionally identical to the classesĪ basic IRC server implementation. Python 3’s native asyncio library for the core event loop. Use it at your own riskĪll the functionality of the above library, but utilizing
OSU BEST IRC CLIENT CODE
Read the code along with comments andĭocstrings to get a grip of what it does. The following modules might be of interest: Understand the example program irccat, which is included in the I think the best way to get started is to read and Unfortunately, this library isn’t as well-documented as I would like
