~vanhoof/+junk/znc

« back to all changes in this revision

Viewing changes to modules/fixfreenode.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Patrick Matthäi
  • Date: 2009-09-25 08:07:42 UTC
  • mfrom: (1.3.1 upstream) (10.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20090925080742-vvh22yi4969453r7
Tags: 0.076-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2004-2009  See the AUTHORS file for details.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify it
 
5
 * under the terms of the GNU General Public License version 2 as published
 
6
 * by the Free Software Foundation.
 
7
 */
 
8
 
 
9
#include "Modules.h"
 
10
 
 
11
class CPreventIdMsgMod : public CModule {
 
12
public:
 
13
        MODCONSTRUCTOR(CPreventIdMsgMod) {}
 
14
 
 
15
        virtual EModRet OnUserRaw(CString& sLine) {
 
16
                if (sLine.Token(0).AsLower() == "capab") {
 
17
                        if (sLine.AsLower().find("identify-msg") != CString::npos
 
18
                                        || sLine.AsLower().find("identify-ctcp") != CString::npos)
 
19
                                return HALTCORE;
 
20
                }
 
21
                return CONTINUE;
 
22
        }
 
23
};
 
24
 
 
25
MODULEDEFS(CPreventIdMsgMod, "Prevent client from sending IDENTIFY-MSG to server")