1
0
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:
Thorsten
2016-01-03 18:37:48 +01:00
parent 3d59f1d55e
commit d87ccb3777

View File

@@ -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