* Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center
* Copyright (C) 1996-2002 Hybrid Development Team
* Copyright (C) 2002-2012 ircd-ratbox development team
- * Copyright (C) 2016 William Pitcock <nenolod@dereferenced.org>
+ * Copyright (C) 2016 Ariadne Conill <ariadne@dereferenced.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#include "send.h"
#include "logger.h"
#include "scache.h"
-#include "irc_radixtree.h"
+#include "rb_radixtree.h"
struct whowas_top
{
rb_dlink_list wwlist;
};
-static struct irc_radixtree *whowas_tree = NULL;
+static rb_radixtree *whowas_tree = NULL;
static rb_dlink_list whowas_list = {NULL, NULL, 0};
static unsigned int whowas_list_length = NICKNAMEHISTORYLENGTH;
static void whowas_trim(void *unused);
{
if(rb_dlink_list_length(&wtop->wwlist) == 0)
{
- irc_radixtree_delete(whowas_tree, wtop->name);
+ rb_radixtree_delete(whowas_tree, wtop->name);
rb_free(wtop->name);
rb_free(wtop);
}
{
struct whowas_top *wtop;
- wtop = irc_radixtree_retrieve(whowas_tree, name);
+ wtop = rb_radixtree_retrieve(whowas_tree, name);
if (wtop != NULL)
return wtop;
wtop = rb_malloc(sizeof(struct whowas_top));
wtop->name = rb_strdup(name);
- irc_radixtree_add(whowas_tree, wtop->name, wtop);
+ rb_radixtree_add(whowas_tree, wtop->name, wtop);
return wtop;
}
whowas_get_list(const char *name)
{
struct whowas_top *wtop;
- wtop = irc_radixtree_retrieve(whowas_tree, name);
+ wtop = rb_radixtree_retrieve(whowas_tree, name);
if(wtop == NULL)
return NULL;
return &wtop->wwlist;
rb_strlcpy(who->hostname, client_p->host, sizeof(who->hostname));
rb_strlcpy(who->realname, client_p->info, sizeof(who->realname));
rb_strlcpy(who->sockhost, client_p->sockhost, sizeof(who->sockhost));
+ rb_strlcpy(who->suser, client_p->user->suser, sizeof(who->suser));
who->flags = (IsIPSpoof(client_p) ? WHOWAS_IP_SPOOFING : 0) |
(IsDynSpoof(client_p) ? WHOWAS_DYNSPOOF : 0);
struct whowas_top *wtop;
rb_dlink_node *ptr;
- wtop = irc_radixtree_retrieve(whowas_tree, nick);
+ wtop = rb_radixtree_retrieve(whowas_tree, nick);
if(wtop == NULL)
return NULL;
void
whowas_init(void)
{
- whowas_tree = irc_radixtree_create("whowas", irc_radixtree_irccasecanon);
+ whowas_tree = rb_radixtree_create("whowas", irccasecanon);
if(whowas_list_length == 0)
{
whowas_list_length = NICKNAMEHISTORYLENGTH;
{
*count = rb_dlink_list_length(&whowas_list);
*memused += *count * sizeof(struct Whowas);
- *memused += sizeof(struct whowas_top) * irc_radixtree_size(whowas_tree);
+ *memused += sizeof(struct whowas_top) * rb_radixtree_size(whowas_tree);
}