mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-29 14:12:39 +01:00
changehost: limit 'applyhosts' to those with the changehost.applyhosts perm
This commit is contained in:
parent
60ca5af813
commit
12a8509299
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user