Package twisted :: Package words :: Module tendril :: Class TendrilIRC
[frames | no frames]

Class TendrilIRC

               Ephemeral --+
                           |
BaseProtocol --+           |
               |           |
        Protocol --+       |
                   |       |
        LineReceiver --+   |
                       |   |
               IRCClient --+
                           |
                          TendrilIRC


I connect to the IRC server and broker traffic.
Method Summary
  __init__(self)
Create a new Tendril IRC client.
  action(self, user, channel, message)
Speak about a participant in third-person.
  bot_DCC(self, user, params)
Commands for brokering DCC handshakes.
  bot_help(self, user, params)
  bot_msg(self, sender, params)
Pass along a message as a directMessage to a words Participant
  botUnknown(self, user, channel, message)
  connectionLost(self, reason)
When I lose a connection, log out all my IRC participants.
  ctcpQuery_DCC(self, user, channel, data)
Accept DCC handshakes, for passing on to others.
  irc_ERR_BADCHANNELKEY(self, prefix, params)
When I can't get on a channel, report it.
  irc_ERR_BANNEDFROMCHAN(self, prefix, params)
When I can't get on a channel, report it.
  irc_ERR_CHANNELISFULL(self, prefix, params)
When I can't get on a channel, report it.
  irc_ERR_INVITEONLYCHAN(self, prefix, params)
When I can't get on a channel, report it.
  irc_ERR_NOSUCHCHANNEL(self, prefix, params)
When I can't get on a channel, report it.
  irc_ERR_NOTREGISTERED(self, prefix, params)
  irc_ERR_UNAVAILRESOURCE(self, prefix, params)
When I can't get on a channel, report it.
  irc_INVITE(self, prefix, params)
Accept an invitation, if it's in my groupList.
  irc_JOIN(self, prefix, params)
Join IRC user to the corresponding group.
  irc_KICK(self, prefix, params)
Kicked? Who? Not me, I hope.
  irc_NICK(self, prefix, params)
When an IRC user changes their nickname
  irc_PART(self, prefix, params)
Parting IRC members leave the correspoding group.
  irc_QUIT(self, prefix, params)
When a user quits IRC, log out their participant.
  irc_TOPIC(self, prefix, params)
Announce the new topic.
  lineReceived(self, line)
Override this for when each line is received.
  log(self, message, priority)
I need to give Twisted a prioritized logging facility one of these days.
  noticed(self, user, channel, message)
Pass channel notices on to the group.
  privmsg(self, user, channel, message)
Dispatch privmsg as a groupMessage or a command, as appropriate.
  sendLine(self, line)
Send a line through my transport, unless my transport isn't up.
  signedOn(self)
Join my groupList once I've signed on.
    Inherited from IRCClient
  __getstate__(self)
  _sendLine(self)
  away(self, message)
  badMessage(self, line, excType, excValue, tb)
When I get a message that's so broken I can't use it.
  bounce(self, info)
Called with information about where the client should reconnect.
  connectionMade(self)
Called when a connection is made.
  created(self, when)
Called with creation date information about the server, usually at logon.
  ctcpMakeQuery(self, user, messages)
Send one or more extended messages as a CTCP query.
  ctcpMakeReply(self, user, messages)
Send one or more extended messages as a CTCP reply.
  ctcpQuery(self, user, channel, messages)
Dispatch method for any CTCP queries received.
  ctcpQuery_ACTION(self, user, channel, data)
  ctcpQuery_CLIENTINFO(self, user, channel, data)
A master index of what CTCP tags this client knows.
  ctcpQuery_ERRMSG(self, user, channel, data)
  ctcpQuery_FINGER(self, user, channel, data)
  ctcpQuery_PING(self, user, channel, data)
  ctcpQuery_SOURCE(self, user, channel, data)
  ctcpQuery_TIME(self, user, channel, data)
  ctcpQuery_USERINFO(self, user, channel, data)
  ctcpQuery_VERSION(self, user, channel, data)
  ctcpReply(self, user, channel, messages)
Dispatch method for any CTCP replies received.
  ctcpReply_PING(self, user, channel, data)
  ctcpUnknownQuery(self, user, channel, tag, data)
  ctcpUnknownReply(self, user, channel, tag, data)
Called when a fitting ctcpReply_ method is not found.
  dataReceived(self, data)
Protocol.dataReceived.
  dcc_ACCEPT(self, user, channel, data)
  dcc_CHAT(self, user, channel, data)
  dcc_RESUME(self, user, channel, data)
  dcc_SEND(self, user, channel, data)
  dccAcceptResume(self, user, fileName, port, resumePos)
Send a DCC ACCEPT response to clients who have requested a resume.
  dccDoAcceptResume(self, user, file, port, resumePos)
Called when a client has verified and accepted a DCC resume request made by us.
  dccDoChat(self, user, channel, address, port, data)
  dccDoResume(self, user, file, port, resumePos)
Called when a client is trying to resume an offered file via DCC send.
  dccDoSend(self, user, address, port, fileName, size, data)
Called when I receive a DCC SEND offer from a client.
  dccResume(self, user, fileName, port, resumePos)
