diff options
-rw-r--r-- | data/example.conf | 4 | ||||
-rw-r--r-- | include/config.h | 2 | ||||
-rw-r--r-- | src/config.cpp | 3 | ||||
-rw-r--r-- | src/messages.cpp | 2 |
4 files changed, 6 insertions, 5 deletions
diff --git a/data/example.conf b/data/example.conf index 71f9ef20c..b8ec96a9c 100644 --- a/data/example.conf +++ b/data/example.conf @@ -505,9 +505,7 @@ options * Nick@ServerName - e.g. NickServ@localhost.net. This should be used in * conjunction with IRCd aliases. This directive is optional. * - * When using Bahamut, this option will NOT work if the uplink server is - * configured as a services hub. The serviceshub option is not designed to - * be used with Anope. + * This option will have no effect on some IRCds, such as TS6 IRCds. */ #usestrictprivmsg = yes diff --git a/include/config.h b/include/config.h index 0ea30e5f6..a86a4433a 100644 --- a/include/config.h +++ b/include/config.h @@ -102,6 +102,8 @@ namespace Configuration Anope::string DefLanguage; /* options:timeoutcheck */ time_t TimeoutCheck; + /* options:usestrictprivmsg */ + bool UseStrictPrivmsg; /* either "/msg " or "/" */ Anope::string StrictPrivmsg; diff --git a/src/config.cpp b/src/config.cpp index 98b813ee7..4b16d8e97 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -182,7 +182,8 @@ Conf::Conf() : Block("") this->ReadTimeout = options->Get<time_t>("readtimeout"); this->UsePrivmsg = options->Get<bool>("useprivmsg"); - this->StrictPrivmsg = !options->Get<bool>("usestrictprivmsg") ? "/msg " : "/"; + this->UseStrictPrivmsg = options->Get<bool>("usestrictprivmsg"); + this->StrictPrivmsg = !UseStrictPrivmsg ? "/msg " : "/"; { std::vector<Anope::string> defaults; spacesepstream(this->GetModule("nickserv")->Get<const Anope::string>("defaults")).GetTokens(defaults); diff --git a/src/messages.cpp b/src/messages.cpp index fcaeffa43..1fcc8b898 100644 --- a/src/messages.cpp +++ b/src/messages.cpp @@ -300,7 +300,7 @@ void Privmsg::Run(MessageSource &source, const std::vector<Anope::string> ¶m if (!servername.equals_ci(Me->GetName())) return; } - else if (Config->GetBlock("options")->Get<bool>("usestrictprivmsg")) + else if (!IRCD->RequiresID && Config->UseStrictPrivmsg) { const BotInfo *bi = BotInfo::Find(receiver); if (!bi) |