static TIMEQ_CALLBACK(neonserv_check_unvisited_timer) {
char tmp[200];
char *modname = get_module_name(module_id);
- sprintf(tmp, "modules/%s/chan_expire_freq", modname);
+ sprintf(tmp, "modules.%s.chan_expire_freq", modname);
char *check_freq_str = get_string_field(tmp);
int check_freq;
if(!check_freq_str || (check_freq = strToTime(NULL, check_freq_str)) < (60*60)) {
timeq_add_name("neonserv_unvisited", 1800, module_id, neonserv_check_unvisited_timer, NULL);
return;
}
- sprintf(tmp, "modules/%s/chan_expire_delay", modname);
+ sprintf(tmp, "modules.%s.chan_expire_delay", modname);
char *check_expire_str = get_string_field(tmp);
int duration;
if(!check_expire_str || (duration = strToTime(NULL, check_expire_str)) < 60*60*24*7) return;
static void neonserv_cmd_unvisited_unreg(struct ClientSocket *client, char *channel) {
MYSQL_RES *res;
MYSQL_ROW row;
- int sync_neonspam_unreg = get_int_field("General/sync_neonspam_unreg");
+ int sync_neonspam_unreg = get_int_field("General.sync_neonspam_unreg");
int botid;
if(client)
botid = client->botid;
putsock(bot, "PART %s :Channel unregistered.", channel);
}
}
+ if(client->botid == NEONSERV_BOTID) {
+ char setting[128];
+ sprintf(setting, "modules.%s.auto_backup_unregister", get_module_name(module_id));
+ if(get_int_field(setting))
+ module_global_cmd_unregister_neonbackup(channel);
+ }
char *alertchan = get_string_field("General.alertchan");
if(alertchan) {
struct ChanNode *alertchan_chan = getChanByName(alertchan);