Part of commandsMod View In Hierarchy
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 |
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'