From feb9cce4eea4c77f338e37e395c89e7624edfea6 Mon Sep 17 00:00:00 2001 From: James Lu Date: Thu, 23 Mar 2017 23:53:43 -0700 Subject: [PATCH] core: Drop fake ServiceBot client stubs on Clientbot (#403) --- coremods/service_support.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/coremods/service_support.py b/coremods/service_support.py index adae0e3..5666ca4 100644 --- a/coremods/service_support.py +++ b/coremods/service_support.py @@ -14,6 +14,11 @@ def spawn_service(irc, source, command, args): # Service name name = args['name'] + if name != 'pylink' and not irc.proto.hasCap('can-spawn-clients'): + log.debug("(%s) Not spawning service %s because the server doesn't support spawning clients", + irc.name, name) + return + # Get the ServiceBot object. sbot = world.services[name] @@ -26,10 +31,6 @@ def spawn_service(irc, source, command, args): nick = irc.serverdata.get("%s_nick" % name) or conf.conf.get(name, {}).get('nick') or sbot.nick or name ident = irc.serverdata.get("%s_ident" % name) or conf.conf.get(name, {}).get('ident') or sbot.ident or name - if name != 'pylink' and irc.protoname == 'clientbot': - # Prefix service bots spawned on Clientbot to prevent possible nick collisions. - nick = 'PyLinkService@' + nick - # TODO: make this configurable? host = irc.hostname()