Guest User

Untitled

a guest
Apr 21st, 2014
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.00 KB | None | 0 0
  1. #ifndef _ROOT_BOT_HPP
  2. #define _ROOT_BOT_HPP
  3.  
  4. #include           <string>
  5. #include           <vector>
  6. #include <initializer_list>
  7.  
  8. #include <SFML/Network.hpp>
  9.  
  10. class InternetRelayChat
  11. {
  12.     public:
  13.         InternetRelayChat();
  14.  
  15.         InternetRelayChat setServer  (std::string);
  16.         InternetRelayChat setChannels(std::initializer_list<std::string>);
  17.         InternetRelayChat setNick    (std::string);
  18.         InternetRelayChat setIdent   (std::string);
  19.         InternetRelayChat setRealname(std::string);
  20.         InternetRelayChat setPort    (     int);
  21.  
  22.         std::string              getServer  ();
  23.         std::vector<std::string> getChannels();
  24.         std::string              getNick    ();
  25.         std::string              getIdent   ();
  26.         std::string              getRealname();
  27.              int                 getPort    ();
  28.         std::string              getBuffer  ();
  29.         std::size_t              getBytes   ();
  30.  
  31.         bool connect    ();
  32.         void ircregister();
  33.         void receive    ();
  34.         void send       (std::string);
  35.         void sendMsg    (std::string, std::string);
  36.         void pong       ();
  37.         void join       ();
  38.  
  39.     private:
  40.         std::       string              Server        = "irc.quakenet.org";
  41.         std::       vector<std::string> Channels      = {"#BotDevGroundZero"};
  42.         std::       string              Nick          = "DTSBot";
  43.         std::       string              Ident         = "DTSBot";
  44.         std::       string              Realname      = "DTSBot";
  45.                     int                 Port          = 6667;
  46.         std::       string              Buffer        = "";
  47.         std::       size_t              BytesReceived = 0;
  48.         sf::        TcpSocket           Socket;
  49.         sf::Socket::Status              Status;
  50.  
  51.         std::vector<std::string> split(std::string, std::string="\n"); /* Thanks goes to PraetorOmega for loaning me this. */
  52. };
  53.  
  54. typedef InternetRelayChat irc;
  55.  
  56. #endif
Advertisement
Add Comment
Please, Sign In to add comment