* each service now has a 'modes' parameter in srvx.conf to specify their individual modes.. if left blank, will default to whatever 'services' modes work for your ircd.
git-archimport-id: srvx@srvx.net--2004-srvx/srvx--devo--1.3--patch-69
# arch-tag: automatic-ChangeLog--srvx@srvx.net--2004-srvx/srvx--devo--1.3
#
+2004-06-16 12:23:32 GMT adam <adam@gamesurge.net> patch-69
+
+ Summary:
+ added modes parameter to srvx.conf to control user modes
+ Revision:
+ srvx--devo--1.3--patch-69
+
+ * each service now has a 'modes' parameter in srvx.conf to specify their individual modes.. if left blank, will default to whatever 'services' modes work for your ircd.
+
+
+ modified files:
+ ChangeLog src/chanserv.c src/global.c src/mod-helpserv.c
+ src/modcmd.c src/nickserv.c src/opserv.c src/proto-bahamut.c
+ src/proto-p10.c src/proto.h srvx.conf.example
+
+
2004-06-08 09:24:49 GMT adam <adam@gamesurge.net> patch-68
Summary:
dict_set_free_data(note_types, chanserv_deref_note_type);
if(nick)
{
- chanserv = AddService(nick, "Channel Services", NULL);
+ const char *modes = conf_get_data("services/chanserv/modes", RECDB_QSTRING);
+ chanserv = AddService(nick, modes ? modes : NULL, "Channel Services", NULL);
service_register(chanserv)->trigger = '!';
reg_chanmsg_func('\001', chanserv, chanserv_ctcp_check);
}
if(nick)
{
- global = AddService(nick, "Global Services", NULL);
+ const char *modes = conf_get_data("services/global/modes", RECDB_QSTRING);
+ global = AddService(nick, modes ? modes : NULL, "Global Services", NULL);
global_service = service_register(global);
}
saxdb_register("Global", global_saxdb_read, global_saxdb_write);
* it's a harmless default */
hs = calloc(1, sizeof(struct helpserv_bot));
- if (!(hs->helpserv = AddService(nick, helpserv_conf.description, NULL))) {
+ if (!(hs->helpserv = AddService(nick, "+iok", helpserv_conf.description, NULL))) {
free(hs);
return NULL;
}
reply("MCMSG_ALREADY_SERVICE", bot->nick);
return 0;
}
- bot = AddService(nick, desc, hostname);
+ bot = AddService(nick, NULL, desc, hostname);
service_register(bot);
reply("MCMSG_NEW_SERVICE", bot->nick);
return 1;
hostname = database_get_data(rd->d.object, "hostname", RECDB_QSTRING);
if (desc) {
if (!svc)
- svc = service_register(AddService(nick, desc, hostname));
+ svc = service_register(AddService(nick, NULL, desc, hostname));
else if (hostname)
strcpy(svc->bot->hostname, hostname);
desc = database_get_data(rd->d.object, "trigger", RECDB_QSTRING);
userList_init(&curr_helpers);
if (nick) {
- nickserv = AddService(nick, "Nick Services", NULL);
+ const char *modes = conf_get_data("services/nickserv/modes", RECDB_QSTRING);
+ nickserv = AddService(nick, modes ? modes : NULL, "Nick Services", NULL);
nickserv_service = service_register(nickserv);
}
saxdb_register("NickServ", nickserv_saxdb_read, nickserv_saxdb_write);
init_opserv(const char *nick)
{
OS_LOG = log_register_type("OpServ", "file:opserv.log");
- if (nick)
- opserv = AddService(nick, "Oper Services", NULL);
+ if (nick) {
+ const char *modes = conf_get_data("services/opserv/modes", RECDB_QSTRING);
+ opserv = AddService(nick, modes ? modes : NULL, "Oper Services", NULL);
+ }
conf_register_reload(opserv_conf_read);
memset(level_strings, 0, sizeof(level_strings));
}
struct userNode *
-AddService(const char *nick, const char *desc, const char *hostname) {
+AddService(const char *nick, const char *modes, const char *desc, const char *hostname) {
time_t timestamp = now;
struct userNode *old_user = GetUserH(nick);
struct in_addr ipaddr = { INADDR_LOOPBACK };
}
if (!hostname)
hostname = self->name;
- return AddUser(self, nick, nick, hostname, "+oikr", desc, timestamp, ipaddr, 0);
+ return AddUser(self, nick, nick, hostname, modes ? modes : "+oikr", desc, timestamp, ipaddr, 0);
}
struct userNode *
}
struct userNode *
-AddService(const char *nick, const char *desc, const char *hostname)
+AddService(const char *nick, const char *modes, const char *desc, const char *hostname)
{
char numeric[COMBO_NUMERIC_LEN+1];
int local_num = get_local_numeric();
if (!hostname)
hostname = self->name;
make_numeric(self, local_num, numeric);
- return AddUser(self, nick, nick, hostname, "+oik", numeric, desc, now, "AAAAAA");
+ return AddUser(self, nick, nick, hostname, modes ? modes : "+oik", numeric, desc, now, "AAAAAA");
}
struct userNode *
/* stuff originally from other headers that is really protocol-specific */
int IsChannelName(const char *name);
int is_valid_nick(const char *nick);
-struct userNode *AddService(const char *nick, const char *desc, const char *hostname);
+struct userNode *AddService(const char *nick, const char *modes, const char *desc, const char *hostname);
struct userNode *AddClone(const char *nick, const char *ident, const char *hostname, const char *desc);
struct server* AddServer(struct server* uplink, const char *name, int hops, time_t boot, time_t link, const char *numeric, const char *description);
void DelServer(struct server* serv, int announce, const char *message);
"services" {
"nickserv" {
"nick" "NickServ";
+ // What user modes do you want this service to have? Please keep in
+ // mind which ircd software you are using here, and that all of the
+ // services need to be at least +o.
+ // "modes" "+iok";
// If you want to by have *@* as the default hostmask, set
// default_hostmask. This is discouraged for security reasons.
// "default_hostmask" "1";
"opserv" {
"nick" "OpServ";
+ // What user modes do you want this service to have? Please keep in
+ // mind which ircd software you are using here, and that all of the
+ // services need to be at least +o.
+ // "modes" "+iok";
// should use of this service be limited to global opers?
"privileged" "1";
// fullname for service
// (This is changed relative srvx-1.0.x, which would use default
// unless you specified ".disabled".)
"nick" "ChanServ";
+ // What user modes do you want this service to have? Please keep in
+ // mind which ircd software you are using here, and that all of the
+ // services need to be at least +o.
+ // "modes" "+iok";
// Does your ircd have off-channel services support?
// Bahamut does; ircu2.10.11 does not.
"off_channel" "no";
"global" {
"nick" "Global";
+ // What user modes do you want this service to have? Please keep in
+ // mind which ircd software you are using here, and that all of the
+ // services need to be at least +o.
+ // "modes" "+iok";
// should users get community announcements by default or not?
"announcements_default" "on";
};