autoreply: Ignore messages from self

antiidle and autoreply didn't like each other, that's fixed now.

Thanks to Werring for reporting this.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1828 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-03-12 12:22:40 +00:00
parent 4303c3c200
commit cbd66df911
+7
View File
@@ -8,6 +8,7 @@
*/
#include "Modules.h"
#include "IRCSock.h"
#include "User.h"
class CAutoReplyMod : public CModule {
@@ -41,6 +42,12 @@ public:
}
void Handle(const CString& sNick) {
CIRCSock *pIRCSock = GetUser()->GetIRCSock();
if (!pIRCSock)
// WTF?
return;
if (sNick == pIRCSock->GetNick())
return;
if (m_Messaged.HasItem(sNick))
return;