mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-25 04:02:45 +01:00
utils: add isOper() function
This commit is contained in:
parent
1b4ec414cf
commit
7a6c32e0c4
7
utils.py
7
utils.py
@ -259,3 +259,10 @@ def isInternalServer(irc, sid):
|
||||
Returns whether <sid> is an internal PyLink PseudoServer.
|
||||
"""
|
||||
return (sid in irc.servers and irc.servers[sid].internal)
|
||||
|
||||
def isOper(irc, uid):
|
||||
"""<irc object> <UID>
|
||||
|
||||
Returns whether <UID> is an opered client.
|
||||
"""
|
||||
return (uid in irc.users and ("o", None) in irc.users[uid].modes)
|
||||
|
Loading…
Reference in New Issue
Block a user