From 194838af39aa5fc823571afe9d61b2453573a32d Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 12 May 2005 19:09:42 +0000 Subject: Changed the type of struct whowas records are stored in (no need to waste a big heavy userrec) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1369 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/inspircd.cpp') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 635effbeb..1b7e55272 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -183,6 +183,7 @@ struct InAddr_HashComp typedef nspace::hash_map, StrHashComp> user_hash; typedef nspace::hash_map, StrHashComp> chan_hash; typedef nspace::hash_map, InAddr_HashComp> address_cache; +typedef nspace::hash_map, StrHashComp> whowas_hash; typedef std::deque command_table; // This table references users by file descriptor. @@ -198,7 +199,7 @@ FILE *log_file; user_hash clientlist; chan_hash chanlist; -user_hash whowas; +whowas_hash whowas; command_table cmdlist; file_cache MOTD; file_cache RULES; @@ -1796,7 +1797,6 @@ chanrec* add_channel(userrec *user, const char* cn, const char* key, bool overri user->chans[index].uc_modes = 0; } user->chans[index].channel = Ptr; - Ptr->IncUserCounter(); Ptr->AddUser((char*)user); WriteChannel(Ptr,user,"JOIN :%s",Ptr->name); @@ -2446,8 +2446,8 @@ userrec* ReHashNick(char* Old, char* New) /* adds or updates an entry in the whowas list */ void AddWhoWas(userrec* u) { - user_hash::iterator iter = whowas.find(u->nick); - userrec *a = new userrec(); + whowas_hash::iterator iter = whowas.find(u->nick); + WhoWasUser *a = new WhoWasUser(); strlcpy(a->nick,u->nick,NICKMAX); strlcpy(a->ident,u->ident,15); strlcpy(a->dhost,u->dhost,160); @@ -2465,7 +2465,7 @@ void AddWhoWas(userrec* u) { if (whowas.size() >= WHOWAS_MAX) { - for (user_hash::iterator i = whowas.begin(); i != whowas.end(); i++) + for (whowas_hash::iterator i = whowas.begin(); i != whowas.end(); i++) { // 3600 seconds in an hour ;) if ((i->second->signon)<(TIME-(WHOWAS_STALE*3600))) -- cgit v1.3.1-10-gc9f91