Skip to content

Commit

Permalink
allowMsg in Mute uses player API
Browse files Browse the repository at this point in the history
  • Loading branch information
greghaynes committed Nov 11, 2009
1 parent 47fafc5 commit cc48bde
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/pyscripts/Mute/mute.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@

def allowMsg(cn, text):
try:
if mute_spectators[0] == True and player(cn).isSpectator():
sbserver.playerMessage(cn, notice('Spectators are currently muted. No one will recieve your message'))
p = player(cn)
if mute_spectators[0] == True and p.isSpectator():
p.message(notice('Spectators are currently muted. No one will recieve your message'))
return False
if player(cn).is_muted:
sbserver.playerMessage(cn, notice('You are currently muted. No one will recieve your message'))
if p.is_muted:
p.message(notice('You are currently muted. No one will recieve your message'))
return False
except (AttributeError, ValueError):
pass
Expand Down

0 comments on commit cc48bde

Please sign in to comment.