summaryrefslogtreecommitdiff
path: root/src/config.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-08-24 15:57:05 -0400
committerAdam <Adam@anope.org>2011-09-10 01:58:35 -0400
commitbb8e04c83588b6d0595eca463170643a3bd84285 (patch)
tree31f3949cdb3f1f7236f0e02e56027ee35932f0d7 /src/config.cpp
parentb504791bad450dfc9d28faa8b2009f8eaef0f485 (diff)
Added oper:host and oper:vhost
Diffstat (limited to 'src/config.cpp')
-rw-r--r--src/config.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/config.cpp b/src/config.cpp
index ca36397ce..28cf7aee6 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -656,6 +656,8 @@ static bool DoOper(ServerConfig *config, const Anope::string &, const Anope::str
Anope::string type = values[1].GetValue();
Anope::string password = values[2].GetValue();
Anope::string certfp = values[3].GetValue();
+ Anope::string host = values[4].GetValue();
+ Anope::string vhost = values[5].GetValue();
ValueItem vi(name);
if (!ValidateNotEmpty(config, "oper", "name", vi))
@@ -672,8 +674,12 @@ static bool DoOper(ServerConfig *config, const Anope::string &, const Anope::str
if (ot == NULL)
throw ConfigException("Oper block for " + name + " has invalid oper type " + type);
- Oper *o = new Oper(name, password, certfp, ot);
+ Oper *o = new Oper(name, ot);
o->config = true;
+ o->password = password;
+ o->certfp = certfp;
+ o->hosts = BuildStringVector(host);
+ o->vhost = vhost;
config->Opers.push_back(o);
return true;
@@ -1257,9 +1263,9 @@ ConfigItems::ConfigItems(ServerConfig *conf)
{DT_STRING, DT_STRING, DT_STRING, DT_STRING, DT_STRING},
InitOperTypes, DoOperType, DoneOperTypes},
{"oper",
- {"name", "type", "password", "certfp", ""},
- {"", "", "", "", ""},
- {DT_STRING, DT_STRING, DT_STRING, DT_STRING},
+ {"name", "type", "password", "certfp", "host", "vhost", ""},
+ {"", "", "", "", "", "", ""},
+ {DT_STRING, DT_STRING, DT_STRING, DT_STRING, DT_STRING, DT_STRING},
InitOpers, DoOper, DoneOpers},
{"service",
{"nick", "user", "host", "gecos", "modes", "channels", ""},