Rename <options:hostintopic> to <options:maskintopic>.

This option stores the user *mask* not the user host so the old
name is incorrect.
This commit is contained in:
Sadie Powell 2023-09-21 20:06:39 +01:00
parent 6a9b215c04
commit e9271fcb49
5 changed files with 7 additions and 7 deletions

View File

@ -609,9 +609,9 @@
# falling back to IPv4 otherwise.
defaultbind="auto"
# hostintopic: If enabled, channels will show the host of the topic setter
# in the topic. If set to no, it will only show the nick of the topic setter.
hostintopic="yes"
# maskintopic: If enabled then channels will show the nick!user@host of the topic
# setter in the topic instead of just the nick of the topic setter.
maskintopic="yes"
# pingwarning: If a server does not respond to a ping within this period,
# it will send a notice to opers with snomask +l informing that the server

View File

@ -490,7 +490,7 @@ public:
size_t SoftLimit;
/** Whether to store the full nick!duser\@dhost as a topic setter instead of just their nick. */
bool FullHostInTopic;
bool MaskInTopic;
/** Whether to disable stacking snotices when multiple identical messages are sent. */
bool NoSnoticeStack;

View File

@ -61,7 +61,7 @@ void Channel::SetTopic(User* u, const std::string& ntopic, time_t topicts, const
// Always update setter and set time
if (!setter)
setter = ServerInstance->Config->FullHostInTopic ? &u->GetMask() : &u->nick;
setter = ServerInstance->Config->MaskInTopic ? &u->GetMask() : &u->nick;
this->setby.assign(*setter, 0, ServerInstance->Config->Limits.GetMaxMask());
this->topicset = topicts;

View File

@ -362,7 +362,7 @@ void ServerConfig::Fill()
// Read the <options> config.
const auto& options = ConfValue("options");
DefaultModes = options->getString("defaultmodes", "not");
FullHostInTopic = options->getBool("hostintopic");
MaskInTopic = options->getBool("maskintopic", options->getBool("hostintopic"));
NoSnoticeStack = options->getBool("nosnoticestack");
SyntaxHints = options->getBool("syntaxhints");
XLineMessage = options->getString("xlinemessage", "You're banned!", 1);

View File

@ -45,7 +45,7 @@ CmdResult CommandFTopic::Handle(User* user, Params& params)
const std::string& newtopic = params.back();
// If there is a setter in the message use that, otherwise use the message source
const std::string& setter = ((params.size() > 4) ? params[3] : (ServerInstance->Config->FullHostInTopic ? user->GetMask() : user->nick));
const std::string& setter = ((params.size() > 4) ? params[3] : (ServerInstance->Config->MaskInTopic ? user->GetMask() : user->nick));
/*
* If the topics were updated at the exact same second, accept