From 1c3f71ac1b8d9ae325b25be7e1524599c0cf0da4 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 2 Mar 2018 16:18:55 -0500 Subject: [PATCH] servermaps: assign servermaps.localmap to all opers --- plugins/servermaps.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins/servermaps.py b/plugins/servermaps.py index 8bb1bcd..c562fb6 100644 --- a/plugins/servermaps.py +++ b/plugins/servermaps.py @@ -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)