~ubuntu-branches/ubuntu/maverick/znc/maverick

« back to all changes in this revision

Viewing changes to modules/autoreply.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Patrick Matthäi
  • Date: 2010-05-24 18:05:44 UTC
  • mfrom: (1.3.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100524180544-8e4s3f4nj0lhyw7n
Tags: 0.090~rc1-1
* New upstream release candidate.
  - Drop znc-webadmin package. It is now provided in the core source code.
  - Rename discon_kick module to disconkick.
  - Add charset and notes module.
* Add missing dependency on libc-ares-dev to znc-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 */
9
9
 
10
10
#include "Modules.h"
 
11
#include "IRCSock.h"
11
12
#include "User.h"
12
13
 
13
14
class CAutoReplyMod : public CModule {
41
42
        }
42
43
 
43
44
        void Handle(const CString& sNick) {
 
45
                CIRCSock *pIRCSock = GetUser()->GetIRCSock();
 
46
                if (!pIRCSock)
 
47
                        // WTF?
 
48
                        return;
 
49
                if (sNick == pIRCSock->GetNick())
 
50
                        return;
44
51
                if (m_Messaged.HasItem(sNick))
45
52
                        return;
46
53
 
78
85
        }
79
86
 
80
87
private:
81
 
        TCacheMap<CString>      m_Messaged;
 
88
        TCacheMap<CString> m_Messaged;
82
89
};
83
90
 
84
91
MODULEDEFS(CAutoReplyMod, "Reply to queries when you are away")