mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
This commit adds a zncconfig.h to ZNC that is automatically generated by configure. This is done because the -DPACKAGE_STRING=\"znc\ 0.097\" that configure adds to CXXFLAGS breaks znc-buildmod. This means that we have to include zncconfig.h as the very first header in every C++ file that is compiled. This commit kinda cheats and instead adds this include as the very first thing to all header files we have. This should hopefully mean that modules don't have to include this. Because Csocket includes defines.h too late, this commit causes znc to divert from upstream Csocket once again. :( git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2250 726aef4b-f618-498e-8847-2d620e286838
67 lines
1.4 KiB
C++
67 lines
1.4 KiB
C++
/*
|
|
* Copyright (C) 2004-2010 See the AUTHORS file for details.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License version 2 as published
|
|
* by the Free Software Foundation.
|
|
*/
|
|
|
|
#ifndef _NICK_H
|
|
#define _NICK_H
|
|
|
|
#include "zncconfig.h"
|
|
#include "ZNCString.h"
|
|
#include <set>
|
|
#include <vector>
|
|
|
|
using std::vector;
|
|
using std::set;
|
|
|
|
// Forward Decl
|
|
class CUser;
|
|
class CChan;
|
|
// !Forward Decl
|
|
|
|
class CNick
|
|
{
|
|
public:
|
|
CNick();
|
|
CNick(const CString& sNick);
|
|
~CNick();
|
|
|
|
void Reset();
|
|
void Parse(const CString& sNickMask);
|
|
CString GetHostMask() const;
|
|
unsigned int GetCommonChans(vector<CChan*>& vChans, CUser* pUser) const;
|
|
|
|
// Setters
|
|
void SetUser(CUser* pUser);
|
|
void SetNick(const CString& s);
|
|
void SetIdent(const CString& s);
|
|
void SetHost(const CString& s);
|
|
bool AddPerm(unsigned char uPerm);
|
|
bool RemPerm(unsigned char uPerm);
|
|
// !Setters
|
|
|
|
// Getters
|
|
CString GetPermStr() const;
|
|
unsigned char GetPermChar() const;
|
|
bool HasPerm(unsigned char uPerm) const;
|
|
const CString& GetNick() const;
|
|
const CString& GetIdent() const;
|
|
const CString& GetHost() const;
|
|
CString GetNickMask() const;
|
|
// !Getters
|
|
|
|
void Clone(const CNick& SourceNick);
|
|
private:
|
|
protected:
|
|
CString m_sChanPerms;
|
|
CUser* m_pUser;
|
|
CString m_sNick;
|
|
CString m_sIdent;
|
|
CString m_sHost;
|
|
};
|
|
|
|
#endif // !_NICK_H
|