o.s.i.Bot(pluginSupport, irc.IRCClient) : class documentation

Part of otfbot.services.ircClient View Source View In Hierarchy

The Protocol of our IRC-Bot
Instance Variablespluginscontains references to all plugins, which are loaded (type: list )
channelsall channels we are currently in (type: list )
networkthe name of the network we are connected to (type: string )
loggera instance of the standard python logger
nicknamethe nick of the bot
Method __init__ Undocumented
Method handleCommand same as twisteds, only with reasonable logging in case of exceptions
Method startTimeoutDetection initialize the timeout-detection scheduler-call
Method getUsers Get a list of users in channel (or all channels if channel=None)
Method getUserByNick Undocumented
Method register_ctl_command Undocumented
Method register_my_commands Undocumented
Method getFactory get the factory
Method auth call this, to see which rights user has
Method encode_line encode a line, trying to use encoding, falling back to fallback
Method get_gettext Undocumented
Method sendmsg call only this to send messages to channels or users
Method sendme call only this to send actions (/me) to channels
Method join wrapper around IRCClient.join, which only allows proper channels
Method leave wrapper around IRCClient.leave, which only allows proper channels
Method kick wrapper around IRCClient.kick, which only allows proper channels
Method topic wrapper around IRCClient.topic, which only allows proper channels
Method connectionMade this is called by twisted
Method connectionLost this is called by twisted,
Method signedOn called by twisted,
Method joined called by twisted,
Method left called by twisted,
Method isupport Called with various information about what the server supports.
Method toUnicode convert a string to an unicode-object, trying to use the
Method resolveUser resolve a user hostmask (nick!user@host) to a userobject
Method privmsg called by twisted,
Method irc_unknown called by twisted
Method noticed called by twisted,
Method action called by twisted,
Method modeChanged called by twisted
Method kickedFrom called by twisted,
Method userKicked called by twisted,
Method userJoined called by twisted,
Method userLeft called by twisted,
Method userQuit called by twisted,
Method yourHost called by twisted
Method ctcpUnknownQuery called by twisted,
Method ctcpUnknownReply called by twisted,
Method userRenamed called by twisted,
Method topicUpdated called by twisted
Method irc_RPL_WHOREPLY "<channel> <user> <host> <server> <nick> <H|G>[*][@|+] :<hopcount> <real name>"
Method irc_RPL_ENDOFWHO end of WHO replies by the server
Method irc_INVITE called by twisted,
Method irc_RPL_BOUNCE Overridden to get isupport work correctly
Method irc_JOIN Overridden to get the full hostmask
Method irc_PART Overridden to get the full hostmask
Method irc_QUIT Overridden to get the full hostmask
Method lineReceived called by twisted
Method sendLine Sends a line to the other end of the connection.
Method ping Measure round-trip delay to another IRC client.
Method disconnect disconnects cleanly from the current network
Method _synced_apirunner Undocumented
Method _check_sendLastLine Undocumented

Inherited from IRCClient:

