Home | Trees | Index | Help |
|
---|
Package twisted :: Package protocols :: Module irc |
|
Internet Relay Chat Protocol for client and server.
Stability: semi-stable.The way the IRCClient class works here encourages people to implement IRC clients by subclassing the ephemeral protocol class, and it tends to end up with way more state than it should for an object which will be destroyed as soon as the TCP transport drops. Someone oughta do something about that, ya know?
The DCC support needs to have more hooks for the client for it to be able to ask the user things like "Do you want to accept this session?" and "Transfer #2 is 67% done." and otherwise manage the DCC sessions.
Test coverage needs to be better.Author: Kevin Turner
Classes | |
---|---|
DccChat |
Direct Client Connection protocol type CHAT. |
DccChatFactory |
|
DccFileReceive |
Higher-level coverage for getting a file from DCC SEND. |
DccFileReceiveBasic |
Bare protocol to receive a Direct Client Connection SEND stream. |
DccSendFactory |
|
DccSendProtocol |
Protocol for an outgoing Direct Client Connection SEND. |
IRC |
Internet Relay Chat server protocol. |
IRCClient |
Internet Relay Chat client protocol, with sprinkles. |
Exceptions | |
---|---|
IRCBadMessage |
|
IRCPasswordMismatch |
Function Summary | |
---|---|
ctcpDequote(s)
| |
Extract CTCP data from a string. | |
ctcpQuote(s)
| |
Return string | |
Given the data chunk from a DCC query, return a descriptive string. | |
dccParseAddress(address)
| |
I'll try my damndest to determine the size of this file object. | |
lowDequote(s)
| |
lowQuote(s)
| |
Breaks a message from an IRC server into its prefix, command, and arguments. | |
I break a message into multiple lines. |
Variable Summary | |
---|---|
str |
__version__ = '1.94'
|
str |
CHANNEL_PREFIXES = '&#!+'
|
str |
CR = '\r'
|
str |
ERR_ALREADYREGISTRED = '462'
|
str |
ERR_BADCHANMASK = '476'
|
str |
ERR_BADCHANNELKEY = '475'
|
str |
ERR_BADMASK = '415'
|
str |
ERR_BANLISTFULL = '478'
|
str |
ERR_BANNEDFROMCHAN = '474'
|
str |
ERR_CANNOTSENDTOCHAN = '404'
|
str |
ERR_CANTKILLSERVER = '483'
|
str |
ERR_CHANNELISFULL = '471'
|
str |
ERR_CHANOPRIVSNEEDED = '482'
|
str |
ERR_ERRONEUSNICKNAME = '432'
|
str |
ERR_FILEERROR = '424'
|
str |
ERR_INVITEONLYCHAN = '473'
|
str |
ERR_KEYSET = '467'
|
str |
ERR_NEEDMOREPARAMS = '461'
|
str |
ERR_NICKCOLLISION = '436'
|
str |
ERR_NICKNAMEINUSE = '433'
|
str |
ERR_NOADMININFO = '423'
|
str |
ERR_NOCHANMODES = '477'
|
str |
ERR_NOLOGIN = '444'
|
str |
ERR_NOMOTD = '422'
|
str |
ERR_NONICKNAMEGIVEN = '431'
|
str |
ERR_NOOPERHOST = '491'
|
str |
ERR_NOORIGIN = '409'
|
str |
ERR_NOPERMFORHOST = '463'
|
str |
ERR_NOPRIVILEGES = '481'
|
str |
ERR_NORECIPIENT = '411'
|
str |
ERR_NOSERVICEHOST = '492'
|
str |
ERR_NOSUCHCHANNEL = '403'
|
str |
ERR_NOSUCHNICK = '401'
|
str |
ERR_NOSUCHSERVER = '402'
|
str |
ERR_NOSUCHSERVICE = '408'
|
str |
ERR_NOTEXTTOSEND = '412'
|
str |
ERR_NOTONCHANNEL = '442'
|
str |
ERR_NOTOPLEVEL = '413'
|
str |
ERR_NOTREGISTERED = '451'
|
str |
ERR_PASSWDMISMATCH = '464'
|
str |
ERR_RESTRICTED = '484'
|
str |
ERR_SUMMONDISABLED = '445'
|
str |
ERR_TOOMANYCHANNELS = '405'
|
str |
ERR_TOOMANYTARGETS = '407'
|
str |
ERR_UMODEUNKNOWNFLAG = '501'
|
str |
ERR_UNAVAILRESOURCE = '437'
|
str |
ERR_UNIQOPPRIVSNEEDED = '485'
|
str |
ERR_UNKNOWNCOMMAND = '421'
|
str |
ERR_UNKNOWNMODE = '472'
|
str |
ERR_USERNOTINCHANNEL = '441'
|
str |
ERR_USERONCHANNEL = '443'
|
str |
ERR_USERSDISABLED = '446'
|
str |
ERR_USERSDONTMATCH = '502'
|
str |
ERR_WASNOSUCHNICK = '406'
|
str |
ERR_WILDTOPLEVEL = '414'
|
str |
ERR_YOUREBANNEDCREEP = '465'
|
str |
ERR_YOUWILLBEBANNED = '466'
|
str |
LF = '\n'
|
str |
M_QUOTE = '\x10'
|
dict |
mDequoteTable = {'0': '\x00', 'r': '\r', '\x10': '\x10',...
|
SRE_Pattern |
mEscape_re = .
|
dict |
mQuoteTable = {'\x00': '\x100', '\n': '\x10n', '\r': '\x...
|
str |
NL = '\n'
|
str |
NUL = '\x00'
|
dict |
numeric_to_symbolic = {'347': 'RPL_ENDOFINVITELIST', '21...
|
str |
RPL_ADMINEMAIL = '259'
|
str |
RPL_ADMINLOC = '258'
|
str |
RPL_ADMINME = '256'
|
str |
RPL_AWAY = '301'
|
str |
RPL_BANLIST = '367'
|
str |
RPL_BOUNCE = '005'
|
str |
RPL_CHANNELMODEIS = '324'
|
str |
RPL_CREATED = '003'
|
str |
RPL_ENDOFBANLIST = '368'
|
str |
RPL_ENDOFEXCEPTLIST = '349'
|
str |
RPL_ENDOFINFO = '374'
|
str |
RPL_ENDOFINVITELIST = '347'
|
str |
RPL_ENDOFLINKS = '365'
|
str |
RPL_ENDOFMOTD = '376'
|
str |
RPL_ENDOFNAMES = '366'
|
str |
RPL_ENDOFSTATS = '219'
|
str |
RPL_ENDOFUSERS = '394'
|
str |
RPL_ENDOFWHO = '315'
|
str |
RPL_ENDOFWHOIS = '318'
|
str |
RPL_ENDOFWHOWAS = '369'
|
str |
RPL_EXCEPTLIST = '348'
|
str |
RPL_INFO = '371'
|
str |
RPL_INVITELIST = '346'
|
str |
RPL_INVITING = '341'
|
str |
RPL_ISON = '303'
|
str |
RPL_LINKS = '364'
|
str |
RPL_LIST = '322'
|
str |
RPL_LISTEND = '323'
|
str |
RPL_LISTSTART = '321'
|
str |
RPL_LUSERCHANNELS = '254'
|
str |
RPL_LUSERCLIENT = '251'
|
str |
RPL_LUSERME = '255'
|
str |
RPL_LUSEROP = '252'
|
str |
RPL_LUSERUNKNOWN = '253'
|
str |
RPL_MOTD = '372'
|
str |
RPL_MOTDSTART = '375'
|
str |
RPL_MYINFO = '004'
|
str |
RPL_NAMREPLY = '353'
|
str |
RPL_NOTOPIC = '331'
|
str |
RPL_NOUSERS = '395'
|
str |
RPL_NOWAWAY = '306'
|
str |
RPL_REHASHING = '382'
|
str |
RPL_SERVLIST = '234'
|
str |
RPL_SERVLISTEND = '235'
|
str |
RPL_STATSCOMMANDS = '212'
|
str |
RPL_STATSLINKINFO = '211'
|
str |
RPL_STATSOLINE = '243'
|
str |
RPL_STATSUPTIME = '242'
|
str |
RPL_SUMMONING = '342'
|
str |
RPL_TIME = '391'
|
str |
RPL_TOPIC = '332'
|
str |
RPL_TRACECLASS = '209'
|
str |
RPL_TRACECONNECTING = '201'
|
str |
RPL_TRACEEND = '262'
|
str |
RPL_TRACEHANDSHAKE = '202'
|
str |
RPL_TRACELINK = '200'
|
str |
RPL_TRACELOG = '261'
|
str |
RPL_TRACENEWTYPE = '208'
|
str |
RPL_TRACEOPERATOR = '204'
|
str |
RPL_TRACERECONNECT = '210'
|
str |
RPL_TRACESERVER = '206'
|
str |
RPL_TRACESERVICE = '207'
|
str |
RPL_TRACEUNKNOWN = '203'
|
str |
RPL_TRACEUSER = '205'
|
str |
RPL_TRYAGAIN = '263'
|
str |
RPL_UMODEIS = '221'
|
str |
RPL_UNAWAY = '305'
|
str |
RPL_UNIQOPIS = '325'
|
str |
RPL_USERHOST = '302'
|
str |
RPL_USERS = '393'
|
str |
RPL_USERSSTART = '392'
|
str |
RPL_VERSION = '351'
|
str |
RPL_WELCOME = '001'
|
str |
RPL_WHOISCHANNELS = '319'
|
str |
RPL_WHOISIDLE = '317'
|
str |
RPL_WHOISOPERATOR = '313'
|
str |
RPL_WHOISSERVER = '312'
|
str |
RPL_WHOISUSER = '311'
|
str |
RPL_WHOREPLY = '352'
|
str |
RPL_WHOWASUSER = '314'
|
str |
RPL_YOUREOPER = '381'
|
str |
RPL_YOURESERVICE = '383'
|
str |
RPL_YOURHOST = '002'
|
str |
SPC = ' '
|
dict |
symbolic_to_numeric = {'RPL_ENDOFINVITELIST': '347', 'RP...
|
str |
X_DELIM = '\x01'
|
str |
X_QUOTE = '\\'
|
dict |
xDequoteTable = {'a': '\x01', '\\': '\\'}
|
SRE_Pattern |
xEscape_re = \\.
|
dict |
xQuoteTable = {'\x01': '\\a', '\\': '\\\\'}
|
Function Details |
---|
ctcpExtract(message)Extract CTCP data from a string. Returns a dictionary with two items:
|
ctcpStringify(messages)
|
dccDescribe(data)Given the data chunk from a DCC query, return a descriptive string. |
fileSize(file)I'll try my damndest to determine the size of this file object. |
parsemsg(s)Breaks a message from an IRC server into its prefix, command, and arguments. |
split(str, length=80)I break a message into multiple lines. I prefer to break at whitespace near str[length]. I also break at \n.
|
Variable Details |
---|
__version__
|
CHANNEL_PREFIXES
|
CR
|
ERR_ALREADYREGISTRED
|
ERR_BADCHANMASK
|
ERR_BADCHANNELKEY
|
ERR_BADMASK
|
ERR_BANLISTFULL
|
ERR_BANNEDFROMCHAN
|
ERR_CANNOTSENDTOCHAN
|
ERR_CANTKILLSERVER
|
ERR_CHANNELISFULL
|
ERR_CHANOPRIVSNEEDED
|
ERR_ERRONEUSNICKNAME
|
ERR_FILEERROR
|
ERR_INVITEONLYCHAN
|
ERR_KEYSET
|
ERR_NEEDMOREPARAMS
|
ERR_NICKCOLLISION
|
ERR_NICKNAMEINUSE
|
ERR_NOADMININFO
|
ERR_NOCHANMODES
|
ERR_NOLOGIN
|
ERR_NOMOTD
|
ERR_NONICKNAMEGIVEN
|
ERR_NOOPERHOST
|
ERR_NOORIGIN
|
ERR_NOPERMFORHOST
|
ERR_NOPRIVILEGES
|
ERR_NORECIPIENT
|
ERR_NOSERVICEHOST
|
ERR_NOSUCHCHANNEL
|
ERR_NOSUCHNICK
|
ERR_NOSUCHSERVER
|
ERR_NOSUCHSERVICE
|
ERR_NOTEXTTOSEND
|
ERR_NOTONCHANNEL
|
ERR_NOTOPLEVEL
|
ERR_NOTREGISTERED
|
ERR_PASSWDMISMATCH
|
ERR_RESTRICTED
|
ERR_SUMMONDISABLED
|
ERR_TOOMANYCHANNELS
|
ERR_TOOMANYTARGETS
|
ERR_UMODEUNKNOWNFLAG
|
ERR_UNAVAILRESOURCE
|
ERR_UNIQOPPRIVSNEEDED
|
ERR_UNKNOWNCOMMAND
|
ERR_UNKNOWNMODE
|
ERR_USERNOTINCHANNEL
|
ERR_USERONCHANNEL
|
ERR_USERSDISABLED
|
ERR_USERSDONTMATCH
|
ERR_WASNOSUCHNICK
|
ERR_WILDTOPLEVEL
|
ERR_YOUREBANNEDCREEP
|
ERR_YOUWILLBEBANNED
|
LF
|
M_QUOTE
|
mDequoteTable
|
mEscape_re
|
mQuoteTable
|
NL
|
NUL
|
RPL_ADMINEMAIL
|
RPL_ADMINLOC
|
RPL_ADMINME
|
RPL_AWAY
|
RPL_BANLIST
|
RPL_BOUNCE
|
RPL_CHANNELMODEIS
|
RPL_CREATED
|
RPL_ENDOFBANLIST
|
RPL_ENDOFEXCEPTLIST
|
RPL_ENDOFINFO
|
RPL_ENDOFINVITELIST
|
RPL_ENDOFLINKS
|
RPL_ENDOFMOTD
|
RPL_ENDOFNAMES
|
RPL_ENDOFSTATS
|
RPL_ENDOFUSERS
|
RPL_ENDOFWHO
|
RPL_ENDOFWHOIS
|
RPL_ENDOFWHOWAS
|
RPL_EXCEPTLIST
|
RPL_INFO
|
RPL_INVITELIST
|
RPL_INVITING
|
RPL_ISON
|
RPL_LINKS
|
RPL_LIST
|
RPL_LISTEND
|
RPL_LISTSTART
|
RPL_LUSERCHANNELS
|
RPL_LUSERCLIENT
|
RPL_LUSERME
|
RPL_LUSEROP
|
RPL_LUSERUNKNOWN
|
RPL_MOTD
|
RPL_MOTDSTART
|
RPL_MYINFO
|
RPL_NAMREPLY
|
RPL_NOTOPIC
|
RPL_NOUSERS
|
RPL_NOWAWAY
|
RPL_REHASHING
|
RPL_SERVLIST
|
RPL_SERVLISTEND
|
RPL_STATSCOMMANDS
|
RPL_STATSLINKINFO
|
RPL_STATSOLINE
|
RPL_STATSUPTIME
|
RPL_SUMMONING
|
RPL_TIME
|
RPL_TOPIC
|
RPL_TRACECLASS
|
RPL_TRACECONNECTING
|
RPL_TRACEEND
|
RPL_TRACEHANDSHAKE
|
RPL_TRACELINK
|
RPL_TRACELOG
|
RPL_TRACENEWTYPE
|
RPL_TRACEOPERATOR
|
RPL_TRACERECONNECT
|
RPL_TRACESERVER
|
RPL_TRACESERVICE
|
RPL_TRACEUNKNOWN
|
RPL_TRACEUSER
|
RPL_TRYAGAIN
|
RPL_UMODEIS
|
RPL_UNAWAY
|
RPL_UNIQOPIS
|
RPL_USERHOST
|
RPL_USERS
|
RPL_USERSSTART
|
RPL_VERSION
|
RPL_WELCOME
|
RPL_WHOISCHANNELS
|
RPL_WHOISIDLE
|
RPL_WHOISOPERATOR
|
RPL_WHOISSERVER
|
RPL_WHOISUSER
|
RPL_WHOREPLY
|
RPL_WHOWASUSER
|
RPL_YOUREOPER
|
RPL_YOURESERVICE
|
RPL_YOURHOST
|
SPC
|
symbolic_to_numeric
|
X_DELIM
|
X_QUOTE
|
xDequoteTable
|
xEscape_re
|
xQuoteTable
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.0 on Sat May 15 20:08:10 2004 | http://epydoc.sf.net |