Browse Source

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

tags/v0.1^2
Ben Kurtovic 12 years ago
parent
commit
68f111c7d6
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      earwigbot/irc/data.py

+ 9
- 0
earwigbot/irc/data.py View File

@@ -83,6 +83,15 @@ class Data(object):
self._command = self.args.pop(0).lower() self._command = self.args.pop(0).lower()
except IndexError: except IndexError:
self._command = "" 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): def _parse_kwargs(self):
"""Parse keyword arguments embedded in self.args. """Parse keyword arguments embedded in self.args.


Loading…
Cancel
Save