hashinit(&chook_mevents, sz);
for (sz = i = 0; chook_tab[i].key != NULL; i++)
if (chook_tab[i].mush_key != NULL)
- hashadd(chook_tab[i].mush_key, (void *) chook_tab[i].key, &chook_mevents);
+ hashadd(strupper(chook_tab[i].mush_key), (void *) chook_tab[i].key, &chook_mevents);
}
struct core_hook_t *
struct core_hook_t *chook;
/* check to see if we need to create it */
- if ((chook = (struct core_hook_t *) hashfind(key, &chook_htab))) {
+ if ((chook = (struct core_hook_t *) hashfind(strupper(key), &chook_htab))) {
/* It already exists.. just return this one */
return chook;
}
chook->flags = flags;
chook->hooks = NULL; /* Initialized as having no children */
/* Add to the hashtab */
- hashadd(key, chook, &chook_htab);
+ hashadd(strupper(key), chook, &chook_htab);
return chook;
}
struct core_entry_t *new_child, *cur_child;
/* Ok first look for the htab entry */
- parent = hashfind(key, &chook_htab);
+ parent = hashfind(strupper(key), &chook_htab);
if (!parent) /* It doesn't exist, return NULL */
return NULL;
}
/* Look for event */
- if (!(key = (char *) hashfind(arg_left, &chook_mevents))) {
+ if (!(key = (char *) hashfind(strupper(arg_left), &chook_mevents))) {
notify(player, "No such event.");
return;
}