add is_admin(...)

This commit is contained in:
randomuser 2021-08-11 20:53:18 -05:00
parent 1a0a8eae73
commit b2a8379c9b
1 changed files with 6 additions and 0 deletions

View File

@ -1,4 +1,5 @@
from irctokens import build from irctokens import build
# This file is part of modbot. # This file is part of modbot.
# modbot is free software: you can redistribute it and/or # modbot is free software: you can redistribute it and/or
@ -26,3 +27,8 @@ def cmdparse(line):
try: params = splitted[1:] try: params = splitted[1:]
except IndexError: params = None except IndexError: params = None
return (command, params) return (command, params)
def is_admin(srv, nick):
return nick in srv.admins