-
Notifications
You must be signed in to change notification settings - Fork 1
/
Nick.h
66 lines (56 loc) · 1.39 KB
/
Nick.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
* Copyright (C) 2004-2011 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 CIRCNetwork;
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, CIRCNetwork* pNetwork) const;
// Setters
void SetNetwork(CIRCNetwork* pNetwork);
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;
CIRCNetwork* m_pNetwork;
CString m_sNick;
CString m_sIdent;
CString m_sHost;
};
#endif // !_NICK_H