summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@xso>2011-09-05 20:53:17 +0200
committertv <tv@xso>2011-09-05 20:53:17 +0200
commit7c2ebca3fb83ea190743b61946dff0678c975f48 (patch)
tree30497f5dd4e1a617ccd8d8ba831acf32e127c424
parentc1840f9fe4b58d4029635a021a2236f015a8b1c3 (diff)
//Synapse: allow commands w/o arguments
-rwxr-xr-xSynapse/bot2.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Synapse/bot2.py b/Synapse/bot2.py
index 63db57cb..66621ed1 100755
--- a/Synapse/bot2.py
+++ b/Synapse/bot2.py
@@ -44,10 +44,8 @@ class IRCBot(SimpleIRCClient):
target, arguments = arguments
arguments = re.split('\s+', arguments, 1)
- if len(arguments) != 2:
- return
- command, arguments = arguments
+ command, arguments = arguments if len(arguments) == 2 else [arguments[0],[]]
self.connection.privmsg(self.target, '- target: ' + target)
self.connection.privmsg(self.target, '- command: ' + command)