forked from cgray987/ft_irc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUser.hpp
63 lines (52 loc) · 1.2 KB
/
User.hpp
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
#pragma once
#include <iostream>
#include <vector>
#include <unistd.h>
#include <set>
class Channel;
class User
{
private:
std::string _nick;
std::string _user;
std::string _host;
std::string _realname;
int _fd;
bool _auth;
bool _op;
bool _registered;
std::string _read_buf;
// std::string _user_messge;
std::set<Channel *> _channels;
User();
public:
User(std::string nick, std::string user, std::string host);
User(const User &src);
User &operator = (const User &src);
~User();
//getters
int get_fd();
std::string get_nick();
std::string get_user();
std::string get_host();
std::string get_realname();
std::string get_prefix();
std::string get_read_buf();
bool get_auth();
bool get_op();
bool get_reg();
//setters
void set_fd(int fd);
void set_nick(std::string nick);
void set_user(std::string user);
void set_host(std::string host);
void set_realname(std::string nick);
void set_auth(bool auth);
void set_reg(bool reg);
void set_op(bool op_status);
void set_send_buf(std::string buf);
// channels
void join_channel(Channel *channel);
void leave_channel(Channel *channel);
const std::set<Channel *> &get_channels() const;
};