mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 10:39:02 -04:00
Add an option for including the setter's full mask in list modes.
This commit is contained in:
parent
e9271fcb49
commit
136a1ef6a2
@ -609,6 +609,10 @@
|
||||
# falling back to IPv4 otherwise.
|
||||
defaultbind="auto"
|
||||
|
||||
# maskinlist: If enabled then channels will show the nick!user@host of a list
|
||||
# mode setter in the mode list instead of just the nick of the list mode setter.
|
||||
maskinlist="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"
|
||||
|
@ -489,6 +489,9 @@ public:
|
||||
/** The maximum number of local connections that can be made to the IRC server. */
|
||||
size_t SoftLimit;
|
||||
|
||||
/** Whether to store the full nick!duser\@dhost as a list mode setter instead of just their nick. */
|
||||
bool MaskInList;
|
||||
|
||||
/** Whether to store the full nick!duser\@dhost as a topic setter instead of just their nick. */
|
||||
bool MaskInTopic;
|
||||
|
||||
|
@ -362,6 +362,7 @@ void ServerConfig::Fill()
|
||||
// Read the <options> config.
|
||||
const auto& options = ConfValue("options");
|
||||
DefaultModes = options->getString("defaultmodes", "not");
|
||||
MaskInList = options->getBool("maskinlist");
|
||||
MaskInTopic = options->getBool("maskintopic", options->getBool("hostintopic"));
|
||||
NoSnoticeStack = options->getBool("nosnoticestack");
|
||||
SyntaxHints = options->getBool("syntaxhints");
|
||||
|
@ -199,7 +199,11 @@ bool ListModeBase::OnModeChange(User* source, User*, Channel* channel, Modes::Ch
|
||||
}
|
||||
|
||||
// Add the new entry to the list.
|
||||
cd->list.emplace_back(change.param, change.set_by.value_or(source->nick), change.set_at.value_or(ServerInstance->Time()));
|
||||
cd->list.emplace_back(
|
||||
change.param,
|
||||
change.set_by.value_or(ServerInstance->Config->MaskInList ? source->GetMask() : source->nick),
|
||||
change.set_at.value_or(ServerInstance->Time())
|
||||
);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user