From 12a85092990743d46808544e35a787e5e048ab8c Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 9 Dec 2016 22:07:27 -0800 Subject: [PATCH] changehost: limit 'applyhosts' to those with the changehost.applyhosts perm --- plugins/changehost.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/changehost.py b/plugins/changehost.py index c5ee221..d40dbfc 100644 --- a/plugins/changehost.py +++ b/plugins/changehost.py @@ -3,6 +3,7 @@ Changehost plugin - automatically changes the hostname of matching users. """ from pylinkirc import utils, world, conf from pylinkirc.log import log +from pylinkirc.coremods import permissions import string @@ -125,6 +126,8 @@ def applyhosts(irc, sender, args): Applies all configured hosts for users on the given network, or the current network if none is specified.""" + permissions.checkPermissions(irc, sender, ['changehost.applyhosts']) + try: # Try to get network from the command line. network = world.networkobjects[args[0]] except IndexError: # No network was given