Make /rehash help work again.
This commit is contained in:
parent
351078d072
commit
e8149a2c64
3 changed files with 9 additions and 6 deletions
|
@ -100,10 +100,6 @@ extern void del_from_resv_hash(const char *name, struct ConfItem *aconf);
|
|||
extern struct ConfItem *hash_find_resv(const char *name);
|
||||
extern void clear_resv_hash(void);
|
||||
|
||||
extern void add_to_help_hash(const char *name, struct cachefile *hptr);
|
||||
extern void clear_help_hash(void);
|
||||
extern struct cachefile *hash_find_help(const char *name, int flags);
|
||||
|
||||
extern void hash_stats(struct Client *);
|
||||
|
||||
#endif /* INCLUDED_hash_h */
|
||||
|
|
|
@ -259,7 +259,6 @@ rehash_help(struct Client *source_p)
|
|||
sendto_realops_snomask(SNO_GENERAL, L_ALL,
|
||||
"%s is forcing re-reading of HELP files",
|
||||
get_oper_name(source_p));
|
||||
clear_help_hash();
|
||||
load_help();
|
||||
}
|
||||
|
||||
|
|
10
src/cache.c
10
src/cache.c
|
@ -161,7 +161,8 @@ free_cachefile(struct cachefile *cacheptr)
|
|||
*
|
||||
* inputs -
|
||||
* outputs -
|
||||
* side effects - contents of help directories are loaded.
|
||||
* side effects - old help cache deleted
|
||||
* - contents of help directories are loaded.
|
||||
*/
|
||||
void
|
||||
load_help(void)
|
||||
|
@ -170,11 +171,18 @@ load_help(void)
|
|||
struct dirent *ldirent= NULL;
|
||||
char filename[MAXPATHLEN];
|
||||
struct cachefile *cacheptr;
|
||||
struct DictionaryIter iter;
|
||||
|
||||
#if defined(S_ISLNK) && defined(HAVE_LSTAT)
|
||||
struct stat sb;
|
||||
#endif
|
||||
|
||||
DICTIONARY_FOREACH(cacheptr, &iter, help_dict)
|
||||
{
|
||||
irc_dictionary_delete(help_dict, cacheptr->name);
|
||||
free_cachefile(cacheptr);
|
||||
}
|
||||
|
||||
/* opers must be done first */
|
||||
helpfile_dir = opendir(HPATH);
|
||||
|
||||
|
|
Loading…
Reference in a new issue