From 041f338fd69782aaad9109d65d05dcc579690c44 Mon Sep 17 00:00:00 2001 From: troido Date: Fri, 18 Jan 2019 12:14:54 +0100 Subject: made input handling server side more rigorous; client doesn't split strings anymore; optional support for hy --- asciifarm/client/inputhandler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'asciifarm/client/inputhandler.py') diff --git a/asciifarm/client/inputhandler.py b/asciifarm/client/inputhandler.py index 6aed51c..8d99c40 100644 --- a/asciifarm/client/inputhandler.py +++ b/asciifarm/client/inputhandler.py @@ -1,7 +1,6 @@ import curses import curses.ascii -import shlex from .commandhandler import CommandHandler, InvalidCommandException from .keynames import nameFromKey @@ -35,7 +34,8 @@ class InputHandler: self.commandHandler.chat(message[1:]) else: try: - self.commandHandler.execute(shlex.split(message[1:])) + command, _sep, arg = message[1:].partition(' ') + self.commandHandler.execute([command, arg]) except InvalidCommandException as e: self.client.log(", ".join(e.args)) else: -- cgit