From 6c3a2a228ebf425c67c194b4b14770ec4604b0bb Mon Sep 17 00:00:00 2001 From: Mark Tearle <mark@tearle.com> Date: Sat, 15 Nov 2014 19:16:51 +0800 Subject: [PATCH] BUGFIX: Fix greeting that was confusing Vendserver and response to ECHO --- virtualsnack.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/virtualsnack.py b/virtualsnack.py index f2f0e3d..0b69f8d 100755 --- a/virtualsnack.py +++ b/virtualsnack.py @@ -131,7 +131,7 @@ class VirtualSnackApp(npyscreen.NPSAppManaged): self.CONNECTION_LIST.append(sockfd) self.received = "Client (%s, %s) connected" % addr - self.do_send("# Virtual Snack\n") + self.do_send("000 Virtual Snack is alive \n") self.do_prompt() #Some incoming message from a client @@ -269,10 +269,15 @@ Mark Tearle, October 2014 def do_pong(self): self.do_send("000 PONG!\n") + def do_echo(self): + self.do_send("000 Not implemented\n") + def handle_command(self, command): command = string.upper(command) if string.find(command, "HELP",0) == 0: self.do_help() + elif string.find(command, "ECHO",0) == 0: + self.do_echo() elif string.find(command, "ABOUT",0) == 0: self.do_about() elif string.find(command, "PING",0) == 0: -- GitLab