Advertisement
Panakotta00

IRC_Client.h

Aug 20th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1. #include <string>
  2. #include <pthread.h>
  3.  
  4. using namespace std;
  5.  
  6. class IRC_Client {
  7.     public:
  8.         IRC_Client(string host, int port, string user, string nick, string passwd);
  9.         int irc_connect();
  10.         void irc_disconnect();
  11.         void sendCommand(string cmd);
  12.         void sendMsg(string msg, string p = "");
  13.         void channel(string ch);
  14.         int startCommandListener();
  15.         static void *commandListener(void* arg);
  16.         virtual void cmd(string cmd);
  17.         virtual void pcmd(string cmd, string fullMsg);
  18.     private:
  19.         void irc_identify();
  20.         static const unsigned int MAX_LINE = 1024;
  21.         string host;
  22.         int port;
  23.         string user;
  24.         string nick;
  25.         string passwd;
  26.         string ch;
  27.         static int sockfd;
  28.         bool run = true;
  29.         pthread_t thread;
  30. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement