NickAlias *makealias(const char *nick, NickCore * nc) { NickAlias *na; /* Just need to make the alias */ na = scalloc(1, sizeof(NickAlias)); na->nick = sstrdup(nick); na->nc = nc; slist_add(&nc->aliases, na); alpha_insert_alias(na); return na; }
NickAlias *makenick(const char *nick) { NickAlias *na; NickCore *nc; /* First make the core */ nc = scalloc(1, sizeof(NickCore)); nc->display = sstrdup(nick); slist_init(&nc->aliases); insert_core(nc); alog("%s: group %s has been created", s_NickServ, nc->display); /* Then make the alias */ na = scalloc(1, sizeof(NickAlias)); na->nick = sstrdup(nick); na->nc = nc; slist_add(&nc->aliases, na); alpha_insert_alias(na); return na; }