Only check silence for role commands, and only after they have the right role
This commit is contained in:
parent
cd11ace8a2
commit
eb64f5dc45
@ -157,13 +157,6 @@ class cmd:
|
|||||||
cli.notice(nick, messages["player_not_playing"])
|
cli.notice(nick, messages["player_not_playing"])
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.silenced and nick in var.SILENCED:
|
|
||||||
if chan == nick:
|
|
||||||
pm(cli, nick, messages["silenced"])
|
|
||||||
else:
|
|
||||||
cli.notice(nick, messages["silenced"])
|
|
||||||
return
|
|
||||||
|
|
||||||
if self.roles:
|
if self.roles:
|
||||||
for role in self.roles:
|
for role in self.roles:
|
||||||
if nick in var.ROLES[role]:
|
if nick in var.ROLES[role]:
|
||||||
@ -171,6 +164,13 @@ class cmd:
|
|||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if self.silenced and nick in var.SILENCED:
|
||||||
|
if chan == nick:
|
||||||
|
pm(cli, nick, messages["silenced"])
|
||||||
|
else:
|
||||||
|
cli.notice(nick, messages["silenced"])
|
||||||
|
return
|
||||||
|
|
||||||
return self.func(*largs) # don't check restrictions for role commands
|
return self.func(*largs) # don't check restrictions for role commands
|
||||||
|
|
||||||
forced_owner_only = False
|
forced_owner_only = False
|
||||||
|
Loading…
Reference in New Issue
Block a user