summaryrefslogtreecommitdiff
path: root/modules/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'modules/protocol')
-rw-r--r--modules/protocol/bahamut.cpp26
-rw-r--r--modules/protocol/inspircd11.cpp40
-rw-r--r--modules/protocol/inspircd12.cpp10
-rw-r--r--modules/protocol/inspircd20.cpp10
-rw-r--r--modules/protocol/ratbox.cpp14
-rw-r--r--modules/protocol/unreal32.cpp40
6 files changed, 70 insertions, 70 deletions
diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp
index 72b57ce4c..32579f50d 100644
--- a/modules/protocol/bahamut.cpp
+++ b/modules/protocol/bahamut.cpp
@@ -101,19 +101,19 @@ class BahamutIRCdProto : public IRCDProto
{
if (buf.empty())
return;
- send_cmd(bi ? bi->nick : Config.ServerName, "SVSMODE %s %ld %s", u->nick.c_str(), static_cast<long>(u->timestamp), buf.c_str());
+ send_cmd(bi ? bi->nick : Config->ServerName, "SVSMODE %s %ld %s", u->nick.c_str(), static_cast<long>(u->timestamp), buf.c_str());
}
/* SVSHOLD - set */
void SendSVSHold(const Anope::string &nick)
{
- send_cmd(Config.ServerName, "SVSHOLD %s %u :Being held for registered user", nick.c_str(), static_cast<unsigned>(Config.NSReleaseTimeout));
+ send_cmd(Config->ServerName, "SVSHOLD %s %u :Being held for registered user", nick.c_str(), static_cast<unsigned>(Config->NSReleaseTimeout));
}
/* SVSHOLD - release */
void SendSVSHoldDel(const Anope::string &nick)
{
- send_cmd(Config.ServerName, "SVSHOLD %s 0", nick.c_str());
+ send_cmd(Config->ServerName, "SVSHOLD %s 0", nick.c_str());
}
/* SVSMODE -b */
@@ -126,9 +126,9 @@ class BahamutIRCdProto : public IRCDProto
void SendSVSModeChan(const Channel *c, const Anope::string &mode, const Anope::string &nick)
{
if (!nick.empty())
- send_cmd(Config.ServerName, "SVSMODE %s %s %s", c->name.c_str(), mode.c_str(), nick.c_str());
+ send_cmd(Config->ServerName, "SVSMODE %s %s %s", c->name.c_str(), mode.c_str(), nick.c_str());
else
- send_cmd(Config.ServerName, "SVSMODE %s %s", c->name.c_str(), mode.c_str());
+ send_cmd(Config->ServerName, "SVSMODE %s %s", c->name.c_str(), mode.c_str());
}
/* SQLINE */
@@ -248,8 +248,8 @@ class BahamutIRCdProto : public IRCDProto
void SendClientIntroduction(const Anope::string &nick, const Anope::string &user, const Anope::string &host, const Anope::string &real, const Anope::string &modes, const Anope::string &)
{
- EnforceQlinedNick(nick, Config.s_BotServ);
- send_cmd("", "NICK %s 1 %ld %s %s %s %s 0 0 :%s", nick.c_str(), static_cast<long>(time(NULL)), modes.c_str(), user.c_str(), host.c_str(), Config.ServerName.c_str(), real.c_str());
+ EnforceQlinedNick(nick, Config->s_BotServ);
+ send_cmd("", "NICK %s 1 %ld %s %s %s %s 0 0 :%s", nick.c_str(), static_cast<long>(time(NULL)), modes.c_str(), user.c_str(), host.c_str(), Config->ServerName.c_str(), real.c_str());
}
/* SVSMODE +d */
@@ -501,7 +501,7 @@ int anope_event_os(const Anope::string &source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- m_privmsg(source, Config.s_OperServ, av[0]);
+ m_privmsg(source, Config->s_OperServ, av[0]);
return MOD_CONT;
}
@@ -510,7 +510,7 @@ int anope_event_ns(const Anope::string &source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- m_privmsg(source, Config.s_NickServ, av[0]);
+ m_privmsg(source, Config->s_NickServ, av[0]);
return MOD_CONT;
}
@@ -519,7 +519,7 @@ int anope_event_ms(const Anope::string &source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- m_privmsg(source, Config.s_MemoServ, av[0]);
+ m_privmsg(source, Config->s_MemoServ, av[0]);
return MOD_CONT;
}
@@ -528,7 +528,7 @@ int anope_event_hs(const Anope::string &source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- m_privmsg(source, Config.s_HostServ, av[0]);
+ m_privmsg(source, Config->s_HostServ, av[0]);
return MOD_CONT;
}
@@ -537,7 +537,7 @@ int anope_event_cs(const Anope::string &source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- m_privmsg(source, Config.s_ChanServ, av[0]);
+ m_privmsg(source, Config->s_ChanServ, av[0]);
return MOD_CONT;
}
@@ -668,7 +668,7 @@ int anope_event_ping(const Anope::string &source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- ircdproto->SendPong(ac > 1 ? av[1] : Config.ServerName, av[0]);
+ ircdproto->SendPong(ac > 1 ? av[1] : Config->ServerName, av[0]);
return MOD_CONT;
}
diff --git a/modules/protocol/inspircd11.cpp b/modules/protocol/inspircd11.cpp
index c5a4c79f7..31ea2ae19 100644
--- a/modules/protocol/inspircd11.cpp
+++ b/modules/protocol/inspircd11.cpp
@@ -70,7 +70,7 @@ void inspircd_cmd_chghost(const Anope::string &nick, const Anope::string &vhost)
{
if (nick.empty() || vhost.empty())
return;
- send_cmd(Config.s_OperServ, "CHGHOST %s %s", nick.c_str(), vhost.c_str());
+ send_cmd(Config->s_OperServ, "CHGHOST %s %s", nick.c_str(), vhost.c_str());
}
else
ircdproto->SendGlobops(OperServ, "CHGHOST not loaded!");
@@ -95,7 +95,7 @@ class InspIRCdProto : public IRCDProto
{
void SendAkillDel(const XLine *x)
{
- send_cmd(Config.s_OperServ, "GLINE %s", x->Mask.c_str());
+ send_cmd(Config->s_OperServ, "GLINE %s", x->Mask.c_str());
}
void SendTopic(const BotInfo *whosets, const Channel *c, const Anope::string &whosetit, const Anope::string &topic)
@@ -120,12 +120,12 @@ class InspIRCdProto : public IRCDProto
time_t timeleft = x->Expires - time(NULL);
if (timeleft > 172800)
timeleft = 172800;
- send_cmd(Config.ServerName, "ADDLINE G %s %s %ld %ld :%s", x->Mask.c_str(), x->By.c_str(), static_cast<long>(time(NULL)), static_cast<long>(timeleft), x->Reason.c_str());
+ send_cmd(Config->ServerName, "ADDLINE G %s %s %ld %ld :%s", x->Mask.c_str(), x->By.c_str(), static_cast<long>(time(NULL)), static_cast<long>(timeleft), x->Reason.c_str());
}
void SendSVSKillInternal(const BotInfo *source, const User *user, const Anope::string &buf)
{
- send_cmd(source ? source->nick : Config.ServerName, "KILL %s :%s", user->nick.c_str(), buf.c_str());
+ send_cmd(source ? source->nick : Config->ServerName, "KILL %s :%s", user->nick.c_str(), buf.c_str());
}
void SendSVSMode(const User *u, int ac, const char **av)
@@ -142,19 +142,19 @@ class InspIRCdProto : public IRCDProto
{
if (buf.empty())
return;
- send_cmd(source ? source->nick : Config.s_OperServ, "FMODE %s %u %s", dest->name.c_str(), static_cast<unsigned>(dest->creation_time), buf.c_str());
+ send_cmd(source ? source->nick : Config->s_OperServ, "FMODE %s %u %s", dest->name.c_str(), static_cast<unsigned>(dest->creation_time), buf.c_str());
}
void SendModeInternal(const BotInfo *bi, const User *u, const Anope::string &buf)
{
if (buf.empty())
return;
- send_cmd(bi ? bi->nick : Config.ServerName, "MODE %s %s", u->nick.c_str(), buf.c_str());
+ send_cmd(bi ? bi->nick : Config->ServerName, "MODE %s %s", u->nick.c_str(), buf.c_str());
}
void SendClientIntroduction(const Anope::string &nick, const Anope::string &user, const Anope::string &host, const Anope::string &real, const Anope::string &modes, const Anope::string &)
{
- send_cmd(Config.ServerName, "NICK %ld %s %s %s %s %s 0.0.0.0 :%s", static_cast<long>(time(NULL)), nick.c_str(), host.c_str(), host.c_str(), user.c_str(), modes.c_str(), real.c_str());
+ send_cmd(Config->ServerName, "NICK %ld %s %s %s %s %s 0.0.0.0 :%s", static_cast<long>(time(NULL)), nick.c_str(), host.c_str(), host.c_str(), user.c_str(), modes.c_str(), real.c_str());
send_cmd(nick, "OPERTYPE Service");
}
@@ -170,13 +170,13 @@ class InspIRCdProto : public IRCDProto
{
if (buf.empty())
return;
- send_cmd(Config.ServerName, "NOTICE @%s :%s", dest->name.c_str(), buf.c_str());
+ send_cmd(Config->ServerName, "NOTICE @%s :%s", dest->name.c_str(), buf.c_str());
}
/* SERVER services-dev.chatspike.net password 0 :Description here */
void SendServer(const Server *server)
{
- send_cmd(Config.ServerName, "SERVER %s %s %d :%s", server->GetName().c_str(), currentpass.c_str(), server->GetHops(), server->GetDescription().c_str());
+ send_cmd(Config->ServerName, "SERVER %s %s %d :%s", server->GetName().c_str(), currentpass.c_str(), server->GetHops(), server->GetDescription().c_str());
}
/* JOIN */
@@ -188,13 +188,13 @@ class InspIRCdProto : public IRCDProto
/* UNSQLINE */
void SendSQLineDel(const XLine *x)
{
- send_cmd(Config.s_OperServ, "QLINE %s", x->Mask.c_str());
+ send_cmd(Config->s_OperServ, "QLINE %s", x->Mask.c_str());
}
/* SQLINE */
void SendSQLine(const XLine *x)
{
- send_cmd(Config.ServerName, "ADDLINE Q %s %s %ld 0 :%s", x->Mask.c_str(), Config.s_OperServ.c_str(), static_cast<long>(time(NULL)), x->Reason.c_str());
+ send_cmd(Config->ServerName, "ADDLINE Q %s %s %ld 0 :%s", x->Mask.c_str(), Config->s_OperServ.c_str(), static_cast<long>(time(NULL)), x->Reason.c_str());
}
/* SQUIT */
@@ -202,7 +202,7 @@ class InspIRCdProto : public IRCDProto
{
if (servname.empty() || message.empty())
return;
- send_cmd(Config.ServerName, "SQUIT %s :%s", servname.c_str(), message.c_str());
+ send_cmd(Config->ServerName, "SQUIT %s :%s", servname.c_str(), message.c_str());
}
/* Functions that use serval cmd functions */
@@ -220,7 +220,7 @@ class InspIRCdProto : public IRCDProto
inspircd_cmd_pass(uplink_server->password);
SendServer(Me);
send_cmd("", "BURST");
- send_cmd(Config.ServerName, "VERSION :Anope-%s %s :%s - (%s) -- %s", Anope::Version().c_str(), Config.ServerName.c_str(), ircd->name, Config.EncModuleList.begin()->c_str(), Anope::Build().c_str());
+ send_cmd(Config->ServerName, "VERSION :Anope-%s %s :%s - (%s) -- %s", Anope::Version().c_str(), Config->ServerName.c_str(), ircd->name, Config->EncModuleList.begin()->c_str(), Anope::Build().c_str());
}
/* CHGIDENT */
@@ -230,7 +230,7 @@ class InspIRCdProto : public IRCDProto
{
if (nick.empty() || vIdent.empty())
return;
- send_cmd(Config.s_OperServ, "CHGIDENT %s %s", nick.c_str(), vIdent.c_str());
+ send_cmd(Config->s_OperServ, "CHGIDENT %s %s", nick.c_str(), vIdent.c_str());
}
else
ircdproto->SendGlobops(OperServ, "CHGIDENT not loaded!");
@@ -239,25 +239,25 @@ class InspIRCdProto : public IRCDProto
/* SVSHOLD - set */
void SendSVSHold(const Anope::string &nick)
{
- send_cmd(Config.s_OperServ, "SVSHOLD %s %ds :Being held for registered user", nick.c_str(), static_cast<int>(Config.NSReleaseTimeout));
+ send_cmd(Config->s_OperServ, "SVSHOLD %s %ds :Being held for registered user", nick.c_str(), static_cast<int>(Config->NSReleaseTimeout));
}
/* SVSHOLD - release */
void SendSVSHoldDel(const Anope::string &nick)
{
- send_cmd(Config.s_OperServ, "SVSHOLD %s", nick.c_str());
+ send_cmd(Config->s_OperServ, "SVSHOLD %s", nick.c_str());
}
/* UNSZLINE */
void SendSZLineDel(const XLine *x)
{
- send_cmd(Config.s_OperServ, "ZLINE %s", x->Mask.c_str());
+ send_cmd(Config->s_OperServ, "ZLINE %s", x->Mask.c_str());
}
/* SZLINE */
void SendSZLine(const XLine *x)
{
- send_cmd(Config.ServerName, "ADDLINE Z %s %s %ld 0 :%s", x->Mask.c_str(), x->By.c_str(), static_cast<long>(time(NULL)), x->Reason.c_str());
+ send_cmd(Config->ServerName, "ADDLINE Z %s %s %ld 0 :%s", x->Mask.c_str(), x->By.c_str(), static_cast<long>(time(NULL)), x->Reason.c_str());
}
void SendSVSJoin(const Anope::string &source, const Anope::string &nick, const Anope::string &chan, const Anope::string &)
@@ -507,7 +507,7 @@ int anope_event_ping(const Anope::string &source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- ircdproto->SendPong(Config.ServerName, av[0]);
+ ircdproto->SendPong(Config->ServerName, av[0]);
return MOD_CONT;
}
@@ -579,7 +579,7 @@ int anope_event_rsquit(const Anope::string &source, int ac, const char **av)
return MOD_CONT;
/* Horrible workaround to an insp bug (#) in how RSQUITs are sent - mark */
- if (ac > 1 && Config.ServerName.equals_cs(av[0]))
+ if (ac > 1 && Config->ServerName.equals_cs(av[0]))
do_squit(source, ac - 1, av + 1);
else
do_squit(source, ac, av);
diff --git a/modules/protocol/inspircd12.cpp b/modules/protocol/inspircd12.cpp
index cd628b005..4a4ef9a00 100644
--- a/modules/protocol/inspircd12.cpp
+++ b/modules/protocol/inspircd12.cpp
@@ -194,7 +194,7 @@ class InspIRCdProto : public IRCDProto
/* SQLINE */
void SendSQLine(const XLine *x)
{
- send_cmd(TS6SID, "ADDLINE Q %s %s %ld 0 :%s", x->Mask.c_str(), Config.s_OperServ.c_str(), static_cast<long>(time(NULL)), x->Reason.c_str());
+ send_cmd(TS6SID, "ADDLINE Q %s %s %ld 0 :%s", x->Mask.c_str(), Config->s_OperServ.c_str(), static_cast<long>(time(NULL)), x->Reason.c_str());
}
/* SQUIT */
@@ -218,7 +218,7 @@ class InspIRCdProto : public IRCDProto
inspircd_cmd_pass(uplink_server->password);
SendServer(Me);
send_cmd(TS6SID, "BURST");
- send_cmd(TS6SID, "VERSION :Anope-%s %s :%s - (%s) -- %s", Anope::Version().c_str(), Config.ServerName.c_str(), ircd->name, Config.EncModuleList.begin()->c_str(), Anope::Build().c_str());
+ send_cmd(TS6SID, "VERSION :Anope-%s %s :%s - (%s) -- %s", Anope::Version().c_str(), Config->ServerName.c_str(), ircd->name, Config->EncModuleList.begin()->c_str(), Anope::Build().c_str());
}
/* CHGIDENT */
@@ -233,7 +233,7 @@ class InspIRCdProto : public IRCDProto
/* SVSHOLD - set */
void SendSVSHold(const Anope::string &nick)
{
- send_cmd(OperServ->GetUID(), "SVSHOLD %s %u :Being held for registered user", nick.c_str(), static_cast<unsigned>(Config.NSReleaseTimeout));
+ send_cmd(OperServ->GetUID(), "SVSHOLD %s %u :Being held for registered user", nick.c_str(), static_cast<unsigned>(Config->NSReleaseTimeout));
}
/* SVSHOLD - release */
@@ -1285,8 +1285,8 @@ class ProtoInspIRCd : public Module
this->SetAuthor("Anope");
this->SetType(PROTOCOL);
- if (!Config.Numeric.empty())
- TS6SID = Config.Numeric;
+ if (!Config->Numeric.empty())
+ TS6SID = Config->Numeric;
pmodule_ircd_version("InspIRCd 1.2");
pmodule_ircd_var(myIrcd);
diff --git a/modules/protocol/inspircd20.cpp b/modules/protocol/inspircd20.cpp
index dfea02246..0a1a9eee6 100644
--- a/modules/protocol/inspircd20.cpp
+++ b/modules/protocol/inspircd20.cpp
@@ -192,7 +192,7 @@ class InspIRCdProto : public IRCDProto
/* SQLINE */
void SendSQLine(const XLine *x)
{
- send_cmd(TS6SID, "ADDLINE Q %s %s %ld 0 :%s", x->Mask.c_str(), Config.s_OperServ.c_str(), static_cast<long>(time(NULL)), x->Reason.c_str());
+ send_cmd(TS6SID, "ADDLINE Q %s %s %ld 0 :%s", x->Mask.c_str(), Config->s_OperServ.c_str(), static_cast<long>(time(NULL)), x->Reason.c_str());
}
/* SQUIT */
@@ -219,7 +219,7 @@ class InspIRCdProto : public IRCDProto
inspircd_cmd_pass(uplink_server->password);
SendServer(Me);
send_cmd(TS6SID, "BURST");
- send_cmd(TS6SID, "VERSION :Anope-%s %s :%s - (%s) -- %s", Anope::Version().c_str(), Config.ServerName.c_str(), ircd->name, Config.EncModuleList.begin()->c_str(), Anope::Build().c_str());
+ send_cmd(TS6SID, "VERSION :Anope-%s %s :%s - (%s) -- %s", Anope::Version().c_str(), Config->ServerName.c_str(), ircd->name, Config->EncModuleList.begin()->c_str(), Anope::Build().c_str());
}
/* CHGIDENT */
@@ -234,7 +234,7 @@ class InspIRCdProto : public IRCDProto
/* SVSHOLD - set */
void SendSVSHold(const Anope::string &nick)
{
- send_cmd(OperServ->GetUID(), "SVSHOLD %s %u :Being held for registered user", nick.c_str(), static_cast<unsigned>(Config.NSReleaseTimeout));
+ send_cmd(OperServ->GetUID(), "SVSHOLD %s %u :Being held for registered user", nick.c_str(), static_cast<unsigned>(Config->NSReleaseTimeout));
}
/* SVSHOLD - release */
@@ -1259,8 +1259,8 @@ class ProtoInspIRCd : public Module
this->SetAuthor("Anope");
this->SetType(PROTOCOL);
- if (!Config.Numeric.empty())
- TS6SID = Config.Numeric;
+ if (!Config->Numeric.empty())
+ TS6SID = Config->Numeric;
pmodule_ircd_version("InspIRCd 2.0");
pmodule_ircd_var(myIrcd);
diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp
index ff2a0f6c6..59abc7bc8 100644
--- a/modules/protocol/ratbox.cpp
+++ b/modules/protocol/ratbox.cpp
@@ -120,19 +120,19 @@ class RatboxProto : public IRCDTS6Proto
void SendSGLineDel(const XLine *x)
{
BotInfo *bi = OperServ;
- send_cmd(bi ? bi->GetUID() : Config.s_OperServ, "UNXLINE * %s", x->Mask.c_str());
+ send_cmd(bi ? bi->GetUID() : Config->s_OperServ, "UNXLINE * %s", x->Mask.c_str());
}
void SendSGLine(const XLine *x)
{
BotInfo *bi = OperServ;
- send_cmd(bi ? bi->GetUID() : Config.s_OperServ, "XLINE * %s 0 :%s", x->Mask.c_str(), x->Reason.c_str());
+ send_cmd(bi ? bi->GetUID() : Config->s_OperServ, "XLINE * %s 0 :%s", x->Mask.c_str(), x->Reason.c_str());
}
void SendAkillDel(const XLine *x)
{
BotInfo *bi = OperServ;
- send_cmd(bi ? bi->GetUID() : Config.s_OperServ, "UNKLINE * %s %s", x->GetUser().c_str(), x->GetHost().c_str());
+ send_cmd(bi ? bi->GetUID() : Config->s_OperServ, "UNKLINE * %s %s", x->GetUser().c_str(), x->GetHost().c_str());
}
void SendSQLineDel(const XLine *x)
@@ -148,7 +148,7 @@ class RatboxProto : public IRCDTS6Proto
void SendAkill(const XLine *x)
{
BotInfo *bi = OperServ;
- send_cmd(bi ? bi->GetUID() : Config.s_OperServ, "KLINE * %ld %s %s :%s", static_cast<long>(x->Expires - time(NULL)), x->GetUser().c_str(), x->GetHost().c_str(), x->Reason.c_str());
+ send_cmd(bi ? bi->GetUID() : Config->s_OperServ, "KLINE * %ld %s %s :%s", static_cast<long>(x->Expires - time(NULL)), x->GetUser().c_str(), x->GetHost().c_str(), x->Reason.c_str());
}
void SendSVSKillInternal(const BotInfo *source, const User *user, const Anope::string &buf)
@@ -538,7 +538,7 @@ int anope_event_ping(const Anope::string &source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- ircdproto->SendPong(ac > 1 ? av[1] : Config.ServerName, av[0]);
+ ircdproto->SendPong(ac > 1 ? av[1] : Config->ServerName, av[0]);
return MOD_CONT;
}
@@ -811,8 +811,8 @@ class ProtoRatbox : public Module
this->SetAuthor("Anope");
this->SetType(PROTOCOL);
- if (!Config.Numeric.empty())
- TS6SID = Config.Numeric;
+ if (!Config->Numeric.empty())
+ TS6SID = Config->Numeric;
UseTSMODE = 1; /* TMODE */
pmodule_ircd_version("Ratbox IRCD 2.0+");
diff --git a/modules/protocol/unreal32.cpp b/modules/protocol/unreal32.cpp
index 16fc8582e..ed840aa3e 100644
--- a/modules/protocol/unreal32.cpp
+++ b/modules/protocol/unreal32.cpp
@@ -72,12 +72,12 @@ void unreal_cmd_netinfo(int ac, const char **av)
TKLEXT = Extended TKL we don't use it but best to have it
SJB64 = Base64 encoded time stamps
VL = Version Info
- NS = Config.Numeric Server
+ NS = Config->Numeric Server
*/
void unreal_cmd_capab()
{
- if (!Config.Numeric.empty())
+ if (!Config->Numeric.empty())
send_cmd("", "PROTOCTL NICKv2 VHP UMODE2 NICKIP TOKEN SJOIN SJOIN2 SJ3 NOQUIT TKLEXT VL");
else
send_cmd("", "PROTOCTL NICKv2 VHP UMODE2 NICKIP TOKEN SJOIN SJOIN2 SJ3 NOQUIT TKLEXT");
@@ -94,7 +94,7 @@ void unreal_cmd_chghost(const Anope::string &nick, const Anope::string &vhost)
{
if (nick.empty() || vhost.empty())
return;
- send_cmd(Config.ServerName, "AL %s %s", nick.c_str(), vhost.c_str());
+ send_cmd(Config->ServerName, "AL %s %s", nick.c_str(), vhost.c_str());
}
/* CHGIDENT */
@@ -102,7 +102,7 @@ void unreal_cmd_chgident(const Anope::string &nick, const Anope::string &vIdent)
{
if (nick.empty() || vIdent.empty())
return;
- send_cmd(Config.ServerName, "AZ %s %s", nick.c_str(), vIdent.c_str());
+ send_cmd(Config->ServerName, "AZ %s %s", nick.c_str(), vIdent.c_str());
}
class UnrealIRCdProto : public IRCDProto
@@ -115,7 +115,7 @@ class UnrealIRCdProto : public IRCDProto
void SendAkillDel(const XLine *x)
{
- send_cmd("", "BD - G %s %s %s", x->GetUser().c_str(), x->GetHost().c_str(), Config.s_OperServ.c_str());
+ send_cmd("", "BD - G %s %s %s", x->GetUser().c_str(), x->GetHost().c_str(), Config->s_OperServ.c_str());
}
void SendTopic(const BotInfo *whosets, const Channel *c, const Anope::string &whosetit, const Anope::string &topic)
@@ -143,7 +143,7 @@ class UnrealIRCdProto : public IRCDProto
void SendSVSKillInternal(const BotInfo *source, const User *user, const Anope::string &buf)
{
- send_cmd(source ? source->nick : Config.ServerName, "h %s :%s", user->nick.c_str(), buf.c_str());
+ send_cmd(source ? source->nick : Config->ServerName, "h %s :%s", user->nick.c_str(), buf.c_str());
}
/*
@@ -174,13 +174,13 @@ class UnrealIRCdProto : public IRCDProto
{
if (buf.empty())
return;
- send_cmd(bi ? bi->nick : Config.ServerName, "v %s %s", u->nick.c_str(), buf.c_str());
+ send_cmd(bi ? bi->nick : Config->ServerName, "v %s %s", u->nick.c_str(), buf.c_str());
}
void SendClientIntroduction(const Anope::string &nick, const Anope::string &user, const Anope::string &host, const Anope::string &real, const Anope::string &modes, const Anope::string &)
{
- EnforceQlinedNick(nick, Config.ServerName);
- send_cmd("", "& %s 1 %ld %s %s %s 0 %s %s%s :%s", nick.c_str(), static_cast<long>(time(NULL)), user.c_str(), host.c_str(), Config.ServerName.c_str(), modes.c_str(), host.c_str(), myIrcd->nickip ? " *" : "", real.c_str());
+ EnforceQlinedNick(nick, Config->ServerName);
+ send_cmd("", "& %s 1 %ld %s %s %s 0 %s %s%s :%s", nick.c_str(), static_cast<long>(time(NULL)), user.c_str(), host.c_str(), Config->ServerName.c_str(), modes.c_str(), host.c_str(), myIrcd->nickip ? " *" : "", real.c_str());
}
void SendKickInternal(const BotInfo *source, const Channel *chan, const User *user, const Anope::string &buf)
@@ -202,8 +202,8 @@ class UnrealIRCdProto : public IRCDProto
/* Unreal 3.2 actually sends some info about itself in the descript area */
void SendServer(const Server *server)
{
- if (!Config.Numeric.empty())
- send_cmd("", "SERVER %s %d :U0-*-%s %s", server->GetName().c_str(), server->GetHops(), Config.Numeric.c_str(), server->GetDescription().c_str());
+ if (!Config->Numeric.empty())
+ send_cmd("", "SERVER %s %d :U0-*-%s %s", server->GetName().c_str(), server->GetHops(), Config->Numeric.c_str(), server->GetDescription().c_str());
else
send_cmd("", "SERVER %s %d :%s", server->GetName().c_str(), server->GetHops(), server->GetDescription().c_str());
}
@@ -211,7 +211,7 @@ class UnrealIRCdProto : public IRCDProto
/* JOIN */
void SendJoin(const BotInfo *user, const Anope::string &channel, time_t chantime)
{
- send_cmd(Config.ServerName, "~ %ld %s :%s", static_cast<long>(chantime), channel.c_str(), user->nick.c_str());
+ send_cmd(Config->ServerName, "~ %ld %s :%s", static_cast<long>(chantime), channel.c_str(), user->nick.c_str());
}
/* unsqline
@@ -272,13 +272,13 @@ class UnrealIRCdProto : public IRCDProto
/* SVSHOLD - set */
void SendSVSHold(const Anope::string &nick)
{
- send_cmd("", "BD + Q H %s %s %ld %ld :Being held for registered user", nick.c_str(), Config.ServerName.c_str(), static_cast<long>(time(NULL) + Config.NSReleaseTimeout), static_cast<long>(time(NULL)));
+ send_cmd("", "BD + Q H %s %s %ld %ld :Being held for registered user", nick.c_str(), Config->ServerName.c_str(), static_cast<long>(time(NULL) + Config->NSReleaseTimeout), static_cast<long>(time(NULL)));
}
/* SVSHOLD - release */
void SendSVSHoldDel(const Anope::string &nick)
{
- send_cmd("", "BD - Q * %s %s", nick.c_str(), Config.ServerName.c_str());
+ send_cmd("", "BD - Q * %s %s", nick.c_str(), Config->ServerName.c_str());
}
/* UNSGLINE */
@@ -293,7 +293,7 @@ class UnrealIRCdProto : public IRCDProto
/* UNSZLINE */
void SendSZLineDel(const XLine *x)
{
- send_cmd("", "BD - Z * %s %s", x->Mask.c_str(), Config.s_OperServ.c_str());
+ send_cmd("", "BD - Z * %s %s", x->Mask.c_str(), Config->s_OperServ.c_str());
}
/* SZLINE */
@@ -324,9 +324,9 @@ class UnrealIRCdProto : public IRCDProto
void SendSVSModeChan(const Channel *c, const Anope::string &mode, const Anope::string &nick)
{
if (!nick.empty())
- send_cmd(Config.ServerName, "n %s %s %s", c->name.c_str(), mode.c_str(), nick.c_str());
+ send_cmd(Config->ServerName, "n %s %s %s", c->name.c_str(), mode.c_str(), nick.c_str());
else
- send_cmd(Config.ServerName, "n %s %s", c->name.c_str(), mode.c_str());
+ send_cmd(Config->ServerName, "n %s %s", c->name.c_str(), mode.c_str());
}
/* svsjoin
@@ -363,7 +363,7 @@ class UnrealIRCdProto : public IRCDProto
void SendEOB()
{
- send_cmd(Config.ServerName, "ES");
+ send_cmd(Config->ServerName, "ES");
}
bool IsNickValid(const Anope::string &nick)
@@ -560,7 +560,7 @@ int anope_event_ping(const Anope::string &source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- ircdproto->SendPong(ac > 1 ? av[1] : Config.ServerName, av[0]);
+ ircdproto->SendPong(ac > 1 ? av[1] : Config->ServerName, av[0]);
return MOD_CONT;
}
@@ -932,7 +932,7 @@ int anope_event_server(const Anope::string &source, int ac, const char **av)
}
else
do_server(source, av[0], Anope::string(av[1]).is_number_only() ? convertTo<unsigned>(av[1]) : 0, av[2], "");
- ircdproto->SendPing(Config.ServerName, av[0]);
+ ircdproto->SendPing(Config->ServerName, av[0]);
return MOD_CONT;
}