mirror of
https://github.com/anope/anope.git
synced 2026-06-24 13:36:36 +02:00
Don't enforce usestrictprivmsg on TS6 IRCds and cache the value of usestrictprivmsg
This commit is contained in:
+1
-3
@@ -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
|
||||
|
||||
|
||||
@@ -102,6 +102,8 @@ namespace Configuration
|
||||
Anope::string DefLanguage;
|
||||
/* options:timeoutcheck */
|
||||
time_t TimeoutCheck;
|
||||
/* options:usestrictprivmsg */
|
||||
bool UseStrictPrivmsg;
|
||||
|
||||
/* either "/msg " or "/" */
|
||||
Anope::string StrictPrivmsg;
|
||||
|
||||
+2
-1
@@ -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);
|
||||
|
||||
+1
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user