3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-27 21:19:31 +01:00

utils: unregisterService should be case insensitive

This commit is contained in:
James Lu 2016-07-07 22:41:39 -07:00
parent df41dabb71
commit 4f26a29196

View File

@ -364,6 +364,7 @@ def registerService(name, *args, **kwargs):
def unregisterService(name):
"""Unregisters an existing service bot."""
assert name in world.services, "Unknown service %s" % name
name = name.lower()
sbot = world.services[name]
for ircnet, uid in sbot.uids.items():
world.networkobjects[ircnet].proto.quit(uid, "Service unloaded.")