From 6d7fe69cdf9ff1b8fcb149734753c2800894b68e Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 9 Mar 2025 18:51:03 +0000 Subject: Add support for oper-only quit messages. This currently only works on InspIRCd but I believe that other servers also support this. --- src/bots.cpp | 2 +- src/protocol.cpp | 2 +- src/uplink.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/bots.cpp b/src/bots.cpp index 5aa953672..35a4ccb05 100644 --- a/src/bots.cpp +++ b/src/bots.cpp @@ -66,7 +66,7 @@ BotInfo::~BotInfo() // If we're synchronised with the uplink already, send the bot. if (Me && Me->IsSynced()) { - IRCD->SendQuit(this, ""); + IRCD->SendQuit(this); FOREACH_MOD(OnUserQuit, (this, "")); this->introduced = false; XLine x(this->nick); diff --git a/src/protocol.cpp b/src/protocol.cpp index a45985a0d..7a167582a 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -151,7 +151,7 @@ void IRCDProto::SendTagmsg(const MessageSource &source, const Anope::string &des Uplink::Send(tags, source, "TAGMSG", dest); } -void IRCDProto::SendQuit(User *u, const Anope::string &buf) +void IRCDProto::SendQuit(User *u, const Anope::string &buf, const Anope::string &operbuf) { if (!buf.empty()) Uplink::Send(u, "QUIT", buf); diff --git a/src/uplink.cpp b/src/uplink.cpp index 6e39f163e..981c5e6e5 100644 --- a/src/uplink.cpp +++ b/src/uplink.cpp @@ -130,7 +130,7 @@ UplinkSocket::~UplinkSocket() if (u->server == Me) { /* Don't use quitmsg here, it may contain information you don't want people to see */ - IRCD->SendQuit(u, "Shutting down"); + IRCD->SendQuit(u, "Shutting down", Anope::QuitReason); BotInfo *bi = BotInfo::Find(u->GetUID()); if (bi != NULL) bi->introduced = false; -- cgit