class documentation

class botService(service.MultiService): (source)

View In Hierarchy

allows to control the behaviour of the bot during runtime

this class only does the work, you need another class, most suitable is a bot-module, to have a userinterface

Method __init__ Undocumented
Method getlog get the n most recent loglines, of specify an offset to get earlier lines
Method handle_command parse the commandstring and handle the command
Method help get help information for arguments *args (parsed strings from a command, i.e. "ircClient", "disconnect")
Method register_command Add a command to the control service
Class Variable commandList Undocumented
Class Variable commandTree Undocumented
Class Variable name Undocumented
Instance Variable logger Undocumented
Instance Variable parent Undocumented
Instance Variable root Undocumented
Method _cmd_config Undocumented
Method _cmd_config_get get a configvalue
Method _cmd_config_reload Undocumented
Method _cmd_config_set set a configvalue. syntax for argument: [network=net] [channel=chan] module.setting newvalue
Method _exec execute function f with *args or return a usage info if the arguments were wrong (too much/too little)
Method _get_usage get a usage info for function f
def __init__(self, root, parent): (source)

Undocumented

def getlog(self, numlines=3, offset=0): (source)

get the n most recent loglines, of specify an offset to get earlier lines

def handle_command(self, string): (source)

parse the commandstring and handle the command

the string is parsed into commands, and they are searched in the commandList-tree the function returns an answerstring or that the command was ambigious

def help(self, *args): (source)

get help information for arguments *args (parsed strings from a command, i.e. "ircClient", "disconnect")

def register_command(self, f, namespace=None, name=None): (source)

Add a command to the control service

Parameters
f:callablethe callable to be called, when the command is issued
namespaceUndocumented
nameUndocumented
commandList: dict = (source)

Undocumented

commandTree: dict = (source)

Undocumented

name: str = (source)

Undocumented

Undocumented

Undocumented

Undocumented

def _cmd_config(self, argument): (source)

Undocumented

def _cmd_config_get(self, argument): (source)

get a configvalue

def _cmd_config_reload(self, argument): (source)

Undocumented

def _cmd_config_set(self, argument): (source)

set a configvalue. syntax for argument: [network=net] [channel=chan] module.setting newvalue

def _exec(self, f, args): (source)

execute function f with *args or return a usage info if the arguments were wrong (too much/too little)

def _get_usage(self, f): (source)

get a usage info for function f