diff options
Diffstat (limited to 'Mailman/MailCommandHandler.py')
| -rw-r--r-- | Mailman/MailCommandHandler.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Mailman/MailCommandHandler.py b/Mailman/MailCommandHandler.py index cc9bc410a..8280dff4a 100644 --- a/Mailman/MailCommandHandler.py +++ b/Mailman/MailCommandHandler.py @@ -74,6 +74,8 @@ option_info = {'digest' : 0, # ordered list options = ('hide', 'nomail', 'ack', 'notmetoo', 'digest', 'plain') +# strip just the outer layer of quotes +quotecre = re.compile(r'["\'`](?P<cmd>.*)["\'`]') class MailCommandHandler: @@ -133,6 +135,10 @@ class MailCommandHandler: return if subject: subject = string.strip(subject) + # remove quotes so "help" works + mo = quotecre.search(subject) + if mo: + subject = mo.group('cmd') if (subject and self.__dispatch.has_key(string.lower(string.split(subject)[0]))): lines = [subject] + string.split(msg.body, '\n') @@ -165,6 +171,10 @@ class MailCommandHandler: continue args = string.split(line) cmd = string.lower(args[0]) + # remove quotes so "help" or `help' works + mo = quotecre.search(cmd) + if mo: + cmd = mo.group('cmd') args = args[1:] if cmd in ['end', '--']: self.AddToResponse('\n***** End: ' + line + '\n' |