Send a DCC RESUME request to another user.
  dccSend(self, user, file)
  handleCommand(self, command, prefix, params)
Determine the function to call for the given command and call it with the given arguments.
  irc_ERR_NICKNAMEINUSE(self, prefix, params)
  irc_ERR_PASSWDMISMATCH(self, prefix, params)
  irc_MODE(self, prefix, params)
  irc_NOTICE(self, prefix, params)
  irc_PING(self, prefix, params)
  irc_PRIVMSG(self, prefix, params)
  irc_RPL_BOUNCE(self, prefix, params)
  irc_RPL_CREATED(self, prefix, params)
  irc_RPL_ENDOFMOTD(self, prefix, params)
  irc_RPL_LUSERCHANNELS(self, prefix, params)
  irc_RPL_LUSERCLIENT(self, prefix, params)
  irc_RPL_LUSERME(self, prefix, params)
  irc_RPL_LUSEROP(self, prefix, params)
  irc_RPL_MOTD(self, prefix, params)
  irc_RPL_MOTDSTART(self, prefix, params)
  irc_RPL_MYINFO(self, prefix, params)
  irc_RPL_NOTOPIC(self, prefix, params)
  irc_RPL_TOPIC(self, prefix, params)
I just joined the channel, and the server is telling me the current topic.
  irc_RPL_WELCOME(self, prefix, params)
  irc_RPL_YOURHOST(self, prefix, params)
  irc_unknown(self, prefix, command, params)
  isupport(self, options)
Called with various information about what the server supports.
  join(self, channel, key)
  joined(self, channel)
Called when I finish joining a channel.
  kick(self, channel, user, reason)
  kickedFrom(self, channel, kicker, message)
Called when I am kicked from a channel.
  leave(self, channel, reason)
  left(self, channel)
Called when I have left a channel.
  luserChannels(self, channels)
Called with the number of channels existant on the server.
  luserClient(self, info)
Called with information about the number of connections, usually at logon.
  luserMe(self, info)
Called with information about the server connected to.
  luserOp(self, ops)
Called with the number of ops logged on to the server.
  me(self, channel, action)
Strike a pose.
  mode(self, chan, set, modes, limit, user, mask)
Change the modes on a user or channel.
  modeChanged(self, user, channel, set, modes, args)
Called when a channel's modes are changed
  msg(self, user, message, length)
Send a message to a user or channel.
  myInfo(self, servername, version, umodes, cmodes)
Called with information about the server, usually at logon.
  nickChanged(self, nick)
Called when my nick has been changed.
  notice(self, user, message)
  part(self, channel, reason)
  ping(self, user, text)
Measure round-trip delay to another IRC client.
  pong(self, user, secs)
Called with the results of a CTCP PING query.
  quirkyMessage(self, s)
This is called when I receive a message which is peculiar, but not wholly indecipherable.
  quit(self, message)
  receivedMOTD(self, motd)
I received a message-of-the-day banner from the server.
  register(self, nickname, hostname, servername)
  say(self, channel, message, length)
  setNick(self, nickname)
  topic(self, channel, topic)
Attempt to set the topic of the given channel, or ask what it is.
  topicUpdated(self, user, channel, newTopic)
In channel, user changed the topic to newTopic.
  userJoined(self, user, channel)
Called when I see another user joining a channel.
  userKicked(self, kickee, channel, kicker, message)
Called when I observe someone else being kicked from a channel.
  userLeft(self, user, channel)
Called when I see another user leaving a channel.
  userRenamed(self, oldname, newname)
A user changed their name from oldname to newname.
  yourHost(self, info)
Called with daemon information about the server, usually at logon.
    Inherited from LineReceiver
  clearLineBuffer(self)
Clear buffered data.
  lineLengthExceeded(self, line)
Called when the maximum line length has been reached.
  rawDataReceived(self, data)
Override this for when raw data is received.
  setLineMode(self, extra)
Sets the line-mode of this receiver.
  setRawMode(self)
Sets the raw mode of this receiver.
    Inherited from Protocol
  connectionFailed(self)
(Deprecated)
    Inherited from BaseProtocol
  makeConnection(self, transport)
Make a connection to a transport and a server.
    Inherited from Ephemeral
  __setstate__(self, state)

Instance Variable Summary
NoneType realname: Supplied to the server during login as the "Real name" or "ircname".
NoneType versionEnv: CTCP VERSION reply, environment the client is running in.
NoneType versionName: CTCP VERSION reply, client name.
NoneType versionNum: CTCP VERSION reply, client version,
    Inherited from IRCClient
Callable or String fingerReply: Sent in reply to a FINGER CTCP query.
Number of Seconds. lineRate: Minimum delay between lines sent to the server.
str nickname: Nickname the client will use.
NoneType password: Password used to log on to the server.
str sourceURL: CTCP SOURCE reply, a URL where the source code of this client may be found.
NoneType userinfo: Sent in reply to a USERINFO CTCP query.

