From e8c920ce01a47e7b05ca3d445c3d8d88f9c70e37 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 19 Jul 2006 11:13:15 +0000 Subject: Change size of already_sent from char to int to work with uniq_id value git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4438 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/helperfuncs.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index ea7f558db..9598c31a0 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -51,7 +51,7 @@ extern InspIRCd* ServerInstance; extern time_t TIME; extern char lowermap[255]; extern userrec* fd_ref_table[MAX_DESCRIPTORS]; -static char already_sent[MAX_DESCRIPTORS]; +static int already_sent[MAX_DESCRIPTORS]; extern std::vector all_opers; extern user_hash clientlist; extern chan_hash chanlist; @@ -1235,13 +1235,14 @@ void purge_empty_chans(userrec* u) // firstly decrement the count on each channel for (std::vector::iterator f = u->chans.begin(); f != u->chans.end(); f++) { - if (((ucrec*)(*f))->channel) + ucrec* uc = (ucrec*)(*f); + if (uc->channel) { - if (((ucrec*)(*f))->channel->DelUser(u) == 0) + if (uc->channel->DelUser(u) == 0) { /* No users left in here, mark it for deletion */ - to_delete.push_back(((ucrec*)(*f))->channel); - ((ucrec*)(*f))->channel = NULL; + to_delete.push_back(uc->channel); + uc->channel = NULL; } } } -- cgit v1.2.3