more clear admin command logging
puts channel name first instead of in between the command and the arguments
This commit is contained in:
parent
87bb3fc599
commit
0f566e3e39
@ -14,7 +14,7 @@ import botconfig
|
||||
import settings.wolfgame as var
|
||||
from tools import logger
|
||||
|
||||
adminlog = logger(None, write=False)
|
||||
adminlog = logger(None)
|
||||
|
||||
def generate(fdict, permissions=True, **kwargs):
|
||||
"""Generates a decorator generator. Always use this"""
|
||||
@ -92,7 +92,7 @@ def generate(fdict, permissions=True, **kwargs):
|
||||
if fnmatch.fnmatch(acc.lower(), pattern.lower()):
|
||||
for cmdname in s:
|
||||
if cmdname in var.ALLOW_ACCOUNTS[pattern]:
|
||||
adminlog(rawnick, s[0], largs[2], largs[3])
|
||||
adminlog(largs[2], rawnick, s[0], largs[3])
|
||||
return f(*largs)
|
||||
if not var.ACCOUNTS_ONLY and cloak:
|
||||
for pattern in var.DENY.keys():
|
||||
@ -105,18 +105,18 @@ def generate(fdict, permissions=True, **kwargs):
|
||||
if fnmatch.fnmatch(cloak.lower(), pattern.lower()):
|
||||
for cmdname in s:
|
||||
if cmdname in var.ALLOW[pattern]:
|
||||
adminlog(rawnick, s[0], largs[2], largs[3])
|
||||
adminlog(largs[2], rawnick, s[0], largs[3])
|
||||
return f(*largs) # no questions
|
||||
if owner_only:
|
||||
if var.is_owner(nick):
|
||||
adminlog(rawnick, s[0], largs[2], largs[3])
|
||||
adminlog(largs[2], rawnick, s[0], largs[3])
|
||||
return f(*largs)
|
||||
else:
|
||||
largs[0].notice(nick, "You are not the owner.")
|
||||
return
|
||||
if admin_only:
|
||||
if var.is_admin(nick):
|
||||
adminlog(rawnick, s[0], largs[2], largs[3])
|
||||
adminlog(largs[2], rawnick, s[0], largs[3])
|
||||
return f(*largs)
|
||||
else:
|
||||
largs[0].notice(nick, "You are not an admin.")
|
||||
|
Loading…
Reference in New Issue
Block a user