Update plugin.py

This commit is contained in:
Gordon Shumway 2019-02-19 03:08:38 -05:00 committed by GitHub
parent b06c2ca1ec
commit 7f12febf6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ class MUD(callbacks.Plugin):
if command:
self.tn[nick].write(command.encode() + b"\r\n")
else:
self.tn[nick].write(b"\n")
self.tn[nick].write(b"\r\n")
response = self.output(self.tn[nick])
for line in response:
if line.strip():
@ -89,7 +89,7 @@ class MUD(callbacks.Plugin):
def output(self, output):
response = []
response = output.read_until(b">", timeout=1)
response = output.read_until(b"\a", timeout=1)
clean = []
for line in response.splitlines():
clean.append(self.ansi_escape.sub('', line.decode()))