summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-08 14:40:53 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-08 14:40:53 +0000
commitce4c050657398c6eabddee651aa3f432ffe22574 (patch)
treea9ccb1e6bb815a3f5bd2b2b1f31db7af46b611c6 /src
parent93876363f89ea7a451ba1e18407e08a539854208 (diff)
AddWhoWas(userrec) -> userrec::AddToWhoWas()
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4790 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/users.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 8a48a641c..aab7815e8 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -698,7 +698,7 @@ void userrec::QuitUser(userrec *user,const std::string &quitreason)
{
if (IS_LOCAL(user))
WriteOpers("*** Client exiting: %s!%s@%s [%s]",user->nick,user->ident,user->host,reason.c_str());
- AddWhoWas(user);
+ user->AddToWhoWas();
}
if (iter != clientlist.end())
@@ -737,29 +737,29 @@ WhoWasGroup::~WhoWasGroup()
}
/* adds or updates an entry in the whowas list */
-void AddWhoWas(userrec* u)
+void userrec::AddToWhoWas()
{
- whowas_users::iterator iter = whowas.find(u->nick);
-
+ whowas_users::iterator iter = whowas.find(this->nick);
+
if (iter == whowas.end())
{
whowas_set* n = new whowas_set;
- WhoWasGroup *a = new WhoWasGroup(u);
+ WhoWasGroup *a = new WhoWasGroup(this);
n->push_back(a);
- whowas[u->nick] = n;
+ whowas[this->nick] = n;
}
else
{
whowas_set* group = (whowas_set*)iter->second;
-
+
if (group->size() > 10)
{
WhoWasGroup *a = (WhoWasGroup*)*(group->begin());
DELETE(a);
group->pop_front();
}
-
- WhoWasGroup *a = new WhoWasGroup(u);
+
+ WhoWasGroup *a = new WhoWasGroup(this);
group->push_back(a);
}
}