|
@@ -168,10 +168,7 @@ class PlayerInput(object):
|
|
|
return line
|
|
|
|
|
|
class ProxyMenu(object):
|
|
|
- count = 0
|
|
|
-
|
|
|
def __init__(self, game):
|
|
|
- ProxyMenu.count += 1
|
|
|
self.nl = "\n\r"
|
|
|
self.c = merge(Style.BRIGHT + Fore.YELLOW + Back.BLUE)
|
|
|
self.r = Style.RESET_ALL
|
|
@@ -192,13 +189,8 @@ class ProxyMenu(object):
|
|
|
self.keepalive.start(30)
|
|
|
self.menu()
|
|
|
|
|
|
- @classmethod
|
|
|
- def total(cls):
|
|
|
- return cls.count
|
|
|
-
|
|
|
def __del__(self):
|
|
|
log.msg("ProxyMenu {0} RIP".format(self))
|
|
|
- ProxyMenu.count -= 1
|
|
|
|
|
|
def whenDone(self):
|
|
|
self.defer = defer.Deferred()
|
|
@@ -878,9 +870,7 @@ class Player(protocol.Protocol):
|
|
|
self.queue_player.put(chunk)
|
|
|
|
|
|
else:
|
|
|
-
|
|
|
- log.msg("I'm being watched...")
|
|
|
-
|
|
|
+
|
|
|
return
|
|
|
|
|
|
if chunk == b"~":
|
|
@@ -898,14 +888,12 @@ class Player(protocol.Protocol):
|
|
|
|
|
|
if chunk == b"|":
|
|
|
|
|
|
- log.msg(pformat(self.observer.dispatch))
|
|
|
+
|
|
|
+
|
|
|
|
|
|
- if ProxyMenu.total() == 0:
|
|
|
-
|
|
|
-
|
|
|
- menu = ProxyMenu(self.game)
|
|
|
- else:
|
|
|
- log.msg("The menu is already active!")
|
|
|
+
|
|
|
+
|
|
|
+ menu = ProxyMenu(self.game)
|
|
|
|
|
|
|
|
|
|