# 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.
-#<chanhistory maxlines="20" notice="yes">
+# If bots is set to yes, it will also send to users marked with +B
+#<chanhistory maxlines="20" notice="yes" bots="yes">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Channel logging module: Used to send snotice output to channels, to
{
HistoryMode m;
bool sendnotice;
+ bool dobots;
public:
ModuleChanHistory() : m(this)
{
ConfigTag* tag = ServerInstance->Config->ConfValue("chanhistory");
m.maxlines = tag->getInt("maxlines", 50);
sendnotice = tag->getBool("notice", true);
+ dobots = tag->getBool("bots", true);
}
void OnUserMessage(User* user,void* dest,int target_type, const std::string &text, char status, const CUList&)
if (IS_REMOTE(memb->user))
return;
+ if (!dobots && ServerInstance->Modules->Find("m_botmode.so") && memb->user->IsModeSet('B'))
+ return;
+
HistoryList* list = m.ext.get(memb->chan);
if (!list)
return;