Class c.chatMod(chatMod.chatMod):

Part of commandsMod View In Hierarchy

No class docstring
Method __init__ Undocumented
Method connectionMade made connection to server
Method joined we have joined a channel
Method command a command message received
Method start called to start the work of the module
Method reload called to reload the settings of the module
Method getCommand Undocumented
Method respond respond to a command, substituting USER by the actual user

Inherited from chatMod:

Method setLogger set the logger
Method auth check the authorisation of the user
Method query a private message received (Obsolete method)
Method privmsg a private message received
Method msg message received
Method connectionLost lost connection to server
Method signedOn successfully signed on
Method left we have left a channel
Method noticed we got a notice
Method action action (/me) received
Method modeChanged mode changed
Method kickedFrom someone kicked the bot
Method userKicked someone kicked someone else
Method userJoined a user joined the channel
Method userJoinedMask Undocumented
Method userLeft a user left the channel
Method userQuit a user disconnect from the network
Method yourHost info about your host
Method userRenamed a user changed the nick
Method topicUpdated a user changed the topic of a channel
Method irc_unknown an IRC-Message, which is not handle by twisted was received
Method stop called, when the bot is stopped, or the module is reloaded
Method sendLine Undocumented
Method lineReceived Undocumented
Method ctcpQuery called for ctcp queries
def __init__(self, bot):
Undocumented
def connectionMade(self):
made connection to server
def joined(self, channel):
we have joined a channel
def command(self, user, channel, command, options):
a command message received
def start(self):
called to start the work of the module put your initialization stuff in here insteadof __init__
def reload(self):
called to reload the settings of the module
def getCommand(self, channel, cmd):
Undocumented
def respond(self, channel, user, command, options):

respond to a command, substituting USER by the actual user and OTHER by the given options

>>> c=chatMod(None)
>>> c.commands={} #just for the example to work
>>> c.commands['general']={"test": "USER wanted a test", "test_": "USER wanted to show OTHER how it works"}
>>> c.commands['network']={}
>>> #example begins here:
>>> c.respond("", "testuser", "test", "")
'testuser wanted a test'
>>> c.respond("", "testuser", "test", "you")
'testuser wanted to show you how it works'
API Documentation for OtfBot, generated by pydoctor at 2010-01-14 18:51:57.