Skip to content

Commit

Permalink
Fix dead people being able to chat
Browse files Browse the repository at this point in the history
  • Loading branch information
Solirs committed Jul 14, 2023
1 parent 0ad8a46 commit fe3bb64
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion freefang/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,16 @@ def distribute_roles(self):

def townmessage(self, headers, game, connection):

if (not headers.sender.alive){
return 1;
}
for i in self.players:
fn.send_message(headers.sender.name, headers.message, i.connection) # Send it to all players

def werewolfmessage(self, headers, game, connection):

if (not headers.sender.alive){
return 1;
}
for i in self.werewolves:
fn.send_message(headers.sender.name, headers.message, i.connection) # Send it to all werewolves

Expand Down Expand Up @@ -241,6 +246,7 @@ def eventloop(self):
fn.send_failure(i, error=None)
pass
except Exception as e:
print("===HANDLED ERROR===")
traceback.print_exc()
fn.send_failure(i, error=None)
except:
Expand Down

0 comments on commit fe3bb64

Please sign in to comment.