You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
669 B
39 lines
669 B
#pragma once
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
class IRCMessage
|
|
{
|
|
public:
|
|
IRCMessage();
|
|
IRCMessage(const std::string& toNick, const std::string& msg);
|
|
IRCMessage(const std::string& command);
|
|
~IRCMessage();
|
|
|
|
std::string prefix;
|
|
std::string command;
|
|
std::vector<std::string> params;
|
|
|
|
int numParams;
|
|
|
|
std::string &getPrefixNick();
|
|
std::string &getPrefixName();
|
|
std::string &getPrefixHost();
|
|
|
|
void composeMessage (std::string& output);
|
|
|
|
void addParam(const std::string &p);
|
|
|
|
std::string getCommand();
|
|
|
|
std::string getParam(int pos);
|
|
|
|
int getParamCount();
|
|
|
|
private:
|
|
void parsePrefix();
|
|
|
|
std::vector<std::string> prefixComponents;
|
|
bool prefixParsed;
|
|
};
|