Fri, 13 Jun 2014 01:34:53 +0300
- respect the commandprefix option
cobalt.py | file | annotate | diff | comparison | revisions |
--- a/cobalt.py Fri Jun 13 01:04:30 2014 +0300 +++ b/cobalt.py Fri Jun 13 01:34:53 2014 +0300 @@ -146,6 +146,7 @@ self.cfg = cfg self.mynick = '' self.verbose = cfg['verbose'] if 'verbose' in cfg else False + self.commandprefix = g_config['commandprefix'] if 'commandprefix' in g_config else False if not 'conflictsuffix' in self.cfg: self.cfg['conflictsuffix'] = '`' @@ -248,7 +249,7 @@ http_match = http_regex.match (line) # Check for command. - if len(message) >= 2 and message[0] == '.' and message[1] != '.': + if len(message) >= 2 and message[0] == self.commandprefix and message[1] != self.commandprefix: stuff = message[1:].split(' ') command = stuff[0] args = stuff[1:]