#ifndef SPARROWBOT_H #define SPARROWBOT_H #include "user.h" #include "message.h" #include class SparrowBot : public QObject { Q_OBJECT enum{OFFLINE, ONLINE, ON_CHAN}; std::string nick; std::string chan; int status; UserList users; public: SparrowBot() : nick("SparrowBot"), chan("epicsparrow"), status(OFFLINE) {} SparrowBot(std::string nick_, std::string chan_) : nick(nick_), chan(chan_), status(OFFLINE) {} private: void handleMessage(Message msg); void say(std::string str); void action(std::string str); void sendRawMessage(std::string str); public slots: void receiveMsg(QString msg); void forceStatus(int newStatus); signals: void sendMsg(QString msg); void changeSocketStatus(int newStatus); }; #endif // SPARROWBOT_H