ZNC
trunk
Toggle main menu visibility
Loading...
Searching...
No Matches
include
znc
Nick.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2004-2025 ZNC, see the NOTICE file for details.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
17
#ifndef ZNC_NICK_H
18
#define ZNC_NICK_H
19
20
#include <znc/zncconfig.h>
21
#include <
znc/ZNCString.h
>
22
#include <vector>
23
24
// Forward Decl
25
class
CIRCNetwork
;
26
class
CChan
;
27
// !Forward Decl
28
29
class
CNick
{
30
public
:
31
CNick
();
32
CNick
(
const
CString
& sNick);
33
~CNick
();
34
35
CNick
(
const
CNick
&) =
default
;
36
CNick
&
operator=
(
const
CNick
&) =
default
;
37
38
void
Reset
();
39
void
Parse
(
const
CString
& sNickMask);
40
CString
GetHostMask
()
const
;
41
size_t
GetCommonChans
(std::vector<CChan*>& vChans,
42
CIRCNetwork
* pNetwork)
const
;
43
bool
NickEquals
(
const
CString
& nickname)
const
;
44
45
// Setters
46
void
SetNetwork
(
CIRCNetwork
* pNetwork);
47
void
SetNick
(
const
CString
& s);
48
void
SetIdent
(
const
CString
& s);
49
void
SetHost
(
const
CString
& s);
51
bool
AddPerm
(
char
cPerm);
53
bool
RemPerm
(
char
cPerm);
54
// !Setters
55
56
// Getters
58
CString
GetPermStr
()
const
;
60
char
GetPermChar
()
const
;
62
bool
HasPerm
(
char
cPerm)
const
;
63
const
CString
&
GetNick
()
const
;
64
const
CString
&
GetIdent
()
const
;
65
const
CString
&
GetHost
()
const
;
66
CString
GetNickMask
()
const
;
67
// !Getters
68
69
void
Clone
(
const
CNick
& SourceNick);
70
71
private
:
72
protected
:
73
CString
m_sChanPerms
;
74
CIRCNetwork
*
m_pNetwork
;
75
CString
m_sNick
;
76
CString
m_sIdent
;
77
CString
m_sHost
;
78
};
79
80
#endif
// !ZNC_NICK_H
ZNCString.h
CChan
Definition
Chan.h:35
CIRCNetwork
Definition
IRCNetwork.h:40
CNick::m_sNick
CString m_sNick
Definition
Nick.h:75
CNick::CNick
CNick(const CNick &)=default
CNick::HasPerm
bool HasPerm(char cPerm) const
e.g. '@' for chanop.
CNick::GetNick
const CString & GetNick() const
CNick::m_sIdent
CString m_sIdent
Definition
Nick.h:76
CNick::GetIdent
const CString & GetIdent() const
CNick::AddPerm
bool AddPerm(char cPerm)
e.g. '@' for chanop.
CNick::SetIdent
void SetIdent(const CString &s)
CNick::m_sHost
CString m_sHost
Definition
Nick.h:77
CNick::SetNick
void SetNick(const CString &s)
CNick::m_sChanPerms
CString m_sChanPerms
Definition
Nick.h:73
CNick::Parse
void Parse(const CString &sNickMask)
CNick::SetHost
void SetHost(const CString &s)
CNick::GetPermChar
char GetPermChar() const
e.g. '@' for chanop.
CNick::SetNetwork
void SetNetwork(CIRCNetwork *pNetwork)
CNick::GetHostMask
CString GetHostMask() const
CNick::Clone
void Clone(const CNick &SourceNick)
CNick::GetCommonChans
size_t GetCommonChans(std::vector< CChan * > &vChans, CIRCNetwork *pNetwork) const
CNick::GetPermStr
CString GetPermStr() const
e.g. '@' for chanop.
CNick::GetHost
const CString & GetHost() const
CNick::m_pNetwork
CIRCNetwork * m_pNetwork
Definition
Nick.h:74
CNick::CNick
CNick(const CString &sNick)
CNick::~CNick
~CNick()
CNick::CNick
CNick()
CNick::GetNickMask
CString GetNickMask() const
CNick::NickEquals
bool NickEquals(const CString &nickname) const
CNick::operator=
CNick & operator=(const CNick &)=default
CNick::RemPerm
bool RemPerm(char cPerm)
e.g. '@' for chanop.
CNick::Reset
void Reset()
CString
String class that is used inside ZNC.
Definition
ZNCString.h:50
Generated by
1.17.0