-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChannel.hpp
47 lines (38 loc) · 1.15 KB
/
Channel.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
//
// Created by Lucas on 24-Feb-23.
//
#ifndef FT_IRC_CHANNEL_HPP
#define FT_IRC_CHANNEL_HPP
#include <string>
#include <vector>
#include <iostream>
#include "Client.hpp"
class Client;
class Channel {
public:
Channel(std::string name, std::string op);
Channel(const Channel& other);
~Channel();
Channel& operator=(const Channel& other);
std::string get_name() {return _name;};
std::vector<Client *> get_users() { return _users; };
std::string get_topic() { return _topic; }
std::string get_operator() { return _operator; }
std::string get_topic_user() { return _topic_user; }
std::string get_topic_time() { return _topic_time; }
void add_user(Client *client);
bool is_user_in_channel(int fd);
void remove_user(int fd);
void send_to_users(std::string sender, std::string message);
void set_topic(const std::string& topic);
void set_topic_user(const std::string& user);
void set_topic_time(const std::string& time);
private:
std::string _name;
std::string _topic;
std::vector<Client *> _users;
std::string _operator;
std::string _topic_user;
std::string _topic_time;
};
#endif //FT_IRC_CHANNEL_HPP