Skip to content

Commit

Permalink
Allow send_message to work on CONNECTED clients
Browse files Browse the repository at this point in the history
Should fix the issue with MotD not displaying
  • Loading branch information
medeor413 committed Jun 4, 2017
1 parent 6334335 commit e4343d4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion plugins/motd.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ def _display_motd(self, connection):
:param connection: The connection we're showing the message to.
:return: Null.
"""
yield from asyncio.sleep(3)
yield from send_message(connection, "{}".format(self.motd))
return

Expand Down
2 changes: 1 addition & 1 deletion server.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def send_message(self, message, *messages, mode=ChatReceiveMode.BROADCAST,
channel=channel)
return

if self.state == State.CONNECTED_WITH_HEARTBEAT:
if self.state >= State.CONNECTED:
chat_packet = ChatReceived.build({"message": message,
"name": name,
"junk": 0,
Expand Down

0 comments on commit e4343d4

Please sign in to comment.