mirror of
http://aero2k.de/t/repos/urlbot-native.git
synced 2017-09-06 15:25:38 +02:00
support quotes
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
The URLBot - ready to strive for desaster in YOUR jabber MUC
|
||||
"""
|
||||
import re
|
||||
import shlex
|
||||
import sys
|
||||
import time
|
||||
from lxml import etree
|
||||
@@ -245,6 +246,9 @@ class UrlBot(IdleBot):
|
||||
:returns: nothing
|
||||
"""
|
||||
data = msg_obj['body']
|
||||
try:
|
||||
words = shlex.split(data)
|
||||
except ValueError:
|
||||
words = data.split()
|
||||
|
||||
# prepend the bot nick so we have the same syntax as in muc
|
||||
|
||||
Reference in New Issue
Block a user