summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-04-08 23:58:00 -0500
committerAdam <Adam@anope.org>2013-04-09 00:00:52 -0500
commit325b018ed0f39e21adad68d8d9223d505bef12f8 (patch)
tree1346d34fb4d685e8ffd2fa02670f9df0986eef1a
parent0a3d27a91f826db7c3bb639901450a5b00c80b64 (diff)
Add a default method for user's SendModeInternal
-rw-r--r--include/protocol.h2
-rw-r--r--modules/protocol/charybdis.cpp8
-rw-r--r--modules/protocol/inspircd11.cpp8
-rw-r--r--modules/protocol/inspircd12.cpp5
-rw-r--r--modules/protocol/inspircd20.cpp1
-rw-r--r--modules/protocol/ngircd.cpp8
-rw-r--r--src/protocol.cpp5
7 files changed, 6 insertions, 31 deletions
diff --git a/include/protocol.h b/include/protocol.h
index 23bed3003..2de0c8e08 100644
--- a/include/protocol.h
+++ b/include/protocol.h
@@ -29,7 +29,7 @@ class CoreExport IRCDProto : public Service
virtual void SendSVSKillInternal(const BotInfo *, User *, const Anope::string &);
virtual void SendModeInternal(const BotInfo *, const Channel *, const Anope::string &);
- virtual void SendModeInternal(const BotInfo *, const User *, const Anope::string &) = 0;
+ virtual void SendModeInternal(const BotInfo *, const User *, const Anope::string &);
virtual void SendKickInternal(const BotInfo *, const Channel *, const User *, const Anope::string &);
virtual void SendMessageInternal(const BotInfo *bi, const Anope::string &dest, const Anope::string &buf);
virtual void SendNoticeInternal(const BotInfo *bi, const Anope::string &dest, const Anope::string &msg);
diff --git a/modules/protocol/charybdis.cpp b/modules/protocol/charybdis.cpp
index e91478c7f..07acda4f2 100644
--- a/modules/protocol/charybdis.cpp
+++ b/modules/protocol/charybdis.cpp
@@ -109,14 +109,6 @@ class CharybdisProto : public IRCDProto
UplinkSocket::Message(Me) << "EUID " << u->nick << " 1 " << u->timestamp << " " << modes << " " << u->GetIdent() << " " << u->host << " 0 " << u->GetUID() << " * * :" << u->realname;
}
- void SendModeInternal(const BotInfo *bi, const User *u, const Anope::string &buf) anope_override
- {
- if (bi)
- UplinkSocket::Message(bi) << "MODE " << u->GetUID() << " " << buf;
- else
- UplinkSocket::Message(Me) << "MODE " << u->GetUID() << " " << buf;
- }
-
void SendLogin(User *u) anope_override
{
if (!u->Account())
diff --git a/modules/protocol/inspircd11.cpp b/modules/protocol/inspircd11.cpp
index 34b807983..845183642 100644
--- a/modules/protocol/inspircd11.cpp
+++ b/modules/protocol/inspircd11.cpp
@@ -177,14 +177,6 @@ class InspIRCdProto : public IRCDProto
UplinkSocket::Message(Me) << "FMODE " << dest->name << " " << dest->creation_time << " " << buf;
}
- void SendModeInternal(const BotInfo *bi, const User *u, const Anope::string &buf) anope_override
- {
- if (bi)
- UplinkSocket::Message(bi) << "MODE " << u->nick << " " << buf;
- else
- UplinkSocket::Message(Me) << "MODE " << u->nick << " " << buf;
- }
-
void SendClientIntroduction(const User *u) anope_override
{
Anope::string modes = "+" + u->GetModes();
diff --git a/modules/protocol/inspircd12.cpp b/modules/protocol/inspircd12.cpp
index dcabbac7f..d006f3f01 100644
--- a/modules/protocol/inspircd12.cpp
+++ b/modules/protocol/inspircd12.cpp
@@ -202,11 +202,6 @@ class InspIRCd12Proto : public IRCDProto
UplinkSocket::Message(source) << "FMODE " << dest->name << " " << dest->creation_time << " " << buf;
}
- void SendModeInternal(const BotInfo *bi, const User *u, const Anope::string &buf) anope_override
- {
- UplinkSocket::Message(bi) << "MODE " << u->GetUID() << " " << buf;
- }
-
void SendClientIntroduction(const User *u) anope_override
{
Anope::string modes = "+" + u->GetModes();
diff --git a/modules/protocol/inspircd20.cpp b/modules/protocol/inspircd20.cpp
index ac970ddf9..bb933e118 100644
--- a/modules/protocol/inspircd20.cpp
+++ b/modules/protocol/inspircd20.cpp
@@ -52,7 +52,6 @@ class InspIRCd20Proto : public IRCDProto
void SendAkill(User *u, XLine *x) anope_override { insp12->SendAkill(u, x); }
void SendNumericInternal(int numeric, const Anope::string &dest, const Anope::string &buf) anope_override { insp12->SendNumericInternal(numeric, dest, buf); }
void SendModeInternal(const BotInfo *source, const Channel *dest, const Anope::string &buf) anope_override { insp12->SendModeInternal(source, dest, buf); }
- void SendModeInternal(const BotInfo *bi, const User *u, const Anope::string &buf) anope_override { insp12->SendModeInternal(bi, u, buf); }
void SendClientIntroduction(const User *u) anope_override { insp12->SendClientIntroduction(u); }
void SendServer(const Server *server) anope_override { insp12->SendServer(server); }
void SendJoin(User *user, Channel *c, const ChannelStatus *status) anope_override { insp12->SendJoin(user, c, status); }
diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp
index ef226f87e..137251872 100644
--- a/modules/protocol/ngircd.cpp
+++ b/modules/protocol/ngircd.cpp
@@ -123,14 +123,6 @@ class ngIRCdProto : public IRCDProto
UplinkSocket::Message(Me) << "MODE " << dest->name << " " << buf;
}
- void SendModeInternal(const BotInfo *bi, const User *u, const Anope::string &buf) anope_override
- {
- if (bi)
- UplinkSocket::Message(bi) << "MODE " << u->nick << " " << buf;
- else
- UplinkSocket::Message(Me) << "MODE " << u->nick << " " << buf;
- }
-
void SendPartInternal(const BotInfo *bi, const Channel *chan, const Anope::string &buf) anope_override
{
if (!buf.empty())
diff --git a/src/protocol.cpp b/src/protocol.cpp
index b97f1158e..a66bf8227 100644
--- a/src/protocol.cpp
+++ b/src/protocol.cpp
@@ -54,6 +54,11 @@ void IRCDProto::SendModeInternal(const BotInfo *bi, const Channel *dest, const A
UplinkSocket::Message(bi) << "MODE " << dest->name << " " << buf;
}
+void IRCDProto::SendModeInternal(const BotInfo *bi, const User *dest, const Anope::string &buf)
+{
+ UplinkSocket::Message(bi) << "MODE " << dest->GetUID() << " " << buf;
+}
+
void IRCDProto::SendKickInternal(const BotInfo *bi, const Channel *c, const User *u, const Anope::string &r)
{
if (!r.empty())