summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/bs_autoassign.cpp17
-rw-r--r--modules/commands/bs_badwords.cpp18
-rw-r--r--modules/commands/bs_bot.cpp38
-rw-r--r--modules/commands/bs_kick.cpp38
-rw-r--r--modules/commands/bs_set.cpp7
-rw-r--r--modules/commands/cs_access.cpp23
-rw-r--r--modules/commands/cs_akick.cpp16
-rw-r--r--modules/commands/cs_ban.cpp5
-rw-r--r--modules/commands/cs_clone.cpp22
-rw-r--r--modules/commands/cs_entrymsg.cpp11
-rw-r--r--modules/commands/cs_fantasy_stats.cpp9
-rw-r--r--modules/commands/cs_fantasy_top.cpp9
-rw-r--r--modules/commands/cs_flags.cpp16
-rw-r--r--modules/commands/cs_info.cpp7
-rw-r--r--modules/commands/cs_kick.cpp7
-rw-r--r--modules/commands/cs_list.cpp10
-rw-r--r--modules/commands/cs_mode.cpp2
-rw-r--r--modules/commands/cs_register.cpp15
-rw-r--r--modules/commands/cs_seen.cpp24
-rw-r--r--modules/commands/cs_set.cpp34
-rw-r--r--modules/commands/cs_set_misc.cpp12
-rw-r--r--modules/commands/cs_suspend.cpp11
-rw-r--r--modules/commands/cs_xop.cpp29
-rw-r--r--modules/commands/help.cpp9
-rw-r--r--modules/commands/hs_list.cpp11
-rw-r--r--modules/commands/hs_request.cpp56
-rw-r--r--modules/commands/hs_set.cpp8
-rw-r--r--modules/commands/ms_read.cpp7
-rw-r--r--modules/commands/ms_rsend.cpp26
-rw-r--r--modules/commands/ms_send.cpp4
-rw-r--r--modules/commands/ms_set.cpp27
-rw-r--r--modules/commands/ns_access.cpp21
-rw-r--r--modules/commands/ns_ajoin.cpp2
-rw-r--r--modules/commands/ns_cert.cpp10
-rw-r--r--modules/commands/ns_drop.cpp4
-rw-r--r--modules/commands/ns_getpass.cpp4
-rw-r--r--modules/commands/ns_group.cpp34
-rw-r--r--modules/commands/ns_info.cpp14
-rw-r--r--modules/commands/ns_list.cpp11
-rw-r--r--modules/commands/ns_recover.cpp13
-rw-r--r--modules/commands/ns_register.cpp78
-rw-r--r--modules/commands/ns_resetpass.cpp13
-rw-r--r--modules/commands/ns_set.cpp77
-rw-r--r--modules/commands/ns_set_misc.cpp14
-rw-r--r--modules/commands/ns_suspend.cpp7
-rw-r--r--modules/commands/ns_update.cpp2
-rw-r--r--modules/commands/os_akill.cpp24
-rw-r--r--modules/commands/os_chankill.cpp5
-rw-r--r--modules/commands/os_config.cpp154
-rw-r--r--modules/commands/os_defcon.cpp66
-rw-r--r--modules/commands/os_dns.cpp18
-rw-r--r--modules/commands/os_forbid.cpp35
-rw-r--r--modules/commands/os_ignore.cpp5
-rw-r--r--modules/commands/os_kill.cpp4
-rw-r--r--modules/commands/os_list.cpp10
-rw-r--r--modules/commands/os_login.cpp12
-rw-r--r--modules/commands/os_logsearch.cpp10
-rw-r--r--modules/commands/os_news.cpp21
-rw-r--r--modules/commands/os_noop.cpp4
-rw-r--r--modules/commands/os_reload.cpp4
-rw-r--r--modules/commands/os_session.cpp125
-rw-r--r--modules/commands/os_set.cpp16
-rw-r--r--modules/commands/os_stats.cpp7
-rw-r--r--modules/commands/os_svs.cpp9
-rw-r--r--modules/commands/os_sxline.cpp55
-rw-r--r--modules/database/db_flatfile.cpp31
-rw-r--r--modules/database/db_old.cpp3
-rw-r--r--modules/database/db_plain.cpp14
-rw-r--r--modules/database/db_sql.cpp10
-rw-r--r--modules/database/db_sql_live.cpp11
-rw-r--r--modules/extra/m_chanstats.cpp29
-rw-r--r--modules/extra/m_httpd.cpp21
-rw-r--r--modules/extra/m_ldap.cpp24
-rw-r--r--modules/extra/m_ldap_authentication.cpp36
-rw-r--r--modules/extra/m_ldap_oper.cpp16
-rw-r--r--modules/extra/m_mysql.cpp26
-rw-r--r--modules/extra/m_proxyscan.cpp43
-rw-r--r--modules/extra/m_sql_authentication.cpp22
-rw-r--r--modules/extra/m_sql_oper.cpp8
-rw-r--r--modules/extra/m_sqlite.cpp16
-rw-r--r--modules/extra/m_ssl.cpp12
-rw-r--r--modules/extra/m_xmlrpc_main.cpp9
-rw-r--r--modules/extra/webcpanel/pages/chanserv/access.cpp8
-rw-r--r--modules/extra/webcpanel/pages/chanserv/akick.cpp4
-rw-r--r--modules/extra/webcpanel/pages/chanserv/drop.cpp2
-rw-r--r--modules/extra/webcpanel/pages/confirm.cpp2
-rw-r--r--modules/extra/webcpanel/pages/hostserv/request.cpp2
-rw-r--r--modules/extra/webcpanel/pages/memoserv/memos.cpp4
-rw-r--r--modules/extra/webcpanel/pages/nickserv/access.cpp4
-rw-r--r--modules/extra/webcpanel/pages/nickserv/cert.cpp4
-rw-r--r--modules/extra/webcpanel/pages/operserv/akill.cpp4
-rw-r--r--modules/extra/webcpanel/pages/register.cpp2
-rw-r--r--modules/extra/webcpanel/webcpanel.cpp37
-rw-r--r--modules/ldapapi.h (renamed from modules/ldap.h)0
-rw-r--r--modules/m_dns.cpp19
-rw-r--r--modules/m_dnsbl.cpp28
-rw-r--r--modules/m_helpchan.cpp11
-rw-r--r--modules/m_rewrite.cpp17
-rw-r--r--modules/ns_maxemail.cpp20
-rw-r--r--modules/protocol/bahamut.cpp6
-rw-r--r--modules/protocol/charybdis.cpp29
-rw-r--r--modules/protocol/hybrid.cpp18
-rw-r--r--modules/protocol/inspircd11.cpp8
-rw-r--r--modules/protocol/inspircd12.cpp18
-rw-r--r--modules/protocol/inspircd20.cpp39
-rw-r--r--modules/protocol/ngircd.cpp11
-rw-r--r--modules/protocol/plexus.cpp6
-rw-r--r--modules/protocol/ratbox.cpp7
-rw-r--r--modules/protocol/unreal.cpp50
-rw-r--r--modules/pseudoclients/botserv.cpp144
-rw-r--r--modules/pseudoclients/chanserv.cpp205
-rw-r--r--modules/pseudoclients/chanserv.h18
-rw-r--r--modules/pseudoclients/global.cpp48
-rw-r--r--modules/pseudoclients/global.h4
-rw-r--r--modules/pseudoclients/hostserv.cpp24
-rw-r--r--modules/pseudoclients/memoserv.cpp64
-rw-r--r--modules/pseudoclients/memoserv.h4
-rw-r--r--modules/pseudoclients/nickserv.cpp136
-rw-r--r--modules/pseudoclients/nickserv.h4
-rw-r--r--modules/pseudoclients/operserv.cpp29
120 files changed, 1561 insertions, 1226 deletions
diff --git a/modules/bs_autoassign.cpp b/modules/bs_autoassign.cpp
index 134904925..3604fe69b 100644
--- a/modules/bs_autoassign.cpp
+++ b/modules/bs_autoassign.cpp
@@ -11,35 +11,28 @@
class BSAutoAssign : public Module
{
- Anope::string bot;
-
public:
BSAutoAssign(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR)
{
-
- Implementation i[] = { I_OnChanRegistered, I_OnReload };
+ Implementation i[] = { I_OnChanRegistered };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
void OnChanRegistered(ChannelInfo *ci) anope_override
{
- if (this->bot.empty())
+ const Anope::string &bot = Config->GetModule(this)->Get<const Anope::string &>("bot");
+ if (bot.empty())
return;
- BotInfo *bi = BotInfo::Find(this->bot);
+ BotInfo *bi = BotInfo::Find(bot);
if (bi == NULL)
{
- Log(this) << "bs_autoassign is configured to assign bot " << this->bot << ", but it does not exist?";
+ Log(this) << "bs_autoassign is configured to assign bot " << bot << ", but it does not exist?";
return;
}
bi->Assign(NULL, ci);
}
-
- void OnReload(ServerConfig *conf, ConfigReader &reader) anope_override
- {
- this->bot = reader.ReadValue("bs_autoassign", "bot", "", 0);
- }
};
MODULE_INIT(BSAutoAssign)
diff --git a/modules/commands/bs_badwords.cpp b/modules/commands/bs_badwords.cpp
index 90fbb875d..31dee8f8e 100644
--- a/modules/commands/bs_badwords.cpp
+++ b/modules/commands/bs_badwords.cpp
@@ -9,11 +9,8 @@
* Based on the original code of Services by Andy Church.
*/
-/*************************************************************************/
-
#include "module.h"
-
class BadwordsDelCallback : public NumberList
{
CommandSource &source;
@@ -146,17 +143,20 @@ class CommandBSBadwords : public Command
realword = word.substr(0, pos);
}
- if (ci->GetBadWordCount() >= Config->BSBadWordsMax)
+ unsigned badwordsmax = Config->GetModule(this->module)->Get<unsigned>("badwordsmax");
+ if (ci->GetBadWordCount() >= badwordsmax)
{
- source.Reply(_("Sorry, you can only have %d bad words entries on a channel."), Config->BSBadWordsMax);
+ source.Reply(_("Sorry, you can only have %d bad words entries on a channel."), badwordsmax);
return;
}
+ bool casesensitive = Config->GetModule("botserv")->Get<bool>("casesensitive");
+
for (unsigned i = 0, end = ci->GetBadWordCount(); i < end; ++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))))
+ if ((casesensitive && realword.equals_cs(bw->word)) || (!casesensitive && realword.equals_ci(bw->word)))
{
source.Reply(_("\002%s\002 already exists in %s bad words list."), bw->word.c_str(), ci->name.c_str());
return;
@@ -168,8 +168,6 @@ class CommandBSBadwords : public Command
ci->AddBadWord(realword, bwtype);
source.Reply(_("\002%s\002 added to %s bad words list."), realword.c_str(), ci->name.c_str());
-
- return;
}
void DoDelete(CommandSource &source, ChannelInfo *ci, const Anope::string &word)
@@ -219,6 +217,7 @@ class CommandBSBadwords : public Command
source.Reply(_("Bad words list is now empty."));
return;
}
+
public:
CommandBSBadwords(Module *creator) : Command(creator, "botserv/badwords", 2, 3)
{
@@ -289,7 +288,7 @@ class CommandBSBadwords : public Command
"will be done if a user says a word that ends with\n"
"\037word\037. If you don't specify anything, a kick will\n"
"be issued every time \037word\037 is said by a user.\n"
- " \n"), Config->UseStrictPrivMsgString.c_str(), source.service->nick.c_str(), source.command.c_str());
+ " \n"), Config->StrictPrivmsg.c_str(), source.service->nick.c_str(), source.command.c_str());
source.Reply(_("The \002DEL\002 command removes the given word from the\n"
"bad words list. If a list of entry numbers is given, those\n"
"entries are deleted. (See the example for LIST below.)\n"
@@ -316,7 +315,6 @@ class BSBadwords : public Module
BSBadwords(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
commandbsbadwords(this)
{
-
}
};
diff --git a/modules/commands/bs_bot.cpp b/modules/commands/bs_bot.cpp
index f8ecb1a1d..16fd9f2f2 100644
--- a/modules/commands/bs_bot.cpp
+++ b/modules/commands/bs_bot.cpp
@@ -29,21 +29,23 @@ class CommandBSBot : public Command
return;
}
- if (nick.length() > Config->NickLen)
+ Configuration::Block *networkinfo = Config->GetBlock("networkinfo");
+
+ if (nick.length() > networkinfo->Get<unsigned>("nicklen"))
{
- source.Reply(_("Bot nicks may only be %d characters long."), Config->NickLen);
+ source.Reply(_("Bot nicks may only be %d characters long."), networkinfo->Get<unsigned>