#include "inspstring.h"
#include "helperfuncs.h"
#include "hashcomp.h"
+#include "typedefs.h"
extern int MODCOUNT;
extern std::vector<Module*> modules;
extern ServerConfig *Config;
-
extern time_t TIME;
extern char lowermap[255];
-extern std::stringstream config_f;
static char list[MAXBUF];
extern userrec* fd_ref_table[65536];
-
extern serverstats* stats;
-
static char already_sent[65536];
extern std::vector<userrec*> all_opers;
-
extern ClassVector Classes;
-
-typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> user_hash;
-typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp> chan_hash;
-typedef std::deque<command_t> command_table;
-
extern user_hash clientlist;
extern chan_hash chanlist;
extern command_table cmdlist;
-extern file_cache MOTD;
-extern file_cache RULES;
void log(int level,char *text, ...)
{
{
fgets(linebuf,sizeof(linebuf),file);
linebuf[strlen(linebuf)-1]='\0';
- if (linebuf[0] == 0)
+ if (!*linebuf)
{
strcpy(linebuf," ");
}
long GetMaxBans(char* name)
{
char CM[MAXBUF];
- for (int count = 0; count < ConfValueEnum("banlist",&config_f); count++)
+ for (int count = 0; count < ConfValueEnum("banlist",&Config->config_f); count++)
{
- ConfValue("banlist","chan",count,CM,&config_f);
+ ConfValue("banlist","chan",count,CM,&Config->config_f);
if (match(name,CM))
{
- ConfValue("banlist","limit",count,CM,&config_f);
+ ConfValue("banlist","limit",count,CM,&Config->config_f);
return atoi(CM);
}
}
{
strlcat(scratch,"t",MAXMODES);
}
- if (chan->key[0])
+ if (*chan->key)
{
strlcat(scratch,"k",MAXMODES);
}
{
strlcat(scratch,"p",MAXMODES);
}
- if (chan->key[0])
+ if (*chan->key)
{
strlcat(sparam," ",MAXBUF);
strlcat(sparam,chan->key,MAXBUF);