autoattach: Modernize and update test.

This commit is contained in:
RealKindOne authored and Alexey Sokolov committed 2026-09-13 11:27:31 +01:00
1 parent 76cdad9e6a
commit a75612dd15
2 files changed
+32 -8

No files matched your search

+12 -8
View File
@@ -209,20 +209,24 @@ class CChanAttach : public CModule {
}
}
EModRet OnChanNotice(CNick& Nick, CChan& Channel,
CString& sMessage) override {
TryAttach(Nick, Channel, sMessage);
EModRet OnChanNoticeMessage(CNoticeMessage& Message) override {
CString sText = Message.GetText();
TryAttach(Message.GetNick(), *Message.GetChan(), sText);
Message.SetText(sText);
return CONTINUE;
}
EModRet OnChanMsg(CNick& Nick, CChan& Channel, CString& sMessage) override {
TryAttach(Nick, Channel, sMessage);
EModRet OnChanTextMessage(CTextMessage& Message) override {
CString sText = Message.GetText();
TryAttach(Message.GetNick(), *Message.GetChan(), sText);
Message.SetText(sText);
return CONTINUE;
}
EModRet OnChanAction(CNick& Nick, CChan& Channel,
CString& sMessage) override {
TryAttach(Nick, Channel, sMessage);
EModRet OnChanActionMessage(CActionMessage& Message) override {
CString sText = Message.GetText();
TryAttach(Message.GetNick(), *Message.GetChan(), sText);
Message.SetText(sText);
return CONTINUE;
}