summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/commands.cpp44
-rw-r--r--src/modules.cpp14
-rw-r--r--src/users.cpp12
3 files changed, 35 insertions, 35 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index 29eb0d7fe..0d9e7fa60 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -1346,9 +1346,9 @@ void handle_stats(char **parameters, int pcnt, userrec *user)
if (*parameters[0] == 'U')
{
char ulined[MAXBUF];
- for (int i = 0; i < ConfValueEnum("uline",&Config->config_f); i++)
+ for (int i = 0; i < Config->ConfValueEnum("uline",&Config->config_f); i++)
{
- ConfValue("uline","server",i,ulined,&Config->config_f);
+ Config->ConfValue("uline","server",i,ulined,&Config->config_f);
WriteServ(user->fd,"248 %s U %s",user->nick,ulined);
}
}
@@ -1444,14 +1444,14 @@ void handle_stats(char **parameters, int pcnt, userrec *user)
/* stats o */
if (*parameters[0] == 'o')
{
- for (int i = 0; i < ConfValueEnum("oper",&Config->config_f); i++)
+ for (int i = 0; i < Config->ConfValueEnum("oper",&Config->config_f); i++)
{
char LoginName[MAXBUF];
char HostName[MAXBUF];
char OperType[MAXBUF];
- ConfValue("oper","name",i,LoginName,&Config->config_f);
- ConfValue("oper","host",i,HostName,&Config->config_f);
- ConfValue("oper","type",i,OperType,&Config->config_f);
+ Config->ConfValue("oper","name",i,LoginName,&Config->config_f);
+ Config->ConfValue("oper","host",i,HostName,&Config->config_f);
+ Config->ConfValue("oper","type",i,OperType,&Config->config_f);
WriteServ(user->fd,"243 %s O %s * %s %s 0",user->nick,HostName,LoginName,OperType);
}
}
@@ -1532,9 +1532,9 @@ bool is_uline(const char* server)
if (!(*server))
return true;
- for (int i = 0; i < ConfValueEnum("uline",&Config->config_f); i++)
+ for (int i = 0; i < Config->ConfValueEnum("uline",&Config->config_f); i++)
{
- ConfValue("uline","server",i,ServName,&Config->config_f);
+ Config->ConfValue("uline","server",i,ServName,&Config->config_f);
if (!strcasecmp(server,ServName))
{
return true;
@@ -1569,23 +1569,23 @@ void handle_oper(char **parameters, int pcnt, userrec *user)
snprintf(TheHost,MAXBUF,"%s@%s",user->ident,user->host);
- for (int i = 0; i < ConfValueEnum("oper",&Config->config_f); i++)
+ for (int i = 0; i < Config->ConfValueEnum("oper",&Config->config_f); i++)
{
- ConfValue("oper","name",i,LoginName,&Config->config_f);
- ConfValue("oper","password",i,Password,&Config->config_f);
- ConfValue("oper","type",i,OperType,&Config->config_f);
- ConfValue("oper","host",i,HostName,&Config->config_f);
+ Config->ConfValue("oper","name",i,LoginName,&Config->config_f);
+ Config->ConfValue("oper","password",i,Password,&Config->config_f);
+ Config->ConfValue("oper","type",i,OperType,&Config->config_f);
+ Config->ConfValue("oper","host",i,HostName,&Config->config_f);
if ((!strcmp(LoginName,parameters[0])) && (!operstrcmp(Password,parameters[1])) && (match(TheHost,HostName)))
{
fail2 = true;
- for (j =0; j < ConfValueEnum("type",&Config->config_f); j++)
+ for (j =0; j < Config->ConfValueEnum("type",&Config->config_f); j++)
{
- ConfValue("type","name",j,TypeName,&Config->config_f);
+ Config->ConfValue("type","name",j,TypeName,&Config->config_f);
if (!strcmp(TypeName,OperType))
{
/* found this oper's opertype */
- ConfValue("type","host",j,HostName,&Config->config_f);
+ Config->ConfValue("type","host",j,HostName,&Config->config_f);
if (*HostName)
ChangeDisplayedHost(user,HostName);
strlcpy(user->oper,TypeName,NICKMAX);
@@ -1816,8 +1816,8 @@ bool host_matches_everyone(std::string mask, userrec* user)
char insanemasks[MAXBUF];
char buffer[MAXBUF];
char itrigger[MAXBUF];
- ConfValue("insane","hostmasks",0,insanemasks,&Config->config_f);
- ConfValue("insane","trigger",0,itrigger,&Config->config_f);
+ Config->ConfValue("insane","hostmasks",0,insanemasks,&Config->config_f);
+ Config->ConfValue("insane","trigger",0,itrigger,&Config->config_f);
if (*itrigger == 0)
strlcpy(itrigger,"95.5",MAXBUF);
if ((*insanemasks == 'y') || (*insanemasks == 't') || (*insanemasks == '1'))
@@ -1844,8 +1844,8 @@ bool ip_matches_everyone(std::string ip, userrec* user)
{
char insanemasks[MAXBUF];
char itrigger[MAXBUF];
- ConfValue("insane","ipmasks",0,insanemasks,&Config->config_f);
- ConfValue("insane","trigger",0,itrigger,&Config->config_f);
+ Config->ConfValue("insane","ipmasks",0,insanemasks,&Config->config_f);
+ Config->ConfValue("insane","trigger",0,itrigger,&Config->config_f);
if (*itrigger == 0)
strlcpy(itrigger,"95.5",MAXBUF);
if ((*insanemasks == 'y') || (*insanemasks == 't') || (*insanemasks == '1'))
@@ -1869,8 +1869,8 @@ bool nick_matches_everyone(std::string nick, userrec* user)
{
char insanemasks[MAXBUF];
char itrigger[MAXBUF];
- ConfValue("insane","nickmasks",0,insanemasks,&Config->config_f);
- ConfValue("insane","trigger",0,itrigger,&Config->config_f);
+ Config->ConfValue("insane","nickmasks",0,insanemasks,&Config->config_f);
+ Config->ConfValue("insane","trigger",0,itrigger,&Config->config_f);
if (*itrigger == 0)
strlcpy(itrigger,"95.5",MAXBUF);
if ((*insanemasks == 'y') || (*insanemasks == 't') || (*insanemasks == '1'))
diff --git a/src/modules.cpp b/src/modules.cpp
index 4ff89df0c..74bf5a92c 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -736,7 +736,7 @@ ConfigReader::ConfigReader()
Config->ClearStack();
this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
- this->readerror = LoadConf(CONFIG_FILE,this->cache,this->errorlog);
+ this->readerror = Config->LoadConf(CONFIG_FILE,this->cache,this->errorlog);
if (!this->readerror)
this->error = CONF_FILE_NOT_FOUND;
}
@@ -756,7 +756,7 @@ ConfigReader::ConfigReader(std::string filename)
Config->ClearStack();
this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
- this->readerror = LoadConf(filename.c_str(),this->cache,this->errorlog);
+ this->readerror = Config->LoadConf(filename.c_str(),this->cache,this->errorlog);
if (!this->readerror)
this->error = CONF_FILE_NOT_FOUND;
};
@@ -768,7 +768,7 @@ std::string ConfigReader::ReadValue(std::string tag, std::string name, int index
char n[MAXBUF];
strlcpy(t,tag.c_str(),MAXBUF);
strlcpy(n,name.c_str(),MAXBUF);
- int res = ReadConf(cache,t,n,index,val);
+ int res = Config->ReadConf(cache,t,n,index,val);
if (!res)
{
this->error = CONF_VALUE_NOT_FOUND;
@@ -784,7 +784,7 @@ bool ConfigReader::ReadFlag(std::string tag, std::string name, int index)
char n[MAXBUF];
strlcpy(t,tag.c_str(),MAXBUF);
strlcpy(n,name.c_str(),MAXBUF);
- int res = ReadConf(cache,t,n,index,val);
+ int res = Config->ReadConf(cache,t,n,index,val);
if (!res)
{
this->error = CONF_VALUE_NOT_FOUND;
@@ -801,7 +801,7 @@ long ConfigReader::ReadInteger(std::string tag, std::string name, int index, boo
char n[MAXBUF];
strlcpy(t,tag.c_str(),MAXBUF);
strlcpy(n,name.c_str(),MAXBUF);
- int res = ReadConf(cache,t,n,index,val);
+ int res = Config->ReadConf(cache,t,n,index,val);
if (!res)
{
this->error = CONF_VALUE_NOT_FOUND;
@@ -865,12 +865,12 @@ void ConfigReader::DumpErrors(bool bail, userrec* user)
int ConfigReader::Enumerate(std::string tag)
{
- return EnumConf(cache,tag.c_str());
+ return Config->EnumConf(cache,tag.c_str());
}
int ConfigReader::EnumerateValues(std::string tag, int index)
{
- return EnumValues(cache, tag.c_str(), index);
+ return Config->EnumValues(cache, tag.c_str(), index);
}
bool ConfigReader::Verify()
diff --git a/src/users.cpp b/src/users.cpp
index 6d4195f45..35279cee6 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -160,21 +160,21 @@ bool userrec::HasPermission(char* command)
// are they even an oper at all?
if (strchr(this->modes,'o'))
{
- for (int j =0; j < ConfValueEnum("type",&Config->config_f); j++)
+ for (int j =0; j < Config->ConfValueEnum("type",&Config->config_f); j++)
{
- ConfValue("type","name",j,TypeName,&Config->config_f);
+ Config->ConfValue("type","name",j,TypeName,&Config->config_f);
if (!strcmp(TypeName,this->oper))
{
- ConfValue("type","classes",j,Classes,&Config->config_f);
+ Config->ConfValue("type","classes",j,Classes,&Config->config_f);
char* myclass = strtok_r(Classes," ",&savept);
while (myclass)
{
- for (int k =0; k < ConfValueEnum("class",&Config->config_f); k++)
+ for (int k =0; k < Config->ConfValueEnum("class",&Config->config_f); k++)
{
- ConfValue("class","name",k,ClassName,&Config->config_f);
+ Config->ConfValue("class","name",k,ClassName,&Config->config_f);
if (!strcmp(ClassName,myclass))
{
- ConfValue("class","commands",k,CommandList,&Config->config_f);
+ Config->ConfValue("class","commands",k,CommandList,&Config->config_f);
mycmd = strtok_r(CommandList," ",&savept2);
while (mycmd)
{