X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=src%2Fmodules%2FNeonServ.mod%2Fcmd_neonserv_unvisited.c;h=62f86c0bd2cfaaf4e93f8671865658240f715db4;hp=455583c26a359d8a22f1d4c21686097597733dcc;hb=ee3a72eb4a412a0a504d070db1b41c6907f7604d;hpb=939c6051a3ee85e3b3877fde35bdbf36ecb94fbc diff --git a/src/modules/NeonServ.mod/cmd_neonserv_unvisited.c b/src/modules/NeonServ.mod/cmd_neonserv_unvisited.c index 455583c..62f86c0 100644 --- a/src/modules/NeonServ.mod/cmd_neonserv_unvisited.c +++ b/src/modules/NeonServ.mod/cmd_neonserv_unvisited.c @@ -49,14 +49,14 @@ void neonserv_cmd_unvisited_init() { 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; @@ -156,7 +156,7 @@ static void neonserv_cmd_unvisited_async2(struct neonserv_cmd_unvisited_cache *c 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; @@ -195,6 +195,12 @@ static void neonserv_cmd_unvisited_unreg(struct ClientSocket *client, char *chan 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);