Skip to content

Commit

Permalink
Fix a wee bit of an auth error in commands
Browse files Browse the repository at this point in the history
  • Loading branch information
lepinkainen committed Jul 4, 2017
1 parent 6aabe96 commit 2b80102
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyfibot/botcore.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,8 @@ def _command(self, user, channel, cmnd):
for module, env in self.factory.ns.items():
myglobals, mylocals = env
# find all matching command functions
commands = [(c, ref) for c, ref in mylocals.items() if re.match(r'(command|admin)_%s' % cmnd, c)]
commands = [(c, ref) for c, ref in mylocals.items() if c == "command_%s" % cmnd]
commands += [(c, ref) for c, ref in mylocals.items() if c == "admin_%s" % cmnd]

for cname, command in commands:
if not self.factory.isAdmin(user) and cname.startswith('admin'):
Expand Down

0 comments on commit 2b80102

Please sign in to comment.