Class Variable Summary
tuple helptext = ("Hi, I'm a Tendril bridge between here and %...
NoneType words = None                                                                  
    Inherited from IRCClient
str __pychecker__ = 'unusednames=params,prefix,channel'
int _MAX_PINGRING = 12                                                                    
NoneType _pings = None                                                                  
NoneType _queue = None                                                                  
NoneType _queueEmptying = None                                                                  
str dcc_destdir = '.'
NoneType dcc_sessions = None                                                                  
str delimiter: The line-ending delimiter to use.
str motd = ''
int performLogin = 1                                                                     
    Inherited from LineReceiver
str _LineReceiver__buffer = ''
int line_mode = 1                                                                     
int MAX_LENGTH: The maximum length of a line to allow (If a sent line is longer than this, the connection is dropped).
    Inherited from Protocol
tuple __implements__ = (<class twisted.internet.interfaces.IPr...
    Inherited from BaseProtocol
int connected = 0                                                                     
NoneType transport = None                                                                  

Method Details

__init__(self)
(Constructor)

Create a new Tendril IRC client.

action(self, user, channel, message)

Speak about a participant in third-person.
Overrides:
twisted.protocols.irc.IRCClient.action

bot_DCC(self, user, params)

Commands for brokering DCC handshakes.

DCC -- I'll tell you if I'm holding a DCC request from you.

DCC PASSTO nick -- give the DCC request you gave me to this nick.

DCC FORGET -- forget any DCC requests you offered to me.

bot_msg(self, sender, params)

Pass along a message as a directMessage to a words Participant

connectionLost(self, reason)

When I lose a connection, log out all my IRC participants.
Overrides:
twisted.internet.protocol.Protocol.connectionLost

ctcpQuery_DCC(self, user, channel, data)

Accept DCC handshakes, for passing on to others.
Overrides:
twisted.protocols.irc.IRCClient.ctcpQuery_DCC

irc_ERR_BADCHANNELKEY(self, prefix, params)

When I can't get on a channel, report it.

irc_ERR_BANNEDFROMCHAN(self, prefix, params)

When I can't get on a channel, report it.

irc_ERR_CHANNELISFULL(self, prefix, params)

When I can't get on a channel, report it.

irc_ERR_INVITEONLYCHAN(self, prefix, params)

When I can't get on a channel, report it.

irc_ERR_NOSUCHCHANNEL(self, prefix, params)

When I can't get on a channel, report it.

irc_ERR_UNAVAILRESOURCE(self, prefix, params)

When I can't get on a channel, report it.

irc_INVITE(self, prefix, params)

Accept an invitation, if it's in my groupList.

irc_JOIN(self, prefix, params)

Join IRC user to the corresponding group.
Overrides:
twisted.protocols.irc.IRCClient.irc_JOIN

irc_KICK(self, prefix, params)

Kicked? Who? Not me, I hope.
Overrides:
twisted.protocols.irc.IRCClient.irc_KICK

irc_NICK(self, prefix, params)

When an IRC user changes their nickname

this does *not* change the name of their perspectivee, just my nickname->perspective and client->nickname mappings.
Overrides:
twisted.protocols.irc.IRCClient.irc_NICK

irc_PART(self, prefix, params)

Parting IRC members leave the correspoding group.
Overrides:
twisted.protocols.irc.IRCClient.irc_PART

irc_QUIT(self, prefix, params)

When a user quits IRC, log out their participant.

irc_TOPIC(self, prefix, params)

Announce the new topic.
Overrides:
twisted.protocols.irc.IRCClient.irc_TOPIC

lineReceived(self, line)

Override this for when each line is received.
Overrides:
twisted.protocols.irc.IRCClient.lineReceived (inherited documentation)

log(self, message, priority=None)

I need to give Twisted a prioritized logging facility one of these days.

noticed(self, user, channel, message)

Pass channel notices on to the group.
Overrides:
twisted.protocols.irc.IRCClient.noticed

privmsg(self, user, channel, message)

Dispatch privmsg as a groupMessage or a command, as appropriate.
Overrides:
twisted.protocols.irc.IRCClient.privmsg

sendLine(self, line)

Send a line through my transport, unless my transport isn't up.
Overrides:
twisted.protocols.irc.IRCClient.sendLine

signedOn(self)

Join my groupList once I've signed on.
Overrides:
twisted.protocols.irc.IRCClient.signedOn

Instance Variable Details

realname

Supplied to the server during login as the "Real name" or "ircname".
Type:
NoneType
Value:
'Tendril'                                                              

versionEnv

CTCP VERSION reply, environment the client is running in.
Type:
NoneType
Value:
'Twisted 1.3.0rc1'                                                     

versionName

CTCP VERSION reply, client name. If None, no VERSION reply will be sent.
Type:
NoneType
Value:
'Tendril'                                                              

versionNum

CTCP VERSION reply, client version,
Type:
NoneType
Value:
'1.32'                                                                 

Class Variable Details

helptext

Type:
tuple
Value:
("Hi, I'm a Tendril bridge between here and %(service)s.",
 'You can send a private message to someone like this:',
 '/msg %(myNick)s msg theirNick Hi there!')                            

words

Type:
NoneType
Value:
None                                                                  

Generated by Epydoc 2.0 on Sat May 15 20:08:13 2004 http://epydoc.sf.net