diff --git a/doc/conf/help/help.conf b/doc/conf/help/help.conf index dd6b9c217..f121c86e4 100644 --- a/doc/conf/help/help.conf +++ b/doc/conf/help/help.conf @@ -998,8 +998,6 @@ help Rehash { " The flags are used to rehash other config files, valid flags are:"; " -dns - Reinitializes and reloads the resolver"; " -garbage - Force garbage collection"; - " -motd - Only re-read all MOTD, BOTMOTD, OPERMOTD and RULES files"; - " (including those in tld{} blocks)"; " -tls - Reloads SSL/TLS certificates"; } diff --git a/doc/conf/help/help.de.conf b/doc/conf/help/help.de.conf index ec7ce1468..bd78d5248 100644 --- a/doc/conf/help/help.de.conf +++ b/doc/conf/help/help.de.conf @@ -912,9 +912,7 @@ help Rehash { " -"; " Die Flags werden benutzt, um andere Configdateien zu rehashen."; " Gültige Flags sind:"; - " -motd - Rehasht alle MOTD Dateien und RULES Dateien (incl. tld{})"; - " -opermotd - Rehasht die OPERMOTD"; - " -botmotd - Rehasht die BOTMOTD"; + " -dns - Rehasht der DNS resolver"; " -garbage - bewirkt garbage collection"; " Anmerkung des Übersetzers: Garbage collection (GC) (englisch,"; " wörtlich deutsch: Mülleinsammeln, auch Freispeichersammlung) ist"; diff --git a/doc/conf/help/help.es.conf b/doc/conf/help/help.es.conf index 9256b83b1..0508afc94 100644 --- a/doc/conf/help/help.es.conf +++ b/doc/conf/help/help.es.conf @@ -984,8 +984,6 @@ help Rehash { " -"; " -dns - Reinicializa y recarga el resolver"; " -garbage - Fuerza la eliminacion de basura"; - " -motd - Solo re-lee todos los archivos MOTD, BOTMOTD, OPERMOTD y RULES"; - " (incluidos los bloques de tld{} )"; " -tls - Recarga los certificados SSL/TLS"; }; diff --git a/doc/conf/help/help.fr.conf b/doc/conf/help/help.fr.conf index 1903c48d1..e73569747 100644 --- a/doc/conf/help/help.fr.conf +++ b/doc/conf/help/help.fr.conf @@ -940,8 +940,6 @@ help Rehash { " Les flags valides sont :"; " -dns - Réinitialise et recharge le résolveur"; " -garbage - Force le nettoyage de la mémoire"; - " -motd - Ne recharge que les fichiers MOTD, BOTMOTD, OPERMOTD et RULES"; - " (dont ceux définis dans les tld{} blocks)"; " -tls - Recharge les certificats SSL/TLS"; } diff --git a/doc/conf/help/help.it.conf b/doc/conf/help/help.it.conf index f66b53600..378eaf8ac 100644 --- a/doc/conf/help/help.it.conf +++ b/doc/conf/help/help.it.conf @@ -845,7 +845,6 @@ help Rehash { " Le flag disponibili sono:"; " -dns - Inizializza e ricarica il risolutore DNS"; " -garbage - Forza la pulizia dei file inutili"; - " -motd - Ricarica i file MOTD, BOTMOTD, OPERMOTD e RULES, inclusi quelli nei blocchi tld"; " -tls - Ricarica i certificati SSL/TLS"; } diff --git a/doc/conf/help/help.nl.conf b/doc/conf/help/help.nl.conf index e5ad2b5a8..07c7c9ea9 100644 --- a/doc/conf/help/help.nl.conf +++ b/doc/conf/help/help.nl.conf @@ -998,8 +998,6 @@ help Rehash { " De vlaggen worden gebruikt om andere configuratiebestanden te herhashen, geldige vlaggen zijn:"; " -dns - Reinitialiseert en herlaadt de resolver"; " -garbage - Forceer afvalverzameling"; - " -motd - Alleen alle MOTD-, BOTMOTD, OPERMOTD en RULES-bestanden opnieuw lezen"; - " (inclusief die in tld-blokken)"; " -tls - Reloads SSL/TLS-certificaten"; } diff --git a/doc/conf/help/help.pl.conf b/doc/conf/help/help.pl.conf index 4f9ee49ac..24f4b8415 100644 --- a/doc/conf/help/help.pl.conf +++ b/doc/conf/help/help.pl.conf @@ -1028,8 +1028,6 @@ help Rehash { " flagi to:"; " -dns - Ponownie inicjalizuje i przeładowuje narzędzie rozpoznawania nazw DNS?"; " -garbage - Wymusza zadziałanie mechanizmu oczyszczania (garbage collection)"; - " -motd - Odświeża tylko wszystkie pliki MOTD, BOTMOTD, OPERMOTD i RULES"; - " (włącznie z tymi podanymi w blokach tld {})"; " -tls - Ponownie ładuje certyfikaty SSL/TLS"; } diff --git a/doc/conf/help/help.ru.conf b/doc/conf/help/help.ru.conf index 801be753c..952a84a78 100644 --- a/doc/conf/help/help.ru.conf +++ b/doc/conf/help/help.ru.conf @@ -1013,9 +1013,7 @@ help Rehash { " Список флагов:"; " -dns - Переинециализация и перезагрузка преобразования адресов"; " -garbage - Активирует \"сборщик мусора\""; - " -motd - Перечитает все файлы MOTD, BOTMOTD, OPERMOTD и RULES (включая tld{})"; " -tls - Перезагрузка сертификатов SSL/TLS"; - } help Restart { diff --git a/doc/conf/help/help.tr.conf b/doc/conf/help/help.tr.conf index 1f2767091..7b6c6a9d4 100644 --- a/doc/conf/help/help.tr.conf +++ b/doc/conf/help/help.tr.conf @@ -871,8 +871,6 @@ help Rehash { " Flaglar, diğer config dosyalarını tekrar kullanmak için kullanılır, aşağıdakiler geçerli flaglardır:"; " -dns - Yeniden başlatır ve yeniden yükler, çözümler"; " -garbage - Değersiz dataların toplanmasını sağlar"; - " -motd - Tüm MOTD, BOTMOTD, OPERMOTD ve RULES dosyalarını tekrar okumasını sağlar"; - " (tld{}'de onlar dahil bloklar)"; " -tls - SSL/TLS Sertifikaları yeniden okur"; } diff --git a/src/conf.c b/src/conf.c index c550224a3..16db01884 100644 --- a/src/conf.c +++ b/src/conf.c @@ -10795,8 +10795,7 @@ int rehash_internal(Client *client, int sig) loop.ircd_rehashing = 1; /* double checking.. */ if (init_conf(configfile, 1) == 0) run_configuration(); - if (sig == 1) - reread_motdsandrules(); + reread_motdsandrules(); unload_all_unused_snomasks(); unload_all_unused_umodes(); unload_all_unused_extcmodes(); diff --git a/src/serv.c b/src/serv.c index b72313523..d7fe78608 100644 --- a/src/serv.c +++ b/src/serv.c @@ -572,10 +572,7 @@ CMD_FUNC(cmd_rehash) } unreal_log(ULOG_INFO, "config", "CONFIG_RELOAD", client, "Rehashing server configuration file [by: $client.nuh]"); remote_rehash_client = client; - reread_motdsandrules(); - // TODO: clean this next line up, wtf man. - rehash(client, (parc > 1) ? ((*parv[1] == 'q') ? 2 : 0) : 0); - return; + /* fallthrough... so we deal with this the same way as local rehashes */ } parv[1] = parv[2]; } else { @@ -591,16 +588,6 @@ CMD_FUNC(cmd_rehash) parv[1] = parv[2]; parv[2] = NULL; parc--; - /* Only netadmins may use /REHASH -global, which is because: - * a) it makes sense - * b) remote servers don't support remote rehashes by non-netadmins - */ - if (!ValidatePermissionsForPath("server:rehash",client,NULL,NULL,NULL)) - { - sendnumeric(client, ERR_NOPRIVILEGES); - sendnotice(client, "'/REHASH -global' requires you to have server::rehash permissions"); - return; - } if (parv[1] && *parv[1] != '-') { sendnotice(client, "You cannot specify a server name after /REHASH -global, for obvious reasons"); @@ -622,13 +609,6 @@ CMD_FUNC(cmd_rehash) if (!BadPtr(parv[1]) && strcasecmp(parv[1], "-all")) { - - if (!ValidatePermissionsForPath("server:rehash",client,NULL,NULL,NULL)) - { - sendnumeric(client, ERR_NOPRIVILEGES); - return; - } - if (*parv[1] == '-') { if (!strncasecmp("-gar", parv[1], 4)) @@ -664,9 +644,7 @@ CMD_FUNC(cmd_rehash) /* Normal rehash, rehash motds&rules too, just like the on in the tld block will :p */ sendnumeric(client, RPL_REHASHING, configfile); - // TODO: fix next line - occurence #2 - x = rehash(client, (parc > 1) ? ((*parv[1] == 'q') ? 2 : 0) : 0); - reread_motdsandrules(); + x = rehash(client, 0); } /** RESTART command - restart the server (discouraged command)