3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 09:19:23 +01:00

servermaps: assign servermaps.localmap to all opers

This commit is contained in:
James Lu 2018-03-02 16:18:55 -05:00
parent d5d94f86e8
commit 1c3f71ac1b

View File

@ -6,6 +6,17 @@ from pylinkirc.coremods import permissions
import collections
DEFAULT_PERMISSIONS = {"$ircop": ['servermaps.localmap']}
def main(irc=None):
"""Servermaps plugin main function, called on plugin load."""
# Register our permissions.
permissions.add_default_permissions(DEFAULT_PERMISSIONS)
def die(irc=None):
"""Servermaps plugin die function, called on plugin unload."""
permissions.remove_default_permissions(DEFAULT_PERMISSIONS)
def _percent(num, total):
return '%.1f' % (num/total*100)