From 4fcbbbe4fbc137841b47c8e2372477b85649270a Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 17 Dec 2016 21:44:22 -0500 Subject: Split ircdproto send functions out into separate services This makes it easier to see which send functions a protocol module implements as they are all explicitly registered by the module, and avoids the problem of subtly breaking other protocol modules when using inheritance. Also split the old "core" send implementations out into a module, and the TS6 ID generator --- modules/botserv/bot.cpp | 5 ++++- modules/botserv/main/botserv.cpp | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/botserv') diff --git a/modules/botserv/bot.cpp b/modules/botserv/bot.cpp index 30550df56..082bd6337 100644 --- a/modules/botserv/bot.cpp +++ b/modules/botserv/bot.cpp @@ -232,7 +232,10 @@ class CommandBSBot : public Command bi->introduced = false; } else - IRCD->SendNickChange(bi, nick); + { + IRCD->Send(bi, nick, Anope::CurTime); + bi->timestamp = Anope::CurTime; + } if (!nick.equals_cs(bi->nick)) { diff --git a/modules/botserv/main/botserv.cpp b/modules/botserv/main/botserv.cpp index 4f3d4c92b..4b0309b31 100644 --- a/modules/botserv/main/botserv.cpp +++ b/modules/botserv/main/botserv.cpp @@ -62,6 +62,7 @@ class BotServCore : public Module, public BotServ::BotServService void OnBotAssign(User *sender, ChanServ::Channel *ci, ServiceBot *bi) override { + printf("on bot assign !\n"); if (ci->c && ci->c->users.size() >= Config->GetModule(this)->Get("minusers")) { ChannelStatus status(Config->GetModule(this)->Get("botmodes")); -- cgit