summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/conf/modules.conf.example7
-rw-r--r--src/modules/m_chanhistory.cpp8
2 files changed, 8 insertions, 7 deletions
diff --git a/docs/conf/modules.conf.example b/docs/conf/modules.conf.example
index ae747e3a0..215f66137 100644
--- a/docs/conf/modules.conf.example
+++ b/docs/conf/modules.conf.example
@@ -424,10 +424,11 @@
#
# Set the maximum number of lines allowed to be stored per channel below.
# This is the hard limit for 'X'.
-# If notice is set to yes, joining users will get a NOTICE before playback
-# telling them about the following lines being the pre-join history.
+# If prefixmsg is set to yes, joining users without batch support will get
+# a NOTICE before playback telling them about the following lines being
+# the pre-join history.
# If bots is set to yes, it will also send to users marked with +B
-#<chanhistory maxlines="50" notice="yes" bots="yes">
+#<chanhistory maxlines="50" prefixmsg="yes" bots="yes">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Channel logging module: Used to send snotice output to channels, to
diff --git a/src/modules/m_chanhistory.cpp b/src/modules/m_chanhistory.cpp
index cfe2a6916..c9a4286de 100644
--- a/src/modules/m_chanhistory.cpp
+++ b/src/modules/m_chanhistory.cpp
@@ -124,7 +124,7 @@ class ModuleChanHistory
{
private:
HistoryMode m;
- bool sendnotice;
+ bool prefixmsg;
UserModeReference botmode;
bool dobots;
IRCv3::Batch::CapReference batchcap;
@@ -191,7 +191,7 @@ class ModuleChanHistory
{
ConfigTag* tag = ServerInstance->Config->ConfValue("chanhistory");
m.maxlines = tag->getUInt("maxlines", 50, 1);
- sendnotice = tag->getBool("notice", true);
+ prefixmsg = tag->getBool("prefixmsg", tag->getBool("notice", true));
dobots = tag->getBool("bots", true);
}
@@ -228,11 +228,11 @@ class ModuleChanHistory
if (!list)
return;
- if ((sendnotice) && (!batchcap.get(localuser)))
+ if ((prefixmsg) && (!batchcap.get(localuser)))
{
std::string message("Replaying up to " + ConvToStr(list->maxlen) + " lines of pre-join history");
if (list->maxtime > 0)
- message.append(" spanning up to " + InspIRCd::DurationString(list->maxtime));
+ message.append(" from the last " + InspIRCd::DurationString(list->maxtime));
memb->WriteNotice(message);
}