diff options
| author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-11-28 23:02:07 +0000 |
|---|---|---|
| committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-11-28 23:02:07 +0000 |
| commit | a08b3ec5924c946308ac086cd3ee7d701610d3be (patch) | |
| tree | 84da442a85ffeccd6425cc7c85db9eda6e881753 /src/core | |
| parent | f6b823ade85160f94544d1ad1de4d8fbc42b2712 (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/core')
111 files changed, 2072 insertions, 2074 deletions
diff --git a/src/core/bs_act.c b/src/core/bs_act.c index c30c8f62d..e321c37a9 100644 --- a/src/core/bs_act.c +++ b/src/core/bs_act.c @@ -29,19 +29,19 @@ class CommandBSAct : public Command if (!check_access(u, ci, CA_SAY)) { - notice_lang(s_BotServ, u, ACCESS_DENIED); + notice_lang(Config.s_BotServ, u, ACCESS_DENIED); return MOD_CONT; } if (!ci->bi) { - notice_help(s_BotServ, u, BOT_NOT_ASSIGNED); + notice_help(Config.s_BotServ, u, BOT_NOT_ASSIGNED); return MOD_CONT; } - if (!ci->c || ci->c->usercount < BSMinUsers) + if (!ci->c || ci->c->usercount < Config.BSMinUsers) { - notice_lang(s_BotServ, u, BOT_NOT_ON_CHANNEL, ci->name); + notice_lang(Config.s_BotServ, u, BOT_NOT_ON_CHANNEL, ci->name); return MOD_CONT; } @@ -51,19 +51,19 @@ class CommandBSAct : public Command ircdproto->SendAction(ci->bi, ci->name, "%s", message.c_str()); ci->bi->lastmsg = time(NULL); - if (LogBot && LogChannel && LogChan && !debug && findchan(LogChannel)) - ircdproto->SendPrivmsg(ci->bi, LogChannel, "ACT %s %s %s", u->nick, ci->name, message.c_str()); + if (Config.LogBot && Config.LogChannel && LogChan && !debug && findchan(Config.LogChannel)) + ircdproto->SendPrivmsg(ci->bi, Config.LogChannel, "ACT %s %s %s", u->nick, ci->name, message.c_str()); return MOD_CONT; } void OnSyntaxError(User *u, const ci::string &subcommand) { - syntax_error(s_BotServ, u, "ACT", BOT_ACT_SYNTAX); + syntax_error(Config.s_BotServ, u, "ACT", BOT_ACT_SYNTAX); } bool OnHelp(User *u, const ci::string &subcommand) { - notice_help(s_BotServ, u, BOT_HELP_ACT); + notice_help(Config.s_BotServ, u, BOT_HELP_ACT); return true; } }; @@ -82,7 +82,7 @@ class BSAct : public Module } void OnBotServHelp(User *u) { - notice_lang(s_BotServ, u, BOT_HELP_CMD_ACT); + notice_lang(Config.s_BotServ, u, BOT_HELP_CMD_ACT); } }; diff --git a/src/core/bs_assign.c b/src/core/bs_assign.c index 10d224b8e..30b7ef647 100644 --- a/src/core/bs_assign.c +++ b/src/core/bs_assign.c @@ -31,13 +31,13 @@ class CommandBSAssign : public Command if (readonly) { - notice_lang(s_BotServ, u, BOT_ASSIGN_READONLY); + notice_lang(Config.s_BotServ, u, BOT_ASSIGN_READONLY); return MOD_CONT; } if (!(bi = findbot(nick))) { - notice_lang(s_BotServ, u, BOT_DOES_NOT_EXIST, nick); + notice_lang(Config.s_BotServ, u, BOT_DOES_NOT_EXIST, nick); return MOD_CONT; } @@ -45,36 +45,36 @@ class CommandBSAssign : public Command if (ci->botflags.HasFlag(BS_NOBOT) || (!check_access(u, ci, CA_ASSIGN) && !u->nc->HasPriv("botserv/administration"))) { - notice_lang(s_BotServ, u, ACCESS_DENIED); + notice_lang(Config.s_BotServ, u, ACCESS_DENIED); return MOD_CONT; } if (bi->HasFlag(BI_PRIVATE) && !u->nc->HasCommand("botserv/assign/private")) { - notice_lang(s_BotServ, u, ACCESS_DENIED); + notice_lang(Config.s_BotServ, u, ACCESS_DENIED); return MOD_CONT; } if ((ci->bi) && (stricmp(ci->bi->nick, nick) == 0)) { - notice_lang(s_BotServ, u, BOT_ASSIGN_ALREADY, ci->bi->nick, chan); + notice_lang(Config.s_BotServ, u, BOT_ASSIGN_ALREADY, ci->bi->nick, chan); return MOD_CONT; } bi->Assign(u, ci); - notice_lang(s_BotServ, u, BOT_ASSIGN_ASSIGNED, bi->nick, ci->name); + notice_lang(Config.s_BotServ, u, BOT_ASSIGN_ASSIGNED, bi->nick, ci->name); return MOD_CONT; } bool OnHelp(User *u, const ci::string &subcommand) { - notice_help(s_BotServ, u, BOT_HELP_ASSIGN); + notice_help(Config.s_BotServ, u, BOT_HELP_ASSIGN); return true; } void OnSyntaxError(User *u, const ci::string &subcommand) { - syntax_error(s_BotServ, u, "ASSIGN", BOT_ASSIGN_SYNTAX); + syntax_error(Config.s_BotServ, u, "ASSIGN", BOT_ASSIGN_SYNTAX); } }; @@ -92,7 +92,7 @@ class BSAssign : public Module } void OnBotServHelp(User *u) { - notice_lang(s_BotServ, u, BOT_HELP_CMD_ASSIGN); + notice_lang(Config.s_BotServ, u, BOT_HELP_CMD_ASSIGN); } }; diff --git a/src/core/bs_badwords.c b/src/core/bs_badwords.c index 6709dab0e..06f4eedd0 100644 --- a/src/core/bs_badwords.c +++ b/src/core/bs_badwords.c @@ -28,7 +28,7 @@ class CommandBSBadwords : public Command if (!ci->GetBadWordCount()) { - notice_lang(s_BotServ, u, BOT_BADWORDS_LIST_EMPTY, ci->name); + notice_lang(Config.s_BotServ, u, BOT_BADWORDS_LIST_EMPTY, ci->name); return MOD_CONT; } if (!word.empty() && strspn(word.c_str(), "1234567890,-") == word.length()) @@ -48,7 +48,7 @@ class CommandBSBadwords : public Command } } if (!sent_header) - notice_lang(s_BotServ, u, BOT_BADWORDS_NO_MATCH, ci->name); + notice_lang(Config.s_BotServ, u, BOT_BADWORDS_NO_MATCH, ci->name); return MOD_CONT; } @@ -74,9 +74,9 @@ class CommandBSBadwords : public Command realword = ci::string(word, 0, pos); } - if (ci->GetBadWordCount() >= BSBadWordsMax) + if (ci->GetBadWordCount() >= Config.BSBadWordsMax) { - notice_lang(s_BotServ, u, BOT_BADWORDS_REACHED_LIMIT, BSBadWordsMax); + notice_lang(Config.s_BotServ, u, BOT_BADWORDS_REACHED_LIMIT, Config.BSBadWordsMax); return MOD_CONT; } @@ -84,17 +84,17 @@ class CommandBSBadwords : public Command { BadWord *bw = ci->GetBadWord(i); - if (!bw->word.empty() && (BSCaseSensitive && !stricmp(bw->word.c_str(), realword.c_str()) - || (!BSCaseSensitive && bw->word == realword.c_str()))) + if (!bw->word.empty() && (Config.BSCaseSensitive && !stricmp(bw->word.c_str(), realword.c_str()) + || (!Config.BSCaseSensitive && bw->word == realword.c_str()))) { - notice_lang(s_BotServ, u, BOT_BADWORDS_ALREADY_EXISTS, bw->word.c_str(), ci->name); + notice_lang(Config.s_BotServ, u, BOT_BADWORDS_ALREADY_EXISTS, bw->word.c_str(), ci->name); return MOD_CONT; } } ci->AddBadWord(realword.c_str(), type); - notice_lang(s_BotServ, u, BOT_BADWORDS_ADDED, realword.c_str(), ci->name); + notice_lang(Config.s_BotServ, u, BOT_BADWORDS_ADDED, realword.c_str(), ci->name); return MOD_CONT; } @@ -111,20 +111,20 @@ class CommandBSBadwords : public Command { if (count == 1) { - notice_lang(s_BotServ, u, BOT_BADWORDS_NO_SUCH_ENTRY, last, ci->name); + notice_lang(Config.s_BotServ, u, BOT_BADWORDS_NO_SUCH_ENTRY, last, ci->name); } else { - notice_lang(s_BotServ, u, BOT_BADWORDS_NO_MATCH, ci->name); + notice_lang(Config.s_BotServ, u, BOT_BADWORDS_NO_MATCH, ci->name); } } else if (deleted == 1) { - notice_lang(s_BotServ, u, BOT_BADWORDS_DELETED_ONE, ci->name); + notice_lang(Config.s_BotServ, u, BOT_BADWORDS_DELETED_ONE, ci->name); } else { - notice_lang(s_BotServ, u, BOT_BADWORDS_DELETED_SEVERAL, deleted, ci->name); + notice_lang(Config.s_BotServ, u, BOT_BADWORDS_DELETED_SEVERAL, deleted, ci->name); } if (deleted) @@ -145,13 +145,13 @@ class CommandBSBadwords : public Command if (i == ci->GetBadWordCount()) { - notice_lang(s_BotServ, u, BOT_BADWORDS_NOT_FOUND, word.c_str(), ci->name); + notice_lang(Config.s_BotServ, u, BOT_BADWORDS_NOT_FOUND, word.c_str(), ci->name); return MOD_CONT; } ci->EraseBadWord(badword); - notice_lang(s_BotServ, u, BOT_BADWORDS_DELETED, badword->word.c_str(), ci->name); + notice_lang(Config.s_BotServ, u, BOT_BADWORDS_DELETED, badword->word.c_str(), ci->name); } return MOD_CONT; @@ -160,7 +160 |
