mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 10:39:02 -04:00
Rename <chanhistory:bots> to <chanhistory:sendtobots>.
This commit is contained in:
parent
fbbc362ebb
commit
2b10b8fc2a
@ -312,22 +312,23 @@
|
|||||||
#
|
#
|
||||||
#-#-#-#-#-#-#-#-#-#-#- CHANHISTORY CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
|
#-#-#-#-#-#-#-#-#-#-#- CHANHISTORY CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
|
||||||
# #
|
# #
|
||||||
# bots - Whether to send channel history to bots. Defaults to yes. #
|
# maxduration - The maximum period to keep chat history for. Defaults #
|
||||||
|
# to 4 weeks. #
|
||||||
# #
|
# #
|
||||||
# maxlines - The maximum number of lines of chat history to send to a #
|
# maxlines - The maximum number of lines of chat history to send to a #
|
||||||
# joining users. Defaults to 50. #
|
# joining users. Defaults to 50. #
|
||||||
# #
|
# #
|
||||||
# maxduration - The maximum period to keep chat history for. Defaults #
|
|
||||||
# to 4 weeks. #
|
|
||||||
# #
|
|
||||||
# prefixmsg - Whether to send an explanatory message to clients that #
|
# prefixmsg - Whether to send an explanatory message to clients that #
|
||||||
# don't support the chathistory batch type. Defaults to #
|
# don't support the chathistory batch type. Defaults to #
|
||||||
# yes. #
|
# yes. #
|
||||||
# #
|
# #
|
||||||
#<chanhistory bots="yes"
|
# sendtobots - Whether to send channel history to users with user #
|
||||||
|
# mode +B (bot) enabled. Defaults to yes. #
|
||||||
|
#
|
||||||
|
#<chanhistory maxlines="50"
|
||||||
# maxduration="4w"
|
# maxduration="4w"
|
||||||
# maxlines="50"
|
# prefixmsg="yes"
|
||||||
# prefixmsg="yes">
|
# sendtobots="yes">
|
||||||
|
|
||||||
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
|
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
|
||||||
# Channel logging module: Used to send snotice output to channels, to
|
# Channel logging module: Used to send snotice output to channels, to
|
||||||
|
@ -166,14 +166,14 @@ class ModuleChanHistory final
|
|||||||
private:
|
private:
|
||||||
HistoryMode historymode;
|
HistoryMode historymode;
|
||||||
SimpleUserMode nohistorymode;
|
SimpleUserMode nohistorymode;
|
||||||
bool prefixmsg;
|
|
||||||
UserModeReference botmode;
|
UserModeReference botmode;
|
||||||
bool dobots;
|
|
||||||
IRCv3::Batch::CapReference batchcap;
|
IRCv3::Batch::CapReference batchcap;
|
||||||
IRCv3::Batch::API batchmanager;
|
IRCv3::Batch::API batchmanager;
|
||||||
IRCv3::Batch::Batch batch;
|
IRCv3::Batch::Batch batch;
|
||||||
IRCv3::ServerTime::API servertimemanager;
|
IRCv3::ServerTime::API servertimemanager;
|
||||||
ClientProtocol::MessageTagEvent tagevent;
|
ClientProtocol::MessageTagEvent tagevent;
|
||||||
|
bool prefixmsg;
|
||||||
|
bool sendtobots;
|
||||||
|
|
||||||
void AddTag(ClientProtocol::Message& msg, const std::string& tagkey, std::string& tagval)
|
void AddTag(ClientProtocol::Message& msg, const std::string& tagkey, std::string& tagval)
|
||||||
{
|
{
|
||||||
@ -232,7 +232,7 @@ public:
|
|||||||
historymode.maxduration = tag->getDuration("maxduration", 60*60*24*28);
|
historymode.maxduration = tag->getDuration("maxduration", 60*60*24*28);
|
||||||
historymode.maxlines = tag->getNum<unsigned long>("maxlines", 50);
|
historymode.maxlines = tag->getNum<unsigned long>("maxlines", 50);
|
||||||
prefixmsg = tag->getBool("prefixmsg", true);
|
prefixmsg = tag->getBool("prefixmsg", true);
|
||||||
dobots = tag->getBool("bots", true);
|
sendtobots = tag->getBool("sendtobots", tag->getBool("bots", true));
|
||||||
}
|
}
|
||||||
|
|
||||||
ModResult OnRouteMessage(const Channel* channel, const Server* server) override
|
ModResult OnRouteMessage(const Channel* channel, const Server* server) override
|
||||||
@ -264,7 +264,7 @@ public:
|
|||||||
if (!localuser)
|
if (!localuser)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (memb->user->IsModeSet(botmode) && !dobots)
|
if (memb->user->IsModeSet(botmode) && !sendtobots)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (memb->user->IsModeSet(nohistorymode))
|
if (memb->user->IsModeSet(nohistorymode))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user