Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef IRC_H
- #define IRC_H
- #include "socket.h"
- class IRC: public aaix::Socket
- {
- public:
- IRC();
- // These commands are typed exactly as they are found in the IRC RFC. Caps and all xD.
- int PASS(const std::string pass);
- int NICK(const std::string nick);
- int USER(const std::string username, int mode, const std::string realname);
- virtual ~IRC();
- aaix::Socket sock;
- protected:
- private:
- };
- IRC::IRC()
- {
- std::cout << "Init IRC component" << std::endl;
- }
- int IRC::PASS(const std::string pass)
- {
- sock << "PASS " << pass << aaix::sendl;
- return 0;
- }
- int IRC::NICK(const std::string nick)
- {
- sock << "NICK " << nick << aaix::sendl;
- return 0;
- }
- int IRC::USER(const std::string username, int mode, const std::string realname)
- {
- sock << "USER " << username << " " << mode << " * :" << realname << aaix::sendl;
- return 0;
- }
- IRC::~IRC()
- {
- std::cout << "Exit IRC component" << std::endl;
- }
- #endif // IRC_H
Add Comment
Please, Sign In to add comment