#
# 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
{
private:
HistoryMode m;
- bool sendnotice;
+ bool prefixmsg;
UserModeReference botmode;
bool dobots;
IRCv3::Batch::CapReference batchcap;
{
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);
}
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);
}