Internet Relay Chat client protocol, with sprinkles.
In addition to providing an interface for an IRC client protocol, this
class also contains reasonable implementations of many common CTCP
methods.
TODO
-
Limit the length of messages sent (because the IRC server
probably does).
-
Add flood protection/rate limiting for my CTCP replies.
-
NickServ cooperation. (a mix-in?)
-
Heartbeat. The transport may die in such a way that it does not
realize it is dead until it is written to. Sending something (like
"PING this.irc-host.net") during idle peroids would
alleviate that. If you're concerned with the stability of the host
as well as that of the transport, you might care to watch for the
corresponding PONG.
| Instance Variables | nickname | Nickname the client will use.
|
| password | Password used to log on to the server. May be None.
|
| realname | Supplied to the server during login as the "Real name" or
"ircname". May be None.
|
| username | Supplied to the server during login as the "User name". May
be None
|
| userinfo | Sent in reply to a USERINFO CTCP query. If None, no
USERINFO reply will be sent. "This is used to transmit a string
which is settable by the user (and never should be set by the
client)."
|
| fingerReply | Sent in reply to a FINGER CTCP query. If None, no FINGER
reply will be sent.
(type: Callable or String
) |
| versionName | CTCP VERSION reply, client name. If None, no VERSION
reply will be sent.
|
| versionNum | CTCP VERSION reply, client version,
|
| versionEnv | CTCP VERSION reply, environment the client is running in.
|
| sourceURL | CTCP SOURCE reply, a URL where the source code of this client may be
found. If None, no SOURCE reply will be sent.
|
| lineRate | Minimum delay between lines sent to the server. If None,
no delay will be imposed.
(type: Number of Seconds.
) |
| Line # |
Kind |
Name |
Docs |
| 567 |
Method |
_reallySendLine |
Undocumented |
| 570 |
Method |
sendLine |
Sends a line to the other end of the connection.
|
| 578 |
Method |
_sendLine |
Undocumented |
| 593 |
Method |
created |
Called with creation date information about the server, usually at
logon.
|
| 600 |
Method |
yourHost |
Called with daemon information about the server, usually at logon.
|
| 607 |
Method |
myInfo |
Called with information about the server, usually at logon.
|
| 623 |
Method |
luserClient |
Called with information about the number of connections, usually at
logon.
|
| 631 |
Method |
bounce |
Called with information about where the client should reconnect.
|
| 639 |
Method |
isupport |
Called with various information about what the server supports.
|
| 647 |
Method |
luserChannels |
Called with the number of channels existant on the server.
|
| 653 |
Method |
luserOp |
Called with the number of ops logged on to the server.
|
| 659 |
Method |
luserMe |
Called with information about the server connected to.
|
| 669 |
Method |
privmsg |
Called when I have a message from a user to me or a channel.
|
| 674 |
Method |
joined |
Called when I finish joining a channel.
|
| 681 |
Method |
left |
Called when I have left a channel.
|
| 688 |
Method |
noticed |
Called when I have a notice from a user to me or a channel.
|
| 703 |
Method |
modeChanged |
Called when a channel's modes are changed
|
| 724 |
Method |
pong |
Called with the results of a CTCP PING query.
|
| 729 |
Method |
signedOn |
Called after sucessfully signing on to the server.
|
| 734 |
Method |
kickedFrom |
Called when I am kicked from a channel.
|
| 739 |
Method |
nickChanged |
Called when my nick has been changed.
|
| 747 |
Method |
userJoined |
Called when I see another user joining a channel.
|
| 752 |
Method |
userLeft |
Called when I see another user leaving a channel.
|
| 757 |
Method |
userQuit |
Called when I see another user disconnect from the network.
|
| 762 |
Method |
userKicked |
Called when I observe someone else being kicked from a channel.
|
| 767 |
Method |
action |
Called when I see a user perform an ACTION on a channel.
|
| 772 |
Method |
topicUpdated |
In channel, user changed the topic to newTopic.
|
| 779 |
Method |
userRenamed |
A user changed their name from oldname to newname.
|
| 786 |
Method |
receivedMOTD |
I received a message-of-the-day banner from the server.
|
| 801 |
Method |
join |
Undocumented |
| 808 |
Method |
leave |
Undocumented |
| 815 |
Method |
kick |
Undocumented |
| 824 |
Method |
topic |
Attempt to set the topic of the given channel, or ask what it is.
|
| 838 |
Method |
mode |
Change the modes on a user or channel.
|
| 853 |
Method |
say |
Undocumented |
| 857 |
Method |
msg |
Send a message to a user or channel.
|
| 892 |
Method |
notice |
Undocumented |
| 895 |
Method |
away |
Undocumented |
| 898 |
Method |
register |
Undocumented |
| 906 |
Method |
setNick |
Undocumented |
| 910 |
Method |
quit |
Undocumented |
| 915 |
Method |
me |
Strike a pose.
|
| 924 |
Method |
ping |
Measure round-trip delay to another IRC client.
|
| 946 |
Method |
dccSend |
Undocumented |
| 972 |
Method |
dccResume |
Send a DCC RESUME request to another user.
|
| 977 |
Method |
dccAcceptResume |
Send a DCC ACCEPT response to clients who have requested a resume.
|
| 987 |
Method |
irc_ERR_NICKNAMEINUSE |
Undocumented |
| 990 |
Method |
irc_ERR_PASSWDMISMATCH |
Undocumented |
| 993 |
Method |
irc_RPL_WELCOME |
Undocumented |
| 996 |
Method |
irc_JOIN |
Undocumented |
| 1004 |
Method |
irc_PART |
Undocumented |
| 1012 |
Method |
irc_QUIT |
Undocumented |
| 1016 |
Method |
irc_MODE |
Undocumented |
| 1023 |
Method |
irc_PING |
Undocumented |
| 1026 |
Method |
irc_PRIVMSG |
Undocumented |
| 1045 |
Method |
irc_NOTICE |
Undocumented |
| 1062 |
Method |
irc_NICK |
Undocumented |
| 1069 |
Method |
irc_KICK |
Kicked? Who? Not me, I hope.
|
| 1082 |
Method |
irc_TOPIC |
Someone in the channel set the topic.
|
| 1090 |
Method |
irc_RPL_TOPIC |
I just joined the channel, and the server is telling me the current
topic.
|
| 1098 |
Method |
irc_RPL_NOTOPIC |
Undocumented |
| 1104 |
Method |
irc_RPL_MOTDSTART |
Undocumented |
| 1109 |
Method |
irc_RPL_MOTD |
Undocumented |
| 1114 |
Method |
irc_RPL_ENDOFMOTD |
Undocumented |
| 1117 |
Method |
irc_RPL_CREATED |
Undocumented |
| 1120 |
Method |
irc_RPL_YOURHOST |
Undocumented |
| 1123 |
Method |
irc_RPL_MYINFO |
Undocumented |
| 1129 |
Method |
irc_RPL_BOUNCE |
Undocumented |
| 1136 |
Method |
irc_RPL_LUSERCLIENT |
Undocumented |
| 1139 |
Method |
irc_RPL_LUSEROP |
Undocumented |
| 1145 |
Method |
irc_RPL_LUSERCHANNELS |
Undocumented |
| 1151 |
Method |
irc_RPL_LUSERME |
Undocumented |
| 1154 |
Method |
irc_unknown |
Undocumented |
| 1160 |
Method |
ctcpQuery |
Dispatch method for any CTCP queries received.
|
| 1170 |
Method |
ctcpQuery_ACTION |
Undocumented |
| 1173 |
Method |
ctcpQuery_PING |
Undocumented |
| 1177 |
Method |
ctcpQuery_FINGER |
Undocumented |
| 1192 |
Method |
ctcpQuery_VERSION |
Undocumented |
| 1204 |
Method |
ctcpQuery_SOURCE |
Undocumented |
| 1217 |
Method |
ctcpQuery_USERINFO |
Undocumented |
| 1225 |
Method |
ctcpQuery_CLIENTINFO |
A master index of what CTCP tags this client knows.
|
| 1256 |
Method |
ctcpQuery_ERRMSG |
Undocumented |
| 1263 |
Method |
ctcpQuery_TIME |
Undocumented |
| 1272 |
Method |
ctcpQuery_DCC |
Initiate a Direct Client Connection
|
| 1292 |
Method |
dcc_SEND |
Undocumented |
| 1316 |
Method |
dcc_ACCEPT |
Undocumented |
| 1329 |
Method |
dcc_RESUME |
Undocumented |
| 1341 |
Method |
dcc_CHAT |
Undocumented |
| 1359 |
Method |
dccDoSend |
Called when I receive a DCC SEND offer from a client.
|
| 1370 |
Method |
dccDoResume |
Called when a client is trying to resume an offered file
|
| 1376 |
Method |
dccDoAcceptResume |
Called when a client has verified and accepted a DCC resume
|
| 1381 |
Method |
dccDoChat |
Undocumented |
| 1394 |
Method |
ctcpUnknownQuery |
Undocumented |
| 1403 |
Method |
ctcpMakeReply |
Send one or more extended messages as a CTCP reply.
|
| 1413 |
Method |
ctcpMakeQuery |
Send one or more extended messages as a CTCP query.
|
| 1424 |
Method |
ctcpReply |
Dispatch method for any CTCP replies received.
|
| 1434 |
Method |
ctcpReply_PING |
Undocumented |
| 1443 |
Method |
ctcpUnknownReply |
Called when a fitting ctcpReply_ method is not found.
|
| 1456 |
Method |
badMessage |
When I get a message that's so broken I can't use it.
|
| 1464 |
Method |
quirkyMessage |
This is called when I receive a message which is peculiar,
|
| 1472 |
Method |
connectionMade |
Called when a connection is made.
|
| 1477 |
Method |
dataReceived |
Called whenever data is received.
|
| 1480 |
Method |
lineReceived |
Override this for when each line is received.
|
| 1491 |
Method |
handleCommand |
Determine the function to call for the given command and call
|
| 1505 |
Method |
__getstate__ |
Undocumented |