def initModule(cod): global my_client cod.s2scommands["PRIVMSG"].append(handlePRIVMSG) cod.s2scommands["JOIN"].append(handleJOIN) my_client = makeService(cod.config["replay"]["nick"], cod.config["replay"]["user"], cod.config["replay"]["host"], cod.config["replay"]["gecos"], cod.getUID()) cod.burstClient(cod, my_client) cod.join(cod.config["etc"]["snoopchan"], my_client)
def initModule(cod): global client if "nodeping" not in cod.config: cod.serviceLog("Need nodeping config") raise ImportError client = makeService(cod.config["nodeping"]["nick"], cod.config["nodeping"]["user"], cod.config["nodeping"]["host"], cod.config["nodeping"]["gecos"], cod.getUID()) cod.clients[client.uid] = client cod.protocol.add_client(client) cod.log("Bursted pingserv client") cod.join(cod.config["etc"]["snoopchan"], client) cod.addHook("privmsg", handle_commands)
def initModule(cod): global client if "4chanserv" not in cod.config: cod.servicesLog("Need 4chanserv config") raise ImportError client = makeService(cod.config["4chanserv"]["nick"], cod.config["4chanserv"]["user"], cod.config["4chanserv"]["host"], cod.config["4chanserv"]["gecos"], cod.getUID()) cod.clients[client.uid] = client client.channels.append(cod.config["etc"]["snoopchan"]) cod.log("Bursting 4chanserv client") cod.burstClient(cod, client) cod.join(client.channels[0], client) cod.addHook("privmsg", handleCommands)