DOWNLOAD PYTHON IRCLIB
Parsed This one is used to receive parsed irc commands, sent to the client by the server. Abstraction of the IRC protocol. This is used to see when the client is connected state 4. This class represents a single connection to an IRC server a single client. It provides an event-driven IRC client framework. The rest of the program just sets the IRC client in action, connecting to the server you specified and doing whatever you told it to do in this case, nothing. The program now starts by defining the event handlers.
Uploader: | Dimi |
Date Added: | 26 October 2016 |
File Size: | 61.29 Mb |
Operating Systems: | Windows NT/2000/XP/2003/2003/7/8/10 MacOS 10/X |
Downloads: | 96367 |
Price: | Free* [*Free Regsitration Required] |
Take a look at the following example: Again, it's probably best to demonstrate this by adding some functionality to our previous example:.
Abstraction of the IRC protocol. Having an IRC bot is fantastic, but what's the point if it doesn't do anything?
Hack 37 IRC with Python and IRCLib
State This handler lets you check the bot's current connection state. This is probably the most useful event. The bot ircpib a channel and listens for commands in private messages or channel traffic. You have several options to install the IRC project.
Writing clients with IRCLib is really easy. It also has support for extensions so a programmer can add his own events and functions to the library. Whenever this message is received, the bot will send the message "Hello World" back to the channel.
IRC client library for Python
Read the code along with comments and irvlib to get a grip of what it does. The first line of this example imports the irc module. Data is not written asynchronously to the server and DCC peersi. Use it at your own risk and read the source, Luke! Example scripts in the scripts directory: If you want to learn about writing an extension for IRCLib, this ircllb detailed in the following hack.
python-irclib : Xenial () : Ubuntu
This library is intended to encapsulate the IRC protocol at a quite low level. Functions can be registered to execute at specified times by the event-loop. You can download project releases from PyPI. Event handlers are functions that are called each time an event of a specific type occurs.
This one is used to print whatever the client is reading from the server. This one is used to receive parsed irc commands, sent to the client by the server.
The latest IRCLib can be downloaded from http: Reading from and writing to IRC server sockets are normally done by an internal select loop, but the select ing may be done by an external main loop.
The rest of the program just sets the IRC client in action, connecting to the server you specified and doing whatever you told it to do in this case, nothing. This is useful for debugging purposes. To find out how to install modules, take a look at the excellent documentation available at http: A simple example of how to use the IRC client.
You need this line to be able to use any of IRCLib's functions and classes. The following files might be of interest: In this case, the bot is waiting to receive a message saying "hi" in the channel irchacks.
You can create as many connections as you like. The main features of the Ircilb client framework are: Tests are continuously run using Travis-CI.
Комментарии
Отправить комментарий