summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-09 11:24:30 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-09 11:24:30 +0000
commitc2a5839bcbd6bebf0dd102a8dfd283e92c8a0507 (patch)
treed3fc6e91877a0c91e8cdd11cf163c071d701edf6 /src/users.cpp
parent2e83826fd35c2b82caec575bc4e34e9437965354 (diff)
Probably wont compile yet - purge_empty_channels refactor
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3579 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 94ed97d93..9bc006bbc 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -113,10 +113,20 @@ userrec::userrec()
sendq = "";
chans.clear();
invites.clear();
+ clientlist[tempnick]->chans.resize(MAXCHANS);
+ for (unsigned int n = 0; n < MAXCHANS; n++)
+ {
+ clientlist[tempnick]->chans[n] = new ucrec();
+ }
}
userrec::~userrec()
{
+ for (std::vector<ucrec*>::iterator n = clientlist[tempnick]->chans.begin(); n != clientlist[tempnick]->chans.end(); n++)
+ {
+ ucrec* x = (ucrec*)*n;
+ delete x;
+ }
}
void userrec::MakeHost(char* nhost)
@@ -616,11 +626,6 @@ void AddClient(int socket, int port, bool iscached, in_addr ip4)
clientlist[tempnick]->sendqmax = class_sqmax;
clientlist[tempnick]->recvqmax = class_rqmax;
- ucrec a;
- a.channel = NULL;
- a.uc_modes = 0;
- clientlist[tempnick]->chans.resize(MAXCHANS);
-
fd_ref_table[socket] = clientlist[tempnick];
local_users.push_back(clientlist[tempnick]);