Make sure the nd_dict is always created.
This commit is contained in:
parent
9802490cbb
commit
43de0f45a1
|
@ -85,6 +85,8 @@ extern BlockHeap *pclient_heap;
|
||||||
|
|
||||||
extern char current_uid[IDLEN];
|
extern char current_uid[IDLEN];
|
||||||
|
|
||||||
|
struct Dictionary *nd_dict = NULL;
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
D_LINED,
|
D_LINED,
|
||||||
|
@ -127,6 +129,8 @@ init_client(void)
|
||||||
eventAddIsh("check_pings", check_pings, NULL, 30);
|
eventAddIsh("check_pings", check_pings, NULL, 30);
|
||||||
eventAddIsh("free_exited_clients", &free_exited_clients, NULL, 4);
|
eventAddIsh("free_exited_clients", &free_exited_clients, NULL, 4);
|
||||||
eventAddIsh("exit_aborted_clients", exit_aborted_clients, NULL, 1);
|
eventAddIsh("exit_aborted_clients", exit_aborted_clients, NULL, 1);
|
||||||
|
|
||||||
|
nd_dict = irc_dictionary_create(irccmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -745,16 +745,11 @@ get_nd_count(void)
|
||||||
return(dlink_list_length(&nd_list));
|
return(dlink_list_length(&nd_list));
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Dictionary *nd_dict = NULL;
|
|
||||||
|
|
||||||
void
|
void
|
||||||
add_nd_entry(const char *name)
|
add_nd_entry(const char *name)
|
||||||
{
|
{
|
||||||
struct nd_entry *nd;
|
struct nd_entry *nd;
|
||||||
|
|
||||||
if(nd_dict == NULL)
|
|
||||||
nd_dict = irc_dictionary_create(irccmp);
|
|
||||||
|
|
||||||
if(irc_dictionary_find(nd_dict, name) != NULL)
|
if(irc_dictionary_find(nd_dict, name) != NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue