1
0
mirror of https://github.com/anope/anope.git synced 2026-07-06 17:23:13 +02:00
Files
anope/modules/core/os_news.h
T
2011-05-19 20:36:39 -04:00

40 lines
545 B
C++

#ifndef OS_NEWS
#define OS_NEWS
enum NewsType
{
NEWS_LOGON,
NEWS_RANDOM,
NEWS_OPER
};
struct NewsMessages
{
NewsType type;
Anope::string name;
const char *msgs[10];
};
struct NewsItem
{
NewsType type;
Anope::string text;
Anope::string who;
time_t time;
};
class NewsService : public Service
{
public:
NewsService(Module *m) : Service(m, "news") { }
virtual void AddNewsItem(NewsItem *n) = 0;
virtual void DelNewsItem(NewsItem *n) = 0;
virtual std::vector<NewsItem *> &GetNewsList(NewsType t) = 0;
};
#endif // OS_NEWS