diff --git a/modules/m_rehash.c b/modules/m_rehash.c index d8730d7e..75eaacbc 100644 --- a/modules/m_rehash.c +++ b/modules/m_rehash.c @@ -44,6 +44,7 @@ #include "hash.h" #include "cache.h" #include "sslproc.h" + static int mo_rehash(struct Client *, struct Client *, int, const char **); static int me_rehash(struct Client *, struct Client *, int, const char **); @@ -109,9 +110,6 @@ rehash_motd(struct Client *source_p) if (!MyConnect(source_p)) remote_rehash_oper_p = source_p; - free_cachefile(user_motd); - user_motd = cache_file(MPATH, "ircd.motd", 0); - if(stat(MPATH, &sb) == 0) { local_tm = localtime(&sb.st_mtime); @@ -123,6 +121,8 @@ rehash_motd(struct Client *source_p) local_tm->tm_min); } } + free_cachefile(user_motd); + user_motd = cache_file(MPATH, "ircd.motd", 0); } static void