twisted.words.service.IRCUser(irc.IRC)
class documentationtwisted.words.service
View Source
(View In Hierarchy)
Implements interfaces: twisted.words.iwords.IChatClient
Protocol instance representing an IRC user connected to the server.
Method | connectionMade | Called when a connection is made. |
Method | connectionLost | Called when the connection is shut down. |
Method | sendMessage | Send a line formatted as an IRC message. |
Method | userJoined | Callback notifying this user that the given user has joined the given group. |
Method | userLeft | Callback notifying this user that the given user has left the given group for the given reason. |
Method | receive | Callback notifying this user of the given message sent by the given user. |
Method | groupMetaUpdate | Callback notifying this user that the metadata for the given group has changed. |
Method | irc_PASS | Password message -- Register a password. |
Method | irc_NICK | Nick message -- Set your nickname. |
Method | irc_USER | User message -- Set your realname. |
Method | irc_NICKSERV_PRIVMSG | Send a (private) message. |
Method | logInAs | Undocumented |
Method | irc_PING | Ping message |
Method | irc_QUIT | Quit |
Method | irc_MODE | User mode message |
Method | irc_USERHOST | Userhost message |
Method | irc_PRIVMSG | Send a (private) message. |
Method | irc_JOIN | Join message |
Method | irc_PART | Part message |
Method | irc_NAMES | Names message |
Method | irc_TOPIC | Topic message |
Method | list | Send a group of LIST response lines |
Method | irc_LIST | List query |
Method | irc_WHO | Who query |
Method | irc_WHOIS | Whois query |
Method | irc_OPER | Oper message |
Method | _cbLogin | Undocumented |
Method | _ebLogin | Undocumented |
Method | _channelMode | Undocumented |
Method | _userMode | Undocumented |
Method | _sendTopic | Send the topic of the given group to this user, if it has one. |
Method | _getTopic | Undocumented |
Method | _setTopic | Undocumented |
Method | _channelWho | Undocumented |
Method | _userWho | Undocumented |
Inherited from BaseProtocol (via IRC, Protocol):
Method | makeConnection | Make a connection to a transport and a server. |
Inherited from BaseProtocol (via IRC, Protocol):
Method | makeConnection | Make a connection to a transport and a server. |
Inherited from BaseProtocol (via IRC, Protocol):
Method | makeConnection | Make a connection to a transport and a server. |
Called when a connection is made.
This may be considered the initializer of the protocol, because it is called when the connection is completed. For clients, this is called once the connection to the server has been established; for servers, this is called after an accept() call stops blocking and a socket has been received. If you need to send any greeting or initial message, do it here.
Called when the connection is shut down.
Clear any circular references here, and any external references to this Protocol. The connection has been closed.
Send a line formatted as an IRC message.
First argument is the command, all subsequent arguments are parameters to that command. If a prefix is desired, it may be specified with the keyword argument 'prefix'.
The sendCommand
method is generally preferred over this one. Notably, this method does not
support sending message tags, while the sendCommand
method does.
Callback notifying this user that the given user has joined the given group.
Returns | (type: twisted.internet.defer.Deferred ) |
Callback notifying this user that the given user has left the given group for the given reason.
Returns | (type: twisted.internet.defer.Deferred ) |
Callback notifying this user of the given message sent by the given user.
This will be invoked whenever another user sends a message to a group
this user is participating in, or whenever another user sends a message
directly to this user. In the former case, recipient
will be
the group to which the message was sent; in the latter, it will be the same
object as the user who is receiving the message.
Returns | A Deferred which fires when the message has been delivered, or which fails
in some way. If the Deferred fails and the message was directed at a
group, this user will be removed from that group. (type: twisted.internet.defer.Deferred ) |
Callback notifying this user that the metadata for the given group has changed.
Returns | (type: twisted.internet.defer.Deferred ) |
Password message -- Register a password.
Parameters: <password>
[REQUIRED]
Note that IRC requires the client send this *before* NICK and USER.
Nick message -- Set your nickname.
Parameters: <nickname>
[REQUIRED]
User message -- Set your realname.
Parameters: <user> <mode> <unused> <realname>
Send a (private) message.
Parameters: <msgtarget> <text to be sent>
User mode message
Parameters: <nickname> *( ( "+" / "-" ) *( "i" / "w" / "o" / "O" / "r" ) )
Userhost message
Parameters: <nickname> *( SPACE <nickname> )
[Optional]
Send a (private) message.
Parameters: <msgtarget> <text to be sent>
Join message
Parameters: ( <channel> *( "," <channel> ) [ <key> *( "," <key> ) ] )
Part message
Parameters: <channel> *( "," <channel> ) [ <Part Message> ]
Names message
Parameters: [ <channel> *( "," <channel> ) [ <target> ] ]
Send the topic of the given group to this user, if it has one.
Send a group of LIST response lines
Parameters | channel | Information about the channels being sent: their name, the number of
participants, and their topic. (type: list of (str, int, str) ) |
List query
Return information about the indicated channels, or about all channels if none are specified.
Parameters: [ <channel> *( "," <channel> ) [ <target> ] ]
Whois query
Parameters: [ <target> ] <mask> *( "," <mask> )