From 5d8561e4257f13756010daca1bb098bdef9cb97c Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Fri, 23 Oct 2009 18:09:22 +0200 Subject: Store a pointer to the correct user (user->real_user) for users with mapped nicks to avoid looking up the nick on every call to user_get(). --- user.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'user.h') diff --git a/user.h b/user.h index 27953ce..d2cb180 100644 --- a/user.h +++ b/user.h @@ -8,11 +8,11 @@ struct user_t { char *nick; unsigned long lines[24*4]; unsigned long long words, characters, kicks, kicked; - struct user_t *next; + struct user_t *real_user, *next; }; void user_init(); -struct user_t *user_get(char *_nick); +struct user_t *user_get(char *nick); void user_free(); extern struct user_t *users; -- cgit v1.2.3