|
@@ -0,0 +1,110 @@
|
|
1
|
+irclib -- Internet Relay Chat (IRC) protocol client library
|
|
2
|
+-----------------------------------------------------------
|
|
3
|
+
|
|
4
|
+The home of irclib.py is now:
|
|
5
|
+
|
|
6
|
+ http://python-irclib.sourceforge.net
|
|
7
|
+
|
|
8
|
+This library is intended to encapsulate the IRC protocol at a quite
|
|
9
|
+low level. It provides an event-driven IRC client framework. It has
|
|
10
|
+a fairly thorough support for the basic IRC protocol, CTCP and DCC
|
|
11
|
+connections.
|
|
12
|
+
|
|
13
|
+In order to understand how to make an IRC client, I'm afraid you more
|
|
14
|
+or less must understand the IRC specifications. They are available
|
|
15
|
+here:
|
|
16
|
+
|
|
17
|
+ http://www.irchelp.org/irchelp/rfc/
|
|
18
|
+
|
|
19
|
+Requirements:
|
|
20
|
+
|
|
21
|
+ * Python 2.2 or newer.
|
|
22
|
+
|
|
23
|
+Installation:
|
|
24
|
+
|
|
25
|
+ * Run "python setup.py install" or copy irclib.py and/or ircbot.py
|
|
26
|
+ to an appropriate Python module directory.
|
|
27
|
+
|
|
28
|
+The main features of the IRC client framework are:
|
|
29
|
+
|
|
30
|
+ * Abstraction of the IRC protocol.
|
|
31
|
+ * Handles multiple simultaneous IRC server connections.
|
|
32
|
+ * Handles server PONGing transparently.
|
|
33
|
+ * Messages to the IRC server are done by calling methods on an IRC
|
|
34
|
+ connection object.
|
|
35
|
+ * Messages from an IRC server triggers events, which can be caught
|
|
36
|
+ by event handlers.
|
|
37
|
+ * Reading from and writing to IRC server sockets are normally done
|
|
38
|
+ by an internal select() loop, but the select()ing may be done by
|
|
39
|
+ an external main loop.
|
|
40
|
+ * Functions can be registered to execute at specified times by the
|
|
41
|
+ event-loop.
|
|
42
|
+ * Decodes CTCP tagging correctly (hopefully); I haven't seen any
|
|
43
|
+ other IRC client implementation that handles the CTCP
|
|
44
|
+ specification subtilties.
|
|
45
|
+ * A kind of simple, single-server, object-oriented IRC client class
|
|
46
|
+ that dispatches events to instance methods is included.
|
|
47
|
+ * DCC connection support.
|
|
48
|
+
|
|
49
|
+Current limitations:
|
|
50
|
+
|
|
51
|
+ * The IRC protocol shines through the abstraction a bit too much.
|
|
52
|
+ * Data is not written asynchronously to the server (and DCC peers),
|
|
53
|
+ i.e. the write() may block if the TCP buffers are stuffed.
|
|
54
|
+ * Like most projects, documentation is lacking...
|
|
55
|
+
|
|
56
|
+Unfortunately, this library isn't as well-documented as I would like
|
|
57
|
+it to be. I think the best way to get started is to read and
|
|
58
|
+understand the example program irccat, which is included in the
|
|
59
|
+distribution.
|
|
60
|
+
|
|
61
|
+The following files might be of interest:
|
|
62
|
+
|
|
63
|
+ * irclib.py
|
|
64
|
+
|
|
65
|
+ The library itself. Read the code along with comments and
|
|
66
|
+ docstrings to get a grip of what it does. Use it at your own risk
|
|
67
|
+ and read the source, Luke!
|
|
68
|
+
|
|
69
|
+ * irccat
|
|
70
|
+
|
|
71
|
+ A simple example of how to use irclib.py. irccat reads text from
|
|
72
|
+ stdin and writes it to a specified user or channel on an IRC
|
|
73
|
+ server.
|
|
74
|
+
|
|
75
|
+ * irccat2
|
|
76
|
+
|
|
77
|
+ The same as above, but using the SimpleIRCClient class.
|
|
78
|
+
|
|
79
|
+ * servermap
|
|
80
|
+
|
|
81
|
+ Another simple example. servermap connects to an IRC server,
|
|
82
|
+ finds out what other IRC servers there are in the net and prints
|
|
83
|
+ a tree-like map of their interconnections.
|
|
84
|
+
|
|
85
|
+ * testbot.py
|
|
86
|
+
|
|
87
|
+ An example bot that uses the SingleServerIRCBot class from
|
|
88
|
+ ircbot.py. The bot enters a channel and listens for commands in
|
|
89
|
+ private messages or channel traffic. It also accepts DCC
|
|
90
|
+ invitations and echos back sent DCC chat messages.
|
|
91
|
+
|
|
92
|
+ * dccreceive
|
|
93
|
+
|
|
94
|
+ Receives a file over DCC.
|
|
95
|
+
|
|
96
|
+ * dccsend
|
|
97
|
+
|
|
98
|
+ Sends a file over DCC.
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+NOTE: If you're running one of the examples on a unix command line, you need to escape the # symbol in the channel. For example, use \#test instead of #test.
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+Enjoy.
|
|
105
|
+
|
|
106
|
+Maintainer:
|
|
107
|
+keltus <keltus@users.sourceforge.net>
|
|
108
|
+
|
|
109
|
+Original Author:
|
|
110
|
+Joel Rosdahl <joel@rosdahl.net>
|