Ver a proveniência

'nickname: command' works if delimited by a period.

tags/v0.1^2
Ben Kurtovic há 12 anos
ascendente
cometimento
68f111c7d6
1 ficheiros alterados com 9 adições e 0 eliminações
  1. +9
    -0
      earwigbot/irc/data.py

+ 9
- 0
earwigbot/irc/data.py Ver ficheiro

@@ -83,6 +83,15 @@ class Data(object):
self._command = self.args.pop(0).lower()
except IndexError:
self._command = ""
else:
try:
if self.msg[-1] == "." and self.msg[-2] != ".":
if self.args:
self.args[-1] = self.args[-1][:-1]
else:
self._command = self.command[:-1]
except IndexError:
pass

def _parse_kwargs(self):
"""Parse keyword arguments embedded in self.args.


Carregando…
Cancelar
Guardar