mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-01 07:04:06 +01:00
No need to be a CapabilityCheckingPrivmsg if our plugin name is the same as the capability we're checking.
This commit is contained in:
parent
141ddfec82
commit
8132f1db73
@ -56,8 +56,7 @@ import supybot.schedule as schedule
|
|||||||
import supybot.callbacks as callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
|
|
||||||
class Admin(privmsgs.CapabilityCheckingPrivmsg):
|
class Admin(privmsgs.Privmsg):
|
||||||
capability = 'admin'
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.__parent = super(Admin, self)
|
self.__parent = super(Admin, self)
|
||||||
self.__parent.__init__()
|
self.__parent.__init__()
|
||||||
|
@ -223,10 +223,9 @@ conf.registerGlobalValue(conf.supybot.plugins.Owner, 'quitMsg',
|
|||||||
this value is empty, the nick of the person giving the quit command will be
|
this value is empty, the nick of the person giving the quit command will be
|
||||||
used."""))
|
used."""))
|
||||||
|
|
||||||
class Owner(privmsgs.CapabilityCheckingPrivmsg):
|
class Owner(callbacks.Privmsg):
|
||||||
# This plugin must be first; its priority must be lowest; otherwise odd
|
# This plugin must be first; its priority must be lowest; otherwise odd
|
||||||
# things will happen when adding callbacks.
|
# things will happen when adding callbacks.
|
||||||
capability = 'owner'
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
self.__parent = super(Owner, self)
|
self.__parent = super(Owner, self)
|
||||||
self.__parent.__init__()
|
self.__parent.__init__()
|
||||||
|
Loading…
Reference in New Issue
Block a user