mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-23 18:54:05 +01:00
plugins, coremods: migrate (un)registerService calls to snake case (#523)
This commit is contained in:
parent
9e3f412f0b
commit
bea2ea8ebd
@ -67,7 +67,7 @@ def shutdown(irc=None):
|
||||
_kill_plugins(irc=irc)
|
||||
|
||||
# Remove our main PyLink bot as well.
|
||||
utils.unregisterService('pylink')
|
||||
utils.unregister_service('pylink')
|
||||
|
||||
for ircobj in world.networkobjects.copy().values():
|
||||
# Disconnect all our networks.
|
||||
|
@ -145,4 +145,4 @@ utils.add_hook(handle_commands, 'PRIVMSG')
|
||||
# TODO: be more specific, and possibly allow plugins to modify this to mention
|
||||
# their features?
|
||||
mydesc = "\x02PyLink\x02 provides extended network services for IRC."
|
||||
utils.registerService('pylink', default_nick="PyLink", desc=mydesc, manipulatable=True)
|
||||
utils.register_service('pylink', default_nick="PyLink", desc=mydesc, manipulatable=True)
|
||||
|
@ -12,7 +12,7 @@ mydesc = ("The \x02Automode\x02 plugin provides simple channel ACL management by
|
||||
"to users matching hostmasks or exttargets.")
|
||||
|
||||
# Register ourselves as a service.
|
||||
modebot = utils.registerService("automode", default_nick="Automode", desc=mydesc)
|
||||
modebot = utils.register_service("automode", default_nick="Automode", desc=mydesc)
|
||||
reply = modebot.reply
|
||||
error = modebot.error
|
||||
|
||||
@ -46,7 +46,7 @@ def die(irc=None):
|
||||
"""Saves the Automode database and quit."""
|
||||
datastore.die()
|
||||
permissions.remove_default_permissions(default_permissions)
|
||||
utils.unregisterService('automode')
|
||||
utils.unregister_service('automode')
|
||||
|
||||
def _check_automode_access(irc, uid, channel, command):
|
||||
"""Checks the caller's access to Automode."""
|
||||
|
@ -8,7 +8,7 @@ from pylinkirc.log import log
|
||||
|
||||
mydesc = "The \x02Games\x02 plugin provides simple games for IRC."
|
||||
|
||||
gameclient = utils.registerService("Games", default_nick="Games", manipulatable=True, desc=mydesc)
|
||||
gameclient = utils.register_service("Games", default_nick="Games", manipulatable=True, desc=mydesc)
|
||||
reply = gameclient.reply # TODO find a better syntax for ServiceBot.reply()
|
||||
error = gameclient.error # TODO find a better syntax for ServiceBot.error()
|
||||
# commands
|
||||
@ -71,4 +71,4 @@ def eightball(irc, source, args):
|
||||
gameclient.add_cmd(eightball, featured=True, aliases=('8ball', '8b'))
|
||||
|
||||
def die(irc=None):
|
||||
utils.unregisterService('games')
|
||||
utils.unregister_service('games')
|
||||
|
Loading…
Reference in New Issue
Block a user