-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClient.cpp
More file actions
86 lines (64 loc) · 1.32 KB
/
Client.cpp
File metadata and controls
86 lines (64 loc) · 1.32 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#include "Client.hpp"
Client::Client(){_refuse = false;}
const std::string Client::getIpAdd()
{
return(_IPadd);
}
bool Client::fullCommand(){
std::cout << _command << std::endl;
std::size_t found = _command.find('\n');
if (found!=std::string::npos)
return true;
return false;
}
int Client::GetFd(){
return this->Fd;
}
std::string Client::GetUsername(){
return this->_username;
}
std::string Client::GetNickname(){
return this->_nickname;
}
std::string Client::GetPass(){
return this->_pass;
}
bool Client::GetReg(){
return _reg;
}
bool Client::getRefuse(){
return (_refuse);
}
void Client::addCommand(std::string com){
_command.append(com);
}
void Client::delCommand(){
_command.clear();
}
std::string Client::GetCommand(){
return _command;
}
void Client::setRefuse(bool rep){
_refuse = rep;
}
void Client::SetUsername(std::string newUserName){
_username = newUserName;
}
void Client::SetNickname(std::string newNickName){
_nickname = newNickName;
}
void Client::SetPass(std::string newPass){
_pass = newPass;
}
void Client::SetFd(int fd){
Fd = fd;
}
void Client::setIpAdd(std::string ipadd){
_IPadd = ipadd;
}
void Client::SetReg(bool state) {
_reg = state;
}
void Client::SetModes(std::string modes){
_modes = modes;
}