Skip to content
Permalink
Browse files

Fix standby logic pt 2

  • Loading branch information...
quartata committed Dec 7, 2017
1 parent 089d5c8 commit ecae8ac67aec8e966c2ec7b53de48ed3f37aa21e
Showing with 7 additions and 10 deletions.
  1. +7 −10 chatcommunicate.py
@@ -81,16 +81,15 @@ def init(username, password):
else:
parse_room_config("rooms.yml")

for site, roomid in _command_rooms:
room = _clients[site].get_room(roomid)
deletion_watcher = (site, roomid) in _watcher_rooms
if not GlobalVars.standby_mode:
for site, roomid in _command_rooms:
room = _clients[site].get_room(roomid)
deletion_watcher = (site, roomid) in _watcher_rooms

if not GlobalVars.standby_mode:
room.join()
room.watch_socket(on_msg)

_rooms[(site, roomid)] = RoomData(room, threading.Event(), -1, (), deletion_watcher)
_rooms[(site, roomid)].lock.set()
_rooms[(site, roomid)] = RoomData(room, threading.Event(), -1, (), deletion_watcher)
_rooms[(site, roomid)].lock.set()

if os.path.isfile("messageData.p"):
_last_messages = pickle.load(open("messageData.p", "rb"))
@@ -230,9 +229,7 @@ def tell_rooms(msg, has, hasnt, notify_site="", report_data=()):
deletion_watcher = room in _watcher_rooms

new_room = _clients[site].get_room(roomid)

if not GlobalVars.standby_mode:
new_room.join()
new_room.join()

_rooms[room] = RoomData(new_room, threading.Event(), -1, (), deletion_watcher)
_rooms[room].lock.set()

0 comments on commit ecae8ac

Please sign in to comment.
You can’t perform that action at this time.