mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -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.
|
# falling back to IPv4 otherwise.
|
||||||
defaultbind="auto"
|
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
|
# 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.
|
# setter in the topic instead of just the nick of the topic setter.
|
||||||
maskintopic="yes"
|
maskintopic="yes"
|
||||||
|
@ -489,6 +489,9 @@ public:
|
|||||||
/** The maximum number of local connections that can be made to the IRC server. */
|
/** The maximum number of local connections that can be made to the IRC server. */
|
||||||
size_t SoftLimit;
|
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. */
|
/** Whether to store the full nick!duser\@dhost as a topic setter instead of just their nick. */
|
||||||
bool MaskInTopic;
|
bool MaskInTopic;
|
||||||
|
|
||||||
|
@ -362,6 +362,7 @@ void ServerConfig::Fill()
|
|||||||
// Read the <options> config.
|
// Read the <options> config.
|
||||||
const auto& options = ConfValue("options");
|
const auto& options = ConfValue("options");
|
||||||
DefaultModes = options->getString("defaultmodes", "not");
|
DefaultModes = options->getString("defaultmodes", "not");
|
||||||
|
MaskInList = options->getBool("maskinlist");
|
||||||
MaskInTopic = options->getBool("maskintopic", options->getBool("hostintopic"));
|
MaskInTopic = options->getBool("maskintopic", options->getBool("hostintopic"));
|
||||||
NoSnoticeStack = options->getBool("nosnoticestack");
|
NoSnoticeStack = options->getBool("nosnoticestack");
|
||||||
SyntaxHints = options->getBool("syntaxhints");
|
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.
|
// 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;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user