summaryrefslogtreecommitdiff
path: root/src/protocol
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-11-28 23:02:07 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-11-28 23:02:07 +0000
commita08b3ec5924c946308ac086cd3ee7d701610d3be (patch)
tree84da442a85ffeccd6425cc7c85db9eda6e881753 /src/protocol
parentf6b823ade85160f94544d1ad1de4d8fbc42b2712 (diff)
Massive move of all of the Config variables out of global scope to the Config class
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2674 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/protocol')
-rw-r--r--src/protocol/bahamut.c30
-rw-r--r--src/protocol/inspircd11.c54
-rw-r--r--src/protocol/inspircd12.cpp38
-rw-r--r--src/protocol/ratbox.c26
-rw-r--r--src/protocol/unreal32.c44
5 files changed, 96 insertions, 96 deletions
diff --git a/src/protocol/bahamut.c b/src/protocol/bahamut.c
index b89bce40a..c14eb945f 100644
--- a/src/protocol/bahamut.c
+++ b/src/protocol/bahamut.c
@@ -173,7 +173,7 @@ class BahamutIRCdProto : public IRCDProto
case 'o':
if (add) {
++opcnt;
- if (WallOper) ircdproto->SendGlobops(s_OperServ, "\2%s\2 is now an IRC operator.", user->nick);
+ if (Config.WallOper) ircdproto->SendGlobops(Config.s_OperServ, "\2%s\2 is now an IRC operator.", user->nick);
}
else --opcnt;
break;
@@ -196,13 +196,13 @@ class BahamutIRCdProto : public IRCDProto
/* SVSHOLD - set */
void SendSVSHold(const char *nick)
{
- send_cmd(ServerName, "SVSHOLD %s %u :%s", nick, static_cast<unsigned>(NSReleaseTimeout), "Being held for registered user");
+ send_cmd(Config.ServerName, "SVSHOLD %s %u :%s", nick, static_cast<unsigned>(Config.NSReleaseTimeout), "Being held for registered user");
}
/* SVSHOLD - release */
void SendSVSHoldDel(const char *nick)
{
- send_cmd(ServerName, "SVSHOLD %s 0", nick);
+ send_cmd(Config.ServerName, "SVSHOLD %s 0", nick);
}
/* SVSMODE -b */
@@ -214,8 +214,8 @@ class BahamutIRCdProto : public IRCDProto
/* SVSMODE channel modes */
void SendSVSModeChan(const char *name, const char *mode, const char *nick)
{
- if (nick) send_cmd(ServerName, "SVSMODE %s %s %s", name, mode, nick);
- else send_cmd(ServerName, "SVSMODE %s %s", name, mode);
+ if (nick) send_cmd(Config.ServerName, "SVSMODE %s %s %s", name, mode, nick);
+ else send_cmd(Config.ServerName, "SVSMODE %s %s", name, mode);
}
void SendBotOp(const char *nick, const char *chan)
@@ -330,7 +330,7 @@ class BahamutIRCdProto : public IRCDProto
*/
void SendSVSMode(User *u, int ac, const char **av)
{
- send_cmd(ServerName, "SVSMODE %s %ld %s", u->nick, static_cast<long>(u->timestamp), merge_args(ac, av));
+ send_cmd(Config.ServerName, "SVSMODE %s %ld %s", u->nick, static_cast<long>(u->timestamp), merge_args(ac, av));
}
void SendEOB()
@@ -352,8 +352,8 @@ class BahamutIRCdProto : public IRCDProto
void SendClientIntroduction(const char *nick, const char *user, const char *host, const char *real, const char *modes, const char *uid)
{
- EnforceQlinedNick(nick, s_BotServ);
- send_cmd(NULL, "NICK %s 1 %ld %s %s %s %s 0 0 :%s", nick, static_cast<long>(time(NULL)), modes, user, host, ServerName, real);
+ EnforceQlinedNick(nick, Config.s_BotServ);
+ send_cmd(NULL, "NICK %s 1 %ld %s %s %s %s 0 0 :%s", nick, static_cast<long>(time(NULL)), modes, user, host, Config.ServerName, real);
SendSQLine(nick, "Reserved for services");
}
@@ -374,7 +374,7 @@ class BahamutIRCdProto : public IRCDProto
{
bahamut_cmd_pass(uplink_server->password);
bahamut_cmd_capab();
- me_server = new_server(NULL, ServerName, ServerDesc, SERVER_ISME, NULL);
+ me_server = new_server(NULL, Config.ServerName, Config.ServerDesc, SERVER_ISME, NULL);
SendServer(me_server);
bahamut_cmd_svinfo();
bahamut_cmd_burst();
@@ -464,7 +464,7 @@ int anope_event_os(const char *source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- m_privmsg(source, s_OperServ, av[0]);
+ m_privmsg(source, Config.s_OperServ, av[0]);
return MOD_CONT;
}
@@ -473,7 +473,7 @@ int anope_event_ns(const char *source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- m_privmsg(source, s_NickServ, av[0]);
+ m_privmsg(source, Config.s_NickServ, av[0]);
return MOD_CONT;
}
@@ -482,7 +482,7 @@ int anope_event_ms(const char *source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- m_privmsg(source, s_MemoServ, av[0]);
+ m_privmsg(source, Config.s_MemoServ, av[0]);
return MOD_CONT;
}
@@ -491,7 +491,7 @@ int anope_event_hs(const char *source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- m_privmsg(source, s_HostServ, av[0]);
+ m_privmsg(source, Config.s_HostServ, av[0]);
return MOD_CONT;
}
@@ -500,7 +500,7 @@ int anope_event_cs(const char *source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- m_privmsg(source, s_ChanServ, av[0]);
+ m_privmsg(source, Config.s_ChanServ, av[0]);
return MOD_CONT;
}
@@ -639,7 +639,7 @@ int anope_event_ping(const char *source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- ircdproto->SendPong(ac > 1 ? av[1] : ServerName, av[0]);
+ ircdproto->SendPong(ac > 1 ? av[1] : Config.ServerName, av[0]);
return MOD_CONT;
}
diff --git a/src/protocol/inspircd11.c b/src/protocol/inspircd11.c
index 9742a9c81..722d8668d 100644
--- a/src/protocol/inspircd11.c
+++ b/src/protocol/inspircd11.c
@@ -135,9 +135,9 @@ void inspircd_cmd_chghost(const char *nick, const char *vhost)
if (!nick || !vhost) {
return;
}
- send_cmd(s_OperServ, "CHGHOST %s %s", nick, vhost);
+ send_cmd(Config.s_OperServ, "CHGHOST %s %s", nick, vhost);
} else {
- ircdproto->SendGlobops(s_OperServ, "CHGHOST not loaded!");
+ ircdproto->SendGlobops(Config.s_OperServ, "CHGHOST not loaded!");
}
}
@@ -183,7 +183,7 @@ class InspIRCdProto : public IRCDProto
case 'o':
if (add) {
++opcnt;
- if (WallOper) ircdproto->SendGlobops(s_OperServ, "\2%s\2 is now an IRC operator.", user->nick);
+ if (Config.WallOper) ircdproto->SendGlobops(Config.s_OperServ, "\2%s\2 is now an IRC operator.", user->nick);
}
else --opcnt;
break;
@@ -216,7 +216,7 @@ class InspIRCdProto : public IRCDProto
void SendAkillDel(const char *user, const char *host)
{
- send_cmd(s_OperServ, "GLINE %s@%s", user, host);
+ send_cmd(Config.s_OperServ, "GLINE %s@%s", user, host);
}
void SendTopic(BotInfo *whosets, const char *chan, const char *whosetit, const char *topic, time_t when)
@@ -243,7 +243,7 @@ class InspIRCdProto : public IRCDProto
time_t timeleft = expires - time(NULL);
if (timeleft > 172800)
timeleft = 172800;
- send_cmd(ServerName, "ADDLINE G %s@%s %s %ld %ld :%s", user, host, who, static_cast<long>(time(NULL)), static_cast<long>(timeleft), reason);
+ send_cmd(Config.ServerName, "ADDLINE G %s@%s %s %ld %ld :%s", user, host, who, static_cast<long>(time(NULL)), static_cast<long>(timeleft), reason);
}
void SendSVSKillInternal(const char *source, const char *user, const char *buf)
@@ -254,7 +254,7 @@ class InspIRCdProto : public IRCDProto
void SendSVSMode(User *u, int ac, const char **av)
{
- send_cmd(s_NickServ, "MODE %s %s", u->nick, merge_args(ac, av));
+ send_cmd(Config.s_NickServ, "MODE %s %s", u->nick, merge_args(ac, av));
}
void SendNumericInternal(const char *source, int numeric, const char *dest, const char *buf)
@@ -264,19 +264,19 @@ class InspIRCdProto : public IRCDProto
void SendGuestNick(const char *nick, const char *user, const char *host, const char *real, const char *modes)
{
- send_cmd(ServerName, "NICK %ld %s %s %s %s +%s 0.0.0.0 :%s", static_cast<long>(time(NULL)), nick, host, host, user, modes, real);
+ send_cmd(Config.ServerName, "NICK %ld %s %s %s %s +%s 0.0.0.0 :%s", static_cast<long>(time(NULL)), nick, host, host, user, modes, real);
}
void SendModeInternal(BotInfo *source, const char *dest, const char *buf)
{
if (!buf) return;
Channel *c = findchan(dest);
- send_cmd(source ? source->nick : s_OperServ, "FMODE %s %u %s", dest, static_cast<unsigned>(c ? c->creation_time : time(NULL)), buf);
+ send_cmd(source ? source->nick : Config.s_OperServ, "FMODE %s %u %s", dest, static_cast<unsigned>(c ? c->creation_time : time(NULL)), buf);
}
void SendClientIntroduction(const char *nick, const char *user, const char *host, const char *real, const char *modes, const char *uid)
{
- send_cmd(ServerName, "NICK %ld %s %s %s %s %s 0.0.0.0 :%s", static_cast<long>(time(NULL)), nick, host, host, user, modes, real);
+ send_cmd(Config.ServerName, "NICK %ld %s %s %s %s %s 0.0.0.0 :%s", static_cast<long>(time(NULL)), nick, host, host, user, modes, real);
send_cmd(nick, "OPERTYPE Service");
}
@@ -289,7 +289,7 @@ class InspIRCdProto : public IRCDProto
void SendNoticeChanopsInternal(BotInfo *source, const char *dest, const char *buf)
{
if (!buf) return;
- send_cmd(ServerName, "NOTICE @%s :%s", dest, buf);
+ send_cmd(Config.ServerName, "NOTICE @%s :%s", dest, buf);
}
void SendBotOp(const char *nick, const char *chan)
@@ -301,7 +301,7 @@ class InspIRCdProto : public IRCDProto
/* SERVER services-dev.chatspike.net password 0 :Description here */
void SendServer(Server *server)
{
- send_cmd(ServerName, "SERVER %s %s %d :%s", server->name, currentpass, server->hops, server->desc);
+ send_cmd(Config.ServerName, "SERVER %s %s %d :%s", server->name, currentpass, server->hops, server->desc);
}
/* JOIN */
@@ -314,21 +314,21 @@ class InspIRCdProto : public IRCDProto
void SendSQLineDel(const char *user)
{
if (!user) return;
- send_cmd(s_OperServ, "QLINE %s", user);
+ send_cmd(Config.s_OperServ, "QLINE %s", user);
}
/* SQLINE */
void SendSQLine(const char *mask, const char *reason)
{
if (!mask || !reason) return;
- send_cmd(ServerName, "ADDLINE Q %s %s %ld 0 :%s", mask, s_OperServ, static_cast<long>(time(NULL)), reason);
+ send_cmd(Config.ServerName, "ADDLINE Q %s %s %ld 0 :%s", mask, Config.s_OperServ, static_cast<long>(time(NULL)), reason);
}
/* SQUIT */
void SendSquit(const char *servname, const char *message)
{
if (!servname || !message) return;
- send_cmd(ServerName, "SQUIT %s :%s", servname, message);
+ send_cmd(Config.ServerName, "SQUIT %s :%s", servname, message);
}
/* Functions that use serval cmd functions */
@@ -343,10 +343,10 @@ class InspIRCdProto : public IRCDProto
void SendConnect()
{
inspircd_cmd_pass(uplink_server->password);
- me_server = new_server(NULL, ServerName, ServerDesc, SERVER_ISME, NULL);
+ me_server = new_server(NULL, Config.ServerName, Config.ServerDesc, SERVER_ISME, NULL);
SendServer(me_server);
send_cmd(NULL, "BURST");
- send_cmd(ServerName, "VERSION :Anope-%s %s :%s - %s (%s) -- %s", version_number, ServerName, ircd->name, version_flags, EncModuleList.begin()->c_str(), version_build);
+ send_cmd(Config.ServerName, "VERSION :Anope-%s %s :%s - %s (%s) -- %s", version_number, Config.ServerName, ircd->name, version_flags, Config.EncModuleList.begin()->c_str(), version_build);
}
/* CHGIDENT */
@@ -356,34 +356,34 @@ class InspIRCdProto : public IRCDProto
if (!nick || !vIdent || !*vIdent) {
return;
}
- send_cmd(s_OperServ, "CHGIDENT %s %s", nick, vIdent);
+ send_cmd(Config.s_OperServ, "CHGIDENT %s %s", nick, vIdent);
} else {
- ircdproto->SendGlobops(s_OperServ, "CHGIDENT not loaded!");
+ ircdproto->SendGlobops(Config.s_OperServ, "CHGIDENT not loaded!");
}
}
/* SVSHOLD - set */
void SendSVSHold(const char *nick)
{
- send_cmd(s_OperServ, "SVSHOLD %s %ds :%s", nick, static_cast<int>(NSReleaseTimeout), "Being held for registered user");
+ send_cmd(Config.s_OperServ, "SVSHOLD %s %ds :%s", nick, static_cast<int>(Config.NSReleaseTimeout), "Being held for registered user");
}
/* SVSHOLD - release */
void SendSVSHoldDel(const char *nick)
{
- send_cmd(s_OperServ, "SVSHOLD %s", nick);
+ send_cmd(Config.s_OperServ, "SVSHOLD %s", nick);
}
/* UNSZLINE */
void SendSZLineDel(const char *mask)
{
- send_cmd(s_OperServ, "ZLINE %s", mask);
+ send_cmd(Config.s_OperServ, "ZLINE %s", mask);
}
/* SZLINE */
void SendSZLine(const char *mask, const char *reason, const char *whom)
{
- send_cmd(ServerName, "ADDLINE Z %s %s %ld 0 :%s", mask, whom, static_cast<long>(time(NULL)), reason);
+ send_cmd(Config.ServerName, "ADDLINE Z %s %s %ld 0 :%s", mask, whom, static_cast<long>(time(NULL)), reason);
}
/* SVSMODE +- */
@@ -585,7 +585,7 @@ int anope_event_ping(const char *source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- ircdproto->SendPong(ServerName, av[0]);
+ ircdproto->SendPong(Config.ServerName, av[0]);
return MOD_CONT;
}
@@ -661,7 +661,7 @@ int anope_event_rsquit(const char *source, int ac, const char **av)
return MOD_CONT;
/* Horrible workaround to an insp bug (#) in how RSQUITs are sent - mark */
- if (ac > 1 && strcmp(ServerName, av[0]) == 0)
+ if (ac > 1 && strcmp(Config.ServerName, av[0]) == 0)
do_squit(source, ac - 1, av + 1);
else
do_squit(source, ac, av);
@@ -962,13 +962,13 @@ int anope_event_capab(const char *source, int ac, const char **av)
return MOD_STOP;
}
if (!has_svsholdmod) {
- ircdproto->SendGlobops(s_OperServ, "SVSHOLD missing, Usage disabled until module is loaded.");
+ ircdproto->SendGlobops(Config.s_OperServ, "SVSHOLD missing, Usage disabled until module is loaded.");
}
if (!has_chghostmod) {
- ircdproto->SendGlobops(s_OperServ, "CHGHOST missing, Usage disabled until module is loaded.");
+ ircdproto->SendGlobops(Config.s_OperServ, "CHGHOST missing, Usage disabled until module is loaded.");
}
if (!has_chgidentmod) {
- ircdproto->SendGlobops(s_OperServ, "CHGIDENT missing, Usage disabled until module is loaded.");
+ ircdproto->SendGlobops(Config.s_OperServ, "CHGIDENT missing, Usage disabled until module is loaded.");
}
if (has_messagefloodmod) {
ModeManager::AddChannelMode('f', new ChannelModeFlood());
diff --git a/src/protocol/inspircd12.cpp b/src/protocol/inspircd12.cpp
index b6df616eb..78216d1c8 100644
--- a/src/protocol/inspircd12.cpp
+++ b/src/protocol/inspircd12.cpp
@@ -136,11 +136,11 @@ void inspircd_cmd_chghost(const char *nick, const char *vhost)
{
if (has_chghostmod != 1)
{
- ircdproto->SendGlobops(s_OperServ, "CHGHOST not loaded!");
+ ircdproto->SendGlobops(Config.s_OperServ, "CHGHOST not loaded!");
return;
}
- BotInfo *bi = findbot(s_OperServ);
+ BotInfo *bi = findbot(Config.s_OperServ);
send_cmd(bi->uid, "CHGHOST %s %s", nick, vhost);
}
@@ -188,7 +188,7 @@ class InspIRCdProto : public IRCDProto
case 'o':
if (add) {
++opcnt;
- if (WallOper) ircdproto->SendGlobops(s_OperServ, "\2%s\2 is now an IRC operator.", user->nick);
+ if (Config.WallOper) ircdproto->SendGlobops(Config.s_OperServ, "\2%s\2 is now an IRC operator.", user->nick);
}
else --opcnt;
break;
@@ -226,7 +226,7 @@ class InspIRCdProto : public IRCDProto
void SendAkillDel(const char *user, const char *host)
{
- BotInfo *bi = findbot(s_OperServ);
+ BotInfo *bi = findbot(Config.s_OperServ);
send_cmd(bi->uid, "GLINE %s@%s", user, host);
}
@@ -254,7 +254,7 @@ class InspIRCdProto : public IRCDProto
time_t timeleft = expires - time(NULL);
if (timeleft > 172800 || !expires)
timeleft = 172800;
- BotInfo *bi = findbot(s_OperServ);
+ BotInfo *bi = findbot(Config.s_OperServ);
send_cmd(bi->uid, "ADDLINE G %s@%s %s %ld %ld :%s", user, host, who, static_cast<long>(time(NULL)), static_cast<long>(timeleft), reason);
}
@@ -267,7 +267,7 @@ class InspIRCdProto : public IRCDProto
void SendSVSMode(User *u, int ac, const char **av)
{
- BotInfo *bi = findbot(s_NickServ);
+ BotInfo *bi = findbot(Config.s_NickServ);
send_cmd(bi->uid, "MODE %s %s", u->GetUID().c_str(), merge_args(ac, av));
}
@@ -332,7 +332,7 @@ class InspIRCdProto : public IRCDProto
/* SQLINE */
void SendSQLine(const char *mask, const char *reason)
{
- send_cmd(TS6SID, "ADDLINE Q %s %s %ld 0 :%s", mask, s_OperServ, static_cast<long>(time(NULL)), reason);
+ send_cmd(TS6SID, "ADDLINE Q %s %s %ld 0 :%s", mask, Config.s_OperServ, static_cast<long>(time(NULL)), reason);
}
/* SQUIT */
@@ -353,10 +353,10 @@ class InspIRCdProto : public IRCDProto
void SendConnect()
{
inspircd_cmd_pass(uplink_server->password);
- me_server = new_server(NULL, ServerName, ServerDesc, SERVER_ISME, TS6SID);
+ me_server = new_server(NULL, Config.ServerName, Config.ServerDesc, SERVER_ISME, TS6SID);
SendServer(me_server);
send_cmd(TS6SID, "BURST");
- send_cmd(TS6SID, "VERSION :Anope-%s %s :%s - %s (%s) -- %s", version_number, ServerName, ircd->name, version_flags, EncModuleList.begin()->c_str(), version_build);
+ send_cmd(TS6SID, "VERSION :Anope-%s %s :%s - %s (%s) -- %s", version_number, Config.ServerName, ircd->name, version_flags, Config.EncModuleList.begin()->c_str(), version_build);
}
/* CHGIDENT */
@@ -364,11 +364,11 @@ class InspIRCdProto : public IRCDProto
{
if (has_chgidentmod == 0)
{
- ircdproto->SendGlobops(s_OperServ, "CHGIDENT not loaded!");
+ ircdproto->SendGlobops(Config.s_OperServ, "CHGIDENT not loaded!");
}
else
{
- BotInfo *bi = findbot(s_OperServ);
+ BotInfo *bi = findbot(Config.s_OperServ);
send_cmd(bi->uid, "CHGIDENT %s %s", nick, vIdent);
}
}
@@ -376,14 +376,14 @@ class InspIRCdProto : public IRCDProto
/* SVSHOLD - set */
void SendSVSHold(const char *nick)
{
- BotInfo *bi = findbot(s_OperServ);
- send_cmd(bi->uid, "SVSHOLD %s %u :%s", nick, static_cast<unsigned>(NSReleaseTimeout), "Being held for registered user");
+ BotInfo *bi = findbot(Config.s_OperServ);
+ send_cmd(bi->uid, "SVSHOLD %s %u :%s", nick, static_cast<unsigned>(Config.NSReleaseTimeout), "Being held for registered user");
}
/* SVSHOLD - release */
void SendSVSHoldDel(const char *nick)
{
- BotInfo *bi = findbot(s_OperServ);
+ BotInfo *bi = findbot(Config.s_OperServ);
send_cmd(bi->uid, "SVSHOLD %s", nick);
}
@@ -1146,13 +1146,13 @@ int anope_event_capab(const char *source, int ac, const char **av)
return MOD_STOP;
}
if (!has_svsholdmod) {
- ircdproto->SendGlobops(s_OperServ, "SVSHOLD missing, Usage disabled until module is loaded.");
+ ircdproto->SendGlobops(Config.s_OperServ, "SVSHOLD missing, Usage disabled until module is loaded.");
}
if (!has_chghostmod) {
- ircdproto->SendGlobops(s_OperServ, "CHGHOST missing, Usage disabled until module is loaded.");
+ ircdproto->SendGlobops(Config.s_OperServ, "CHGHOST missing, Usage disabled until module is loaded.");
}
if (!has_chgidentmod) {
- ircdproto->SendGlobops(s_OperServ, "CHGIDENT missing, Usage disabled until module is loaded.");
+ ircdproto->SendGlobops(Config.s_OperServ, "CHGIDENT missing, Usage disabled until module is loaded.");
}
if (has_messagefloodmod) {
ModeManager::AddChannelMode('f', new ChannelModeFlood());
@@ -1286,8 +1286,8 @@ class ProtoInspIRCd : public Module
this->SetVersion("$Id$");
this->SetType(PROTOCOL);
- if (Numeric)
- TS6SID = sstrdup(Numeric);
+ if (Config.Numeric)
+ TS6SID = sstrdup(Config.Numeric);
pmodule_ircd_version("InspIRCd 1.2");
pmodule_ircd_cap(myIrcdcap);
diff --git a/src/protocol/ratbox.c b/src/protocol/ratbox.c
index 097f47f8d..1af8e3a4a 100644
--- a/src/protocol/ratbox.c
+++ b/src/protocol/ratbox.c
@@ -189,7 +189,7 @@ class RatboxProto : public IRCDTS6Proto
case 'o':
if (add) {
++opcnt;
- if (WallOper) ircdproto->SendGlobops(s_OperServ, "\2%s\2 is now an IRC operator.", user->nick);
+ if (Config.WallOper) ircdproto->SendGlobops(Config.s_OperServ, "\2%s\2 is now an IRC operator.", user->nick);
}
else --opcnt;
}
@@ -217,20 +217,20 @@ class RatboxProto : public IRCDTS6Proto
void SendSGLineDel(const char *mask)
{
- BotInfo *bi = findbot(s_OperServ);
- send_cmd(bi ? bi->uid : s_OperServ, "UNXLINE * %s", mask);
+ BotInfo *bi = findbot(Config.s_OperServ);
+ send_cmd(bi ? bi->uid : Config.s_OperServ, "UNXLINE * %s", mask);
}
void SendSGLine(const char *mask, const char *reason)
{
- BotInfo *bi = findbot(s_OperServ);
- send_cmd(bi ? bi->uid : s_OperServ, "XLINE * %s 0 :%s", mask, reason);
+ BotInfo *bi = findbot(Config.s_OperServ);
+ send_cmd(bi ? bi->uid : Config.s_OperServ, "XLINE * %s 0 :%s", mask, reason);
}
void SendAkillDel(const char *user, const char *host)
{
- BotInfo *bi = findbot(s_OperServ);
- send_cmd(bi ? bi->uid : s_OperServ, "UNKLINE * %s %s", user, host);
+ BotInfo *bi = findbot(Config.s_OperServ);
+ send_cmd(bi ? bi->uid : Config.s_OperServ, "UNKLINE * %s %s", user, host);
}
void SendSQLineDel(const char *user)
@@ -254,8 +254,8 @@ class RatboxProto : public IRCDTS6Proto
void SendAkill(const char *user, const char *host, const char *who, time_t when, time_t expires, const char *reason)
{
- BotInfo *bi = findbot(s_OperServ);
- send_cmd(bi ? bi->uid : s_OperServ, "KLINE * %ld %s %s :%s", static_cast<long>(expires - time(NULL)), user, host, reason);
+ BotInfo *bi = findbot(Config.s_OperServ);
+ send_cmd(bi ? bi->uid : Config.s_OperServ, "KLINE * %ld %s %s :%s", static_cast<long>(expires - time(NULL)), user, host, reason);
}
void SendSVSKillInternal(const char *source, const char *user, const char *buf)
@@ -281,7 +281,7 @@ class RatboxProto : public IRCDTS6Proto
ratbox_cmd_pass(uplink_server->password);
ratbox_cmd_capab();
/* Make myself known to myself in the serverlist */
- me_server = new_server(NULL, ServerName, ServerDesc, SERVER_ISME, TS6SID);
+ me_server = new_server(NULL, Config.ServerName, Config.ServerDesc, SERVER_ISME, TS6SID);
SendServer(me_server);
ratbox_cmd_svinfo();
}
@@ -562,7 +562,7 @@ int anope_event_ping(const char *source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- ircdproto->SendPong(ac > 1 ? av[1] : ServerName, av[0]);
+ ircdproto->SendPong(ac > 1 ? av[1] : Config.ServerName, av[0]);
return MOD_CONT;
}
@@ -888,8 +888,8 @@ class ProtoRatbox : public Module
this->SetVersion("$Id$");
this->SetType(PROTOCOL);
- if (Numeric)
- TS6SID = sstrdup(Numeric);
+ if (Config.Numeric)
+ TS6SID = sstrdup(Config.Numeric);
UseTSMODE = 1; /* TMODE */
pmodule_ircd_version("Ratbox IRCD 2.0+");
diff --git a/src/protocol/unreal32.c b/src/protocol/unreal32.c
index 9e46ea6e4..b4a86525c 100644
--- a/src/protocol/unreal32.c
+++ b/src/protocol/unreal32.c
@@ -127,12 +127,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 = Numeric Server
+ NS = Config.Numeric Server
*/
void unreal_cmd_capab()
{
- if (Numeric)
+ if (Config.Numeric)
{
send_cmd(NULL, "PROTOCTL NICKv2 VHP UMODE2 NICKIP TOKEN SJOIN SJOIN2 SJ3 NOQUIT TKLEXT SJB64 VL");
}
@@ -154,7 +154,7 @@ void unreal_cmd_chghost(const char *nick, const char *vhost)
if (!nick || !vhost) {
return;
}
- send_cmd(ServerName, "AL %s %s", nick, vhost);
+ send_cmd(Config.ServerName, "AL %s %s", nick, vhost);
}
/* CHGIDENT */
@@ -163,7 +163,7 @@ void unreal_cmd_chgident(const char *nick, const char *vIdent)
if (!nick || !vIdent) {
return;
}
- send_cmd(ServerName, "AZ %s %s", nick, vIdent);
+ send_cmd(Config.ServerName, "AZ %s %s", nick, vIdent);
}
@@ -207,7 +207,7 @@ class UnrealIRCdProto : public IRCDProto
case 'o':
if (add) {
++opcnt;
- if (WallOper) ircdproto->SendGlobops(s_OperServ, "\2%s\2 is now an IRC operator.", user->nick);
+ if (Config.WallOper) ircdproto->SendGlobops(Config.s_OperServ, "\2%s\2 is now an IRC operator.", user->nick);
}
else --opcnt;
break;
@@ -257,7 +257,7 @@ class UnrealIRCdProto : public IRCDProto
void SendAkillDel(const char *user, const char *host)
{
- send_cmd(NULL, "BD - G %s %s %s", user, host, s_OperServ);
+ send_cmd(NULL, "BD - G %s %s %s", user, host, Config.s_OperServ);
}
void SendTopic(BotInfo *whosets, const char *chan, const char *whosetit, const char *topic, time_t when)
@@ -302,7 +302,7 @@ class UnrealIRCdProto : public IRCDProto
{
if (ac >= 1) {
if (!u || !av[0]) return;
- send_cmd(ServerName, "v %s %s", u->nick, merge_args(ac, av));
+ send_cmd(Config.ServerName, "v %s %s", u->nick, merge_args(ac, av));
}
}
@@ -314,8 +314,8 @@ class UnrealIRCdProto : public IRCDProto
void SendClientIntroduction(const char *nick, const char *user, const char *host, const char *real, const char *modes, const char *uid)
{
- EnforceQlinedNick(nick, s_BotServ);
- send_cmd(NULL, "& %s 1 %ld %s %s %s 0 %s %s%s :%s", nick, static_cast<long>(time(NULL)), user, host, ServerName, modes, host,
+ EnforceQlinedNick(nick, Config.s_BotServ);
+ send_cmd(NULL, "& %s 1 %ld %s %s %s 0 %s %s%s :%s", nick, static_cast<long>(time(NULL)), user, host, Config.ServerName, modes, host,
myIrcd->nickip ? " *" : " ", real);
SendSQLine(nick, "Reserved for services");
}
@@ -341,8 +341,8 @@ class UnrealIRCdProto : public IRCDProto
/* Unreal 3.2 actually sends some info about itself in the descript area */
void SendServer(Server *server)
{
- if (Numeric)
- send_cmd(NULL, "SERVER %s %d :U0-*-%s %s", server->name, server->hops, Numeric, server->desc);
+ if (Config.Numeric)
+ send_cmd(NULL, "SERVER %s %d :U0-*-%s %s", server->name, server->hops, Config.Numeric, server->desc);
else
send_cmd(NULL, "SERVER %s %d :%s", server->name, server->hops, server->desc);
}
@@ -350,7 +350,7 @@ class UnrealIRCdProto : public IRCDProto
/* JOIN */
void SendJoin(BotInfo *user, const char *channel, time_t chantime)
{
- send_cmd(ServerName, "~ !%s %s :%s", base64enc(static_cast<long>(chantime)), channel, user->nick);
+ send_cmd(Config.ServerName, "~ !%s %s :%s", base64enc(static_cast<long>(chantime)), channel, user->nick);
}
/* unsqline
@@ -411,24 +411,24 @@ class UnrealIRCdProto : public IRCDProto
{
unreal_cmd_capab();
unreal_cmd_pass(uplink_server->password);
- if (Numeric)
- me_server = new_server(NULL, ServerName, ServerDesc, SERVER_ISME, Numeric);
+ if (Config.Numeric)
+ me_server = new_server(NULL, Config.ServerName, Config.ServerDesc, SERVER_ISME, Config.Numeric);
else
- me_server = new_server(NULL, ServerName, ServerDesc, SERVER_ISME, NULL);
+ me_server = new_server(NULL, Config.ServerName, Config.ServerDesc, SERVER_ISME, NULL);
SendServer(me_server);
}
/* SVSHOLD - set */
void SendSVSHold(const char *nick)
{
- send_cmd(NULL, "BD + Q H %s %s %ld %ld :%s", nick, ServerName, static_cast<long>(time(NULL) + NSReleaseTimeout),
+ send_cmd(NULL, "BD + Q H %s %s %ld %ld :%s", nick, Config.ServerName, static_cast<long>(time(NULL) + Config.NSReleaseTimeout),
static_cast<long>(time(NULL)), "Being held for registered user");
}
/* SVSHOLD - release */
void SendSVSHoldDel(const char *nick)
{
- send_cmd(NULL, "BD - Q * %s %s", nick, ServerName);
+ send_cmd(NULL, "BD - Q * %s %s", nick, Config.ServerName);
}
/* UNSGLINE */
@@ -443,7 +443,7 @@ class UnrealIRCdProto : public IRCDProto
/* UNSZLINE */
void SendSZLineDel(const char *mask)
{
- send_cmd(NULL, "BD - Z * %s %s", mask, s_OperServ);
+ send_cmd(NULL, "BD - Z * %s %s", mask, Config.s_OperServ);
}
/* SZLINE */
@@ -475,8 +475,8 @@ class UnrealIRCdProto : public IRCDProto
void SendSVSModeChan(const char *name, const char *mode, const char *nick)
{
- if (nick) send_cmd(ServerName, "n %s %s %s", name, mode, nick);
- else send_cmd(ServerName, "n %s %s", name, mode);
+ if (nick) send_cmd(Config.ServerName, "n %s %s %s", name, mode, nick);
+ else send_cmd(Config.ServerName, "n %s %s", name, mode);
}
/* svsjoin
@@ -511,7 +511,7 @@ class UnrealIRCdProto : public IRCDProto
void SendEOB()
{
- send_cmd(ServerName, "ES");
+ send_cmd(Config.ServerName, "ES");
}
/*
@@ -568,7 +568,7 @@ int anope_event_ping(const char *source, int ac, const char **av)
{
if (ac < 1)
return MOD_CONT;
- ircdproto->SendPong(ac > 1 ? av[1] : ServerName, av[0]);
+ ircdproto->SendPong(ac > 1 ? av[1] : Config.ServerName, av[0]);
return MOD_CONT;
}