summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2025-03-09 18:51:03 +0000
committerSadie Powell <sadie@witchery.services>2025-03-09 18:51:03 +0000
commit6d7fe69cdf9ff1b8fcb149734753c2800894b68e (patch)
treea35c951fa0e129e401081a25dc8253ff77b49de0 /src
parent314ef609001bd511c7a7ef243191bcd471bffa1c (diff)
Add support for oper-only quit messages.
This currently only works on InspIRCd but I believe that other servers also support this.
Diffstat (limited to 'src')
-rw-r--r--src/bots.cpp2
-rw-r--r--src/protocol.cpp2
-rw-r--r--src/uplink.cpp2
3 files changed, 3 insertions, 3 deletions
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;