update
This commit is contained in:
@@ -86,16 +86,7 @@ class PluginManager:
|
||||
room.send_text(reply)
|
||||
|
||||
def is_sender_admin(self, event):
|
||||
return False
|
||||
"""Checks if author is admin"""
|
||||
if message['type'] == 'groupchat':
|
||||
# We don't know the jid. Either there's a problem or it's an anonymous room
|
||||
if message['from'].full not in self.bot.presences:
|
||||
return False
|
||||
jid = self.bot.presences[message['from'].full]
|
||||
else:
|
||||
jid = message['from'].full.split('/')[0]
|
||||
return jid in self.config.ADMINS
|
||||
return event['sender'] in self.config.ADMINS
|
||||
|
||||
def is_admin_command(self, command):
|
||||
return command in self.commands and self.commands[command]['options'].get('admin', False)
|
||||
|
||||
Reference in New Issue
Block a user