1
0
mirror of https://github.com/anope/anope.git synced 2026-07-02 09:06:38 +02:00

Allow bot usermodes to be configurable

This commit is contained in:
Adam
2011-08-12 03:13:56 -04:00
parent 54710a782b
commit feee50e695
24 changed files with 150 additions and 31 deletions
+5 -4
View File
@@ -937,6 +937,7 @@ static bool DoServices(ServerConfig *config, const Anope::string &, const Anope:
Anope::string user = values[1].GetValue();
Anope::string host = values[2].GetValue();
Anope::string gecos = values[3].GetValue();
Anope::string modes = values[4].GetValue();
ValueItem vi(nick);
if (!ValidateNotEmpty(config, "service", "nick", vi))
@@ -958,7 +959,7 @@ static bool DoServices(ServerConfig *config, const Anope::string &, const Anope:
BotInfo *bi = findbot(nick);
if (bi != NULL)
return true;
bi = new BotInfo(nick, user, host, gecos);
bi = new BotInfo(nick, user, host, gecos, modes);
bi->SetFlag(BI_CONF);
return true;
}
@@ -1257,9 +1258,9 @@ ConfigItems::ConfigItems(ServerConfig *conf)
{DT_STRING, DT_STRING, DT_STRING, DT_STRING},
InitOpers, DoOper, DoneOpers},
{"service",
{"nick", "user", "host", "gecos", ""},
{"", "", "", "", ""},
{DT_STRING, DT_STRING, DT_STRING, DT_STRING},
{"nick", "user", "host", "gecos", "modes", ""},
{"", "", "", "", "", ""},
{DT_STRING, DT_STRING, DT_STRING, DT_STRING, DT_STRING},
InitServices, DoServices, DoneServices},
{"log",
{"target", "source", "logage", "inhabitlogchannel", "admin", "override", "commands", "servers", "channels", "users", "other", "rawio", "debug", ""},