diff options
Diffstat (limited to 'modules')
125 files changed, 1392 insertions, 1477 deletions
diff --git a/modules/commands/bs_badwords.cpp b/modules/commands/bs_badwords.cpp index bb7a073f1..eaf00d347 100644 --- a/modules/commands/bs_badwords.cpp +++ b/modules/commands/bs_badwords.cpp @@ -81,7 +81,7 @@ class CommandBSBadwords : public Command if (!Number || Number > ci->GetBadWordCount()) return; - BadWord *bw = ci->GetBadWord(Number - 1); + const BadWord *bw = ci->GetBadWord(Number - 1); ListFormatter::ListEntry entry; entry["Number"] = stringify(Number); entry["Word"] = bw->word; @@ -96,7 +96,7 @@ class CommandBSBadwords : public Command { for (unsigned i = 0, end = ci->GetBadWordCount(); i < end; ++i) { - BadWord *bw = ci->GetBadWord(i); + const BadWord *bw = ci->GetBadWord(i); if (!word.empty() && !Anope::Match(bw->word, word)) continue; @@ -154,7 +154,7 @@ class CommandBSBadwords : public Command for (unsigned i = 0, end = ci->GetBadWordCount(); i < end; ++i) { - BadWord *bw = ci->GetBadWord(i); + const BadWord *bw = ci->GetBadWord(i); if (!bw->word.empty() && ((Config->BSCaseSensitive && realword.equals_cs(bw->word)) || (!Config->BSCaseSensitive && realword.equals_ci(bw->word)))) { @@ -183,7 +183,7 @@ class CommandBSBadwords : public Command else { unsigned i, end; - BadWord *badword; + const BadWord *badword; for (i = 0, end = ci->GetBadWordCount(); i < end; ++i) { diff --git a/modules/commands/bs_bot.cpp b/modules/commands/bs_bot.cpp index 526cd922c..b1f22909f 100644 --- a/modules/commands/bs_bot.cpp +++ b/modules/commands/bs_bot.cpp @@ -22,7 +22,6 @@ class CommandBSBot : public Command const Anope::string &user = params[2]; const Anope::string &host = params[3]; const Anope::string &real = params[4]; - BotInfo *bi; if (findbot(nick)) { @@ -93,7 +92,7 @@ class CommandBSBot : public Command return; } - bi = new BotInfo(nick, user, host, real); + BotInfo *bi = new BotInfo(nick, user, host, real); Log(LOG_ADMIN, source.u, this) << "ADD " << bi->GetMask() << " " << bi->realname; @@ -110,7 +109,6 @@ class CommandBSBot : public Command const Anope::string &user = params.size() > 3 ? params[3] : ""; const Anope::string &host = params.size() > 4 ? params[4] : ""; const Anope::string &real = params.size() > 5 ? params[5] : ""; - BotInfo *bi; if (oldnick.empty() || nick.empty()) { @@ -118,7 +116,8 @@ class CommandBSBot : public Command return; } - if (!(bi = findbot(oldnick))) + BotInfo *bi = findbot(oldnick); + if (!bi) |
