3
0
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:
James Lu 2018-03-02 19:58:10 -08:00
parent 9e3f412f0b
commit bea2ea8ebd
4 changed files with 6 additions and 6 deletions

View File

@ -67,7 +67,7 @@ def shutdown(irc=None):
_kill_plugins(irc=irc) _kill_plugins(irc=irc)
# Remove our main PyLink bot as well. # Remove our main PyLink bot as well.
utils.unregisterService('pylink') utils.unregister_service('pylink')
for ircobj in world.networkobjects.copy().values(): for ircobj in world.networkobjects.copy().values():
# Disconnect all our networks. # Disconnect all our networks.

View File

@ -145,4 +145,4 @@ utils.add_hook(handle_commands, 'PRIVMSG')
# TODO: be more specific, and possibly allow plugins to modify this to mention # TODO: be more specific, and possibly allow plugins to modify this to mention
# their features? # their features?
mydesc = "\x02PyLink\x02 provides extended network services for IRC." 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)

View File

@ -12,7 +12,7 @@ mydesc = ("The \x02Automode\x02 plugin provides simple channel ACL management by
"to users matching hostmasks or exttargets.") "to users matching hostmasks or exttargets.")
# Register ourselves as a service. # 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 reply = modebot.reply
error = modebot.error error = modebot.error
@ -46,7 +46,7 @@ def die(irc=None):
"""Saves the Automode database and quit.""" """Saves the Automode database and quit."""
datastore.die() datastore.die()
permissions.remove_default_permissions(default_permissions) permissions.remove_default_permissions(default_permissions)
utils.unregisterService('automode') utils.unregister_service('automode')
def _check_automode_access(irc, uid, channel, command): def _check_automode_access(irc, uid, channel, command):
"""Checks the caller's access to Automode.""" """Checks the caller's access to Automode."""

View File

@ -8,7 +8,7 @@ from pylinkirc.log import log
mydesc = "The \x02Games\x02 plugin provides simple games for IRC." 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() reply = gameclient.reply # TODO find a better syntax for ServiceBot.reply()
error = gameclient.error # TODO find a better syntax for ServiceBot.error() error = gameclient.error # TODO find a better syntax for ServiceBot.error()
# commands # commands
@ -71,4 +71,4 @@ def eightball(irc, source, args):
gameclient.add_cmd(eightball, featured=True, aliases=('8ball', '8b')) gameclient.add_cmd(eightball, featured=True, aliases=('8ball', '8b'))
def die(irc=None): def die(irc=None):
utils.unregisterService('games') utils.unregister_service('games')