Method created Called with creation date information about the server, usually at logon.
Method myInfo Called with information about the server, usually at logon.
Method luserClient Called with information about the number of connections, usually at logon.
Method bounce Called with information about where the client should reconnect.
Method luserChannels Called with the number of channels existant on the server.
Method luserOp Called with the number of ops logged on to the server.
Method luserMe Called with information about the server connected to.
Method pong Called with the results of a CTCP PING query.
Method nickChanged Called when my nick has been changed.
Method receivedMOTD I received a message-of-the-day banner from the server.
Method mode Change the modes on a user or channel.
Method say Send a message to a channel
Method msg Send a message to a user or channel.
Method notice Send a notice to a user.
Method away Mark this client as away.
Method back Clear the away status.
Method whois Retrieve user information about the given nick name.
Method register Login to the server.
Method setNick Set this client's nickname.
Method quit Disconnect from the server
Method describe Strike a pose.
Method me Strike a pose.
Method dccSend Undocumented
Method dccResume Send a DCC RESUME request to another user.
Method dccAcceptResume Send a DCC ACCEPT response to clients who have requested a resume.
Method irc_ERR_NICKNAMEINUSE Called when we try to register or change to a nickname that is already
Method alterCollidedNick Generate an altered version of a nickname that caused a collision in an
Method irc_ERR_ERRONEUSNICKNAME Called when we try to register or change to an illegal nickname.
Method irc_ERR_PASSWDMISMATCH Called when the login was incorrect.
Method irc_RPL_WELCOME Called when we have received the welcome from the server.
Method irc_MODE Parse a server mode change message.
Method irc_PING Called when some has pinged us.
Method irc_PRIVMSG Called when we get a message.
Method irc_NOTICE Called when a user gets a notice.
Method irc_NICK Called when a user changes their nickname.
Method irc_KICK Called when a user is kicked from a channel.
Method irc_TOPIC Someone in the channel set the topic.
Method irc_RPL_TOPIC Called when the topic for a channel is initially reported or when it
Method irc_RPL_NOTOPIC Undocumented
Method irc_RPL_MOTDSTART Undocumented
Method irc_RPL_MOTD Undocumented
Method irc_RPL_ENDOFMOTD RPL_ENDOFMOTD indicates the end of the message of the day
Method irc_RPL_CREATED Undocumented
Method irc_RPL_YOURHOST Undocumented
Method irc_RPL_MYINFO Undocumented
Method irc_RPL_ISUPPORT Undocumented
Method irc_RPL_LUSERCLIENT Undocumented
Method irc_RPL_LUSEROP Undocumented
Method irc_RPL_LUSERCHANNELS Undocumented
Method irc_RPL_LUSERME Undocumented
Method ctcpQuery Dispatch method for any CTCP queries received.
Method ctcpQuery_ACTION Undocumented
Method ctcpQuery_PING Undocumented
Method ctcpQuery_FINGER Undocumented
Method ctcpQuery_VERSION Undocumented
Method ctcpQuery_SOURCE Undocumented
Method ctcpQuery_USERINFO Undocumented
Method ctcpQuery_CLIENTINFO A master index of what CTCP tags this client knows.
Method ctcpQuery_ERRMSG Undocumented
Method ctcpQuery_TIME Undocumented
Method ctcpQuery_DCC Initiate a Direct Client Connection
Method dcc_SEND Undocumented
Method dcc_ACCEPT Undocumented
Method dcc_RESUME Undocumented
Method dcc_CHAT Undocumented
Method dccDoSend Called when I receive a DCC SEND offer from a client.
Method dccDoResume Called when a client is trying to resume an offered file
Method dccDoAcceptResume Called when a client has verified and accepted a DCC resume
Method dccDoChat Undocumented
Method ctcpMakeReply Send one or more extended messages as a CTCP reply.
Method ctcpMakeQuery Send one or more extended messages as a CTCP query.
Method ctcpReply Dispatch method for any CTCP replies received.
Method ctcpReply_PING Undocumented
Method badMessage When I get a message that's so broken I can't use it.
Method quirkyMessage This is called when I receive a message which is peculiar,
Method dataReceived Protocol.dataReceived.
Method getUserModeParams Get user modes that require parameters for correct parsing.
Method getChannelModeParams Get channel modes that require parameters for correct parsing.
Method __getstate__ Undocumented
Method _reallySendLine Undocumented
Method _sendLine Undocumented

Inherited from LineReceiver (via IRCClient):

Method clearLineBuffer Clear buffered data.
Method setLineMode Sets the line-mode of this receiver.
Method setRawMode Sets the raw mode of this receiver.
Method rawDataReceived Override this for when raw data is received.
Method lineLengthExceeded Called when the maximum line length has been reached.

Inherited from BaseProtocol (via IRCClient, LineReceiver, Protocol):

Method makeConnection Make a connection to a transport and a server.

Inherited from _PauseableMixin (via IRCClient, LineReceiver):

Method pauseProducing Undocumented
Method resumeProducing Undocumented
Method stopProducing Undocumented
def __init__(self, root, parent): (source)
Undocumented
def _synced_apirunner(self, apifunction, args={}): (source)
Undocumented
def handleCommand(self, command, prefix, params): (source)
same as twisteds, only with reasonable logging in case of exceptions

Determine the function to call for the given command and call it with the given arguments.

def startTimeoutDetection(self): (source)
initialize the timeout-detection scheduler-call
def getUsers(self, channel=None): (source)
Get a list of users in channel (or all channels if channel=None)
Returnsa list of users (type: dict )
def getUserByNick(self, nick): (source)
Undocumented
def _check_sendLastLine(self): (source)
Undocumented
def register_ctl_command(self, f, namespace=None, name=None): (source)
Undocumented
def register_my_commands(self): (source)
Undocumented
def getFactory(self): (source)
get the factory
Returnsthe current factory (type: BotFactory )
def auth(self, user): (source)
call this, to see which rights user has
Parametersuserthe full hostmask of the user (type: string )
Returnsthe level of access rights (0 = nothing, 10 = everything) (type: int )
def encode_line(self, line, encoding, fallback): (source)
encode a line, trying to use encoding, falling back to fallback
Instance Variableslinethe line to encode
encodingthe assumed encoding (i.e. UTF-8)
fallbacka safe fallback (i.e. iso-8859-15)
def get_gettext(self, channel=None): (source)
Undocumented
def sendmsg(self, channel, msg, encoding='UTF-8', fallback='iso-8859-15'): (source)
call only this to send messages to channels or users it converts the message from iso-8859-15 to a encoding given in the config
Parameterschannelsend the message to this channel or user (type: string )
msgthe message to send (type: string )
encodingthe encoding of msg (type: string )
fallbacktry this one as encoding for msg, if encoding doesn't work (type: string )
def sendme(self, channel, action, encoding='UTF-8', fallback='iso8859-15'): (source)
call only this to send actions (/me) to channels it converts the message from iso-8859-15 to a encoding given in the config
Parameterschannelsend the message to this channel or user (type: string )
actionthe message to send (type: string )
encodingthe encoding of msg (type: string )
fallbackthe encoding of msg
def join(self, channel, key=None): (source)
wrapper around IRCClient.join, which only allows proper channels
def leave(self, channel, reason=None): (source)
wrapper around IRCClient.leave, which only allows proper channels
def kick(self, channel, user, reason=None): (source)
wrapper around IRCClient.kick, which only allows proper channels
def topic(self, channel, topic=None): (source)
wrapper around IRCClient.topic, which only allows proper channels
def connectionMade(self): (source)
this is called by twisted , when the connection to the irc-server was made
def connectionLost(self, reason): (source)
this is called by twisted, if the connection to the IRC-Server was lost
Parametersreason (type: twisted.python.failure.Failure )
def signedOn(self): (source)
called by twisted, when we signed on the IRC-Server
def joined(self, channel): (source)
called by twisted, if we joined a channel
Parameterschannelthe channel we joined (type: string )
@syncedChannel(0)
def left(self, channel): (source)
called by twisted, if we left a channel
Parameterschannelthe channel we left (type: string )
def isupport(self, options): (source)
Called with various information about what the server supports.
ParametersoptionsDescriptions of features or limits of the server, possibly in the form "NAME=VALUE". (type: list of str )
def toUnicode(self, str, network=None, channel=None): (source)
convert a string to an unicode-object, trying to use the encoding given in config, with fallback to iso-8859-15
def resolveUser(self, user): (source)
resolve a user hostmask (nick!user@host) to a userobject returns a known user, if its in the user_list. creates a new user_list entry, if possible. if only nick is known, it returns a incomplete user and does not store it in the user_list
def privmsg(self, user, channel, msg): (source)
called by twisted, if we received a message
Parametersuserthe user, which send the message (type: string )
channelthe channel to which the message was sent or my nickname if it was a private message (type: string )
msgthe message (type: string )
@syncedAll
def irc_unknown(self, prefix, command, params): (source)
called by twisted for every line that has no own callback
@syncedChannel(1)
def noticed(self, user, channel, msg): (source)
called by twisted, if we got a notice
Parametersuserthe user which send the notice (type: string )
channelthe channel to which the notice was sent (could be our nick, if the message was only sent to us) (type: string )
msgthe message (type: string )
@syncedChannel(1)
def action(self, user, channel, msg): (source)
called by twisted, if we received a action
Parametersuserthe user which send the action (type: string )
channelthe channel to which the action was sent (could be our nick, if the message was only sent to us) (type: string )
msgthe message (type: string )
@syncedChannel(1)
def modeChanged(self, user, chan, set, modes, args): (source)
called by twisted if a usermode was changed
@syncedChannel(0)
def kickedFrom(self, channel, kicker, message): (source)
called by twisted, if the bot was kicked
@syncedChannel(1)
def userKicked(self, kickee, channel, kicker, message): (source)
called by twisted, if a user was kicked
@syncedChannel(1)
def userJoined(self, user, channel): (source)
called by twisted, if a user joined the channel
@syncedChannel(1)
def userLeft(self, user, channel): (source)
called by twisted, if a user left the channel
@syncedAll
def userQuit(self, user, quitMessage): (source)
called by twisted, if a user quits
def yourHost(self, info): (source)
called by twisted with information about the IRC-Server we are connected to
@syncedChannel(1)
def ctcpUnknownQuery(self, user, channel, messages): (source)
called by twisted, if a user sent a ctcp query
@syncedChannel(1)
def ctcpUnknownReply(self, user, channel, tag, data): (source)
called by twisted, if a user sent a ctcp reply
@syncedAll
def userRenamed(self, oldname, newname): (source)
called by twisted, if a user changed his nick
@syncedChannel(1)
def topicUpdated(self, user, channel, newTopic): (source)
called by twisted if the topic was updated
def irc_RPL_WHOREPLY(self, prefix, params): (source)
"<channel> <user> <host> <server> <nick> <H|G>[*][@|+] :<hopcount> <real name>"
def irc_RPL_ENDOFWHO(self, prefix, params): (source)
end of WHO replies by the server
@syncedChannelRaw
def irc_INVITE(self, prefix, params): (source)
called by twisted, if the bot was invited
def irc_RPL_BOUNCE(self, prefix, params): (source)
Overridden to get isupport work correctly
def irc_JOIN(self, prefix, params): (source)
Overridden to get the full hostmask
def irc_PART(self, prefix, params): (source)
Overridden to get the full hostmask
def irc_QUIT(self, prefix, params): (source)
Overridden to get the full hostmask
def lineReceived(self, line): (source)
called by twisted for every line which was received from the IRC-Server
def sendLine(self, line): (source)
Sends a line to the other end of the connection.
def ping(self): (source)
Measure round-trip delay to another IRC client.
def disconnect(self): (source)
disconnects cleanly from the current network
API Documentation for OtfBot, generated by pydoctor at 2011-05-03 16:14:29.