diff --git a/Changes b/Changes index 4470f4236..c222ad237 100644 --- a/Changes +++ b/Changes @@ -2807,3 +2807,6 @@ seen. gmtime warning still there - Added can_dccdeny operflag so you can give your local/global opers access to this too. Co-admin, admin, sadmin and netadmin get it by default. Suggested in #0001247. - Updated operflag docs. +- '/rehash -all' had bugs and is now considered depricated, just use '/rehash' instead. + On '/rehash' we reload everything already so the '-all' option was useless anyway. + Reported by fez (#0001516). diff --git a/doc/unreal32docs.html b/doc/unreal32docs.html index ef3183fa2..dae34da3c 100644 --- a/doc/unreal32docs.html +++ b/doc/unreal32docs.html @@ -2690,10 +2690,9 @@ to get more information on a command.

Rehashes the servers config file. Including a server name allows you to rehash a remote servers config file. Several flags are also available. They Include
- -all - Rehashes all config files - -motd - Rehashes all MOTD files and RULES files (including tld {})
- -opermotd - Rehashes the OPERMOTD
- -botmotd - Rehashes the BOTMOTD
+ -motd - Only rehash all MOTD and RULES files (including tld {})
+ -opermotd - Only rehash the OPERMOTD file
+ -botmotd - Only rehash the BOTMOTD file
-garbage - Force garbage collection
IRCop diff --git a/src/s_serv.c b/src/s_serv.c index 7a26107a0..3ad89a14e 100644 --- a/src/s_serv.c +++ b/src/s_serv.c @@ -2887,12 +2887,13 @@ static void reread_motdsandrules() ** ugly code but it seems to work :) -- codemastr ** added -all and fixed up a few lines -- niquil (niquil@programmer.net) ** fixed remote rehashing, but it's getting a bit weird code again -- Syzop +** removed '-all' code, this is now considered as '/rehash', this is ok +** since we rehash everything with simple '/rehash' now. Syzop/20040205 */ CMD_FUNC(m_rehash) { int x; - if (MyClient(sptr) && !OPCanRehash(sptr)) { sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]); @@ -2947,7 +2948,7 @@ CMD_FUNC(m_rehash) parv[1] = parv[2]; } - if (!BadPtr(parv[1])) + if (!BadPtr(parv[1]) && strcmp(parv[1], "-all")) { if (!IsAdmin(sptr) && !IsCoAdmin(sptr)) @@ -2958,18 +2959,6 @@ CMD_FUNC(m_rehash) if (*parv[1] == '-') { - if (!_match("-all", parv[1])) - { - sendto_ops("%sRehashing everything on the request of %s", - cptr != sptr ? "Remotely " : "",sptr->name); - if (cptr != sptr) - sendto_serv_butone(&me, ":%s GLOBOPS :%s is remotely rehashing everything", me.name, sptr->name); - opermotd = (aMotd *) read_file(OPATH, &opermotd); - botmotd = (aMotd *) read_file(BPATH, &botmotd); - rehash_motdrules(); - RunHook3(HOOKTYPE_REHASHFLAG, cptr, sptr, parv[1]); - return 0; - } if (!strnicmp("-gar", parv[1], 4)) { loop.do_garbage_collect = 1;