#include "blacklist.h"
#include "privilege.h"
#include "sslproc.h"
+#include "bandbi.h"
struct config_server_hide ConfigServerHide;
FILE *conf_fbfile_in;
extern char yytext[];
-struct Client *remote_rehash_oper_p;
static int verify_access(struct Client *client_p, const char *username);
static int attach_iline(struct Client *, struct ConfItem *);
void
rehash_bans(int sig)
{
- FILE *file;
- char buf[MAXPATHLEN];
- int i;
-
- if(sig != 0)
- sendto_realops_snomask(SNO_GENERAL, L_ALL,
- "Got signal SIGUSR2, reloading ban confs");
-
- clear_out_address_conf_bans();
- clear_s_newconf_bans();
-
- for(i = 0; banconfs[i].filename; i++)
- {
- if(banconfs[i].perm)
- snprintf(buf, sizeof(buf), "%s.perm", *banconfs[i].filename);
- else
- snprintf(buf, sizeof(buf), "%s", *banconfs[i].filename);
-
- if((file = fopen(buf, "r")) == NULL)
- {
- if(banconfs[i].perm)
- continue;
-
- ilog(L_MAIN, "Failed reading ban file %s",
- *banconfs[i].filename);
- sendto_realops_snomask(SNO_GENERAL, L_ALL,
- "Can't open %s file bans could be missing!",
- *banconfs[i].filename);
- if (remote_rehash_oper_p)
- sendto_one_notice(remote_rehash_oper_p,
- ":*** Notice -- Can't open %s file bans could be missing!",
- *banconfs[i].filename);
- }
- else
- {
- (banconfs[i].func)(file);
- fclose(file);
- }
- }
-
- check_banned_lines();
+ bandb_rehash_bans();
}
/*
ConfigChannel.default_split_server_count = 10;
ConfigChannel.no_join_on_split = NO;
ConfigChannel.no_create_on_split = YES;
+ ConfigChannel.resv_forcepart = YES;
ConfigServerHide.flatten_links = 0;
ConfigServerHide.links_delay = 300;
ConfigFileEntry.throttle_duration = 60;
ServerInfo.default_max_clients = MAXCONNECTIONS;
+
+ if (!alias_dict)
+ alias_dict = irc_dictionary_create(strcasecmp);
}
#undef YES
{
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"Can't open file '%s' - aborting rehash!", filename);
- if (remote_rehash_oper_p)
- sendto_one_notice(remote_rehash_oper_p,
- ":*** Notice -- Can't open file '%s' - aborting rehash!", filename);
return;
}
}
}
/* remove any aliases... -- nenolod */
- irc_dictionary_destroy(alias_dict, free_alias_cb, NULL);
- alias_dict = NULL;
+ if (alias_dict != NULL)
+ {
+ irc_dictionary_destroy(alias_dict, free_alias_cb, NULL);
+ alias_dict = NULL;
+ }
destroy_blacklists();
strip_tabs(newlinebuf, linebuf, strlen(linebuf));
+ ierror("\"%s\", line %d: %s at '%s'", conffilebuf, lineno + 1, msg, newlinebuf);
sendto_realops_snomask(SNO_GENERAL, L_ALL, "\"%s\", line %d: %s at '%s'",
conffilebuf, lineno + 1, msg, newlinebuf);
- if (remote_rehash_oper_p)
- sendto_one_notice(remote_rehash_oper_p, ":*** Notice -- \"%s\", line %d: %s at '%s'",
- conffilebuf, lineno + 1, msg, newlinebuf);
- ilog(L_MAIN, "\"%s\", line %d: %s at '%s'", conffilebuf, lineno + 1, msg, newlinebuf);
}
int