00001 /* 00002 ######################################################################### 00003 # 00004 # This file is part of trustyRC. 00005 # 00006 # trustyRC, fully modular IRC robot 00007 # Copyright (C) 2006-2008 Nicoleau Fabien 00008 # 00009 # trustyRC is free software: you can redistribute it and/or modify 00010 # it under the terms of the GNU General Public License as published by 00011 # the Free Software Foundation, either version 3 of the License, or 00012 # (at your option) any later version. 00013 # 00014 # trustyRC is distributed in the hope that it will be useful, 00015 # but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 # GNU General Public License for more details. 00018 # 00019 # You should have received a copy of the GNU General Public License 00020 # along with trustyRC. If not, see <http://www.gnu.org/licenses/>. 00021 # 00022 ######################################################################### 00023 */ 00024 00029 #ifndef MESSAGE_H 00030 #define MESSAGE_H 00031 #include "tools.h" 00032 #include <string> 00033 #include <iostream> 00034 using namespace std; 00035 00044 class Message { 00045 public : 00047 Message(string); 00049 Message(); 00051 ~Message(); 00053 vector<string> getSplit(); 00055 void setMessage(string); 00057 unsigned int nbParts(); 00059 string getPart(unsigned int); 00061 string getSender(); 00063 string getNickSender(); 00065 string getHostSender(); 00067 string getIdentSender(); 00069 bool isPrivate(); 00071 bool isPublic(); 00073 string getSource(); 00075 string getMessage(); 00077 time_t getElapsedTime(); 00078 private : 00080 string message; 00082 vector<string> split ; 00084 bool pv; 00086 time_t timestamp; 00087 }; 00088 #endif