Skip to content

Instantly share code, notes, and snippets.

@TobiX
Created March 20, 2011 22:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TobiX/878747 to your computer and use it in GitHub Desktop.
Save TobiX/878747 to your computer and use it in GitHub Desktop.
diff --git a/bravo/protocols/beta.py b/bravo/protocols/beta.py
index 05f2969..1cef167 100644
--- a/bravo/protocols/beta.py
+++ b/bravo/protocols/beta.py
@@ -259,6 +259,10 @@ class BetaServerProtocol(Protocol):
log.err(payload)
def connectionLost(self, reason):
+ packet = make_packet("chat",
+ message="%s left the game." % self.username)
+ self.factory.broadcast(packet)
+
if self._ping_loop.running:
self._ping_loop.stop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment