-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathChannel.hpp
More file actions
39 lines (32 loc) · 1.16 KB
/
Channel.hpp
File metadata and controls
39 lines (32 loc) · 1.16 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
#ifndef CHANNEL_H
#define CHANNEL_H
#include <map>
#include <vector>
#include <string>
#include <iterator>
#include "Client.hpp"
#include "Define.hpp"
#define OPER 1
#define NORMAL 2
#define SIZE 3
class Channel {
private:
std::map<const Client&, int> _users;
std::map<const Client&, int>::iterator _it;
std::map<const Client&, int>::const_iterator _coit;
std::string _name;
public:
Channel(const Client& client, std::string name);
const std::string getName(void) const;
bool checkAuth(const Client& client) const;
bool checkClient(std::string nick);
void addUser(const Client& client);
void delUser(const Client& client);
int delByNick(std::string nick);
int getUserSize(void) const;
std::string getUsersNames(void);
std::vector<int> getFds(int senderFd) const;
void opUser(std::string nick);
void deopUser(std::string nick);
};
#endif