1
0
mirror of https://github.com/anope/anope.git synced 2026-06-29 03:06:37 +02:00

Moved some of the news variables out of the news module so other modules etc can access them, if needed

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2604 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
Adam-
2009-11-03 02:05:38 +00:00
parent a1fe864c7f
commit 65deeaf1e6
4 changed files with 34 additions and 24 deletions
+2
View File
@@ -688,6 +688,8 @@ E int check_szline(const char *nick, char *ip);
E Server *server_global(Server * s, char *msg);
E std::vector<NewsItem *> News;
E bool CheckDefCon(DefconLevel Level);
E bool CheckDefCon(int level, DefconLevel Level);
E void AddDefCon(int level, DefconLevel Level);
+29
View File
@@ -1023,6 +1023,35 @@ typedef struct ignore_data {
/*************************************************************************/
/* News stuff */
#define MSG_MAX 11
enum NewsType
{
NEWS_LOGON,
NEWS_RANDOM,
NEWS_OPER
};
struct newsmsgs
{
NewsType type;
const char *name;
int msgs[MSG_MAX + 1];
};
struct NewsItem
{
NewsType type;
uint32 num;
std::string Text;
char who[NICKMAX];
time_t time;
};
/*************************************************************************/
/* Mail data */
struct mailinfo_ {
-24
View File
@@ -32,30 +32,6 @@
#define MSG_DELETED_ALL 11
#define MSG_MAX 11
enum NewsType
{
NEWS_LOGON,
NEWS_RANDOM,
NEWS_OPER
};
struct newsmsgs {
NewsType type;
const char *name;
int msgs[MSG_MAX + 1];
};
struct NewsItem
{
NewsType type;
uint32 num;
std::string Text;
char who[NICKMAX];
time_t time;
};
std::vector<NewsItem *> News;
struct newsmsgs msgarray[] = {
{NEWS_LOGON, "LOGON",
{NEWS_LOGON_SYNTAX,
+3
View File
@@ -31,6 +31,9 @@ static void free_sqline_entry(SList * slist, void *item);
static int is_szline_entry_equal(SList * slist, void *item1, void *item2);
static void free_szline_entry(SList * slist, void *item);
/* News items */
std::vector<NewsItem *> News;
std::vector<std::bitset<32> > DefCon;
int DefConModesSet = 0;
ChannelInfo DefConModesCI; /* ChannelInfo containg params for locked modes