diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_chanhistory.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/modules/m_chanhistory.cpp b/src/modules/m_chanhistory.cpp index bace497c2..f1f9ed614 100644 --- a/src/modules/m_chanhistory.cpp +++ b/src/modules/m_chanhistory.cpp @@ -107,8 +107,10 @@ class ModuleChanHistory : public Module { HistoryMode m; bool sendnotice; + UserModeReference botmode; + bool dobots; public: - ModuleChanHistory() : m(this) + ModuleChanHistory() : m(this), botmode(this, "bot") { } @@ -125,6 +127,7 @@ class ModuleChanHistory : public Module 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&, MessageType msgtype) CXX11_OVERRIDE @@ -148,6 +151,9 @@ class ModuleChanHistory : public Module if (IS_REMOTE(memb->user)) return; + if (memb->user->IsModeSet(botmode) && !dobots) + return; + HistoryList* list = m.ext.get(memb->chan); if (!list) return; |