Skip to content

Commit

Permalink
Test tweak to clarify how channel joins work
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.inspircd.org/repository/branches/1_0_stable@3902 e03df62e-2008-0410-955e-edbf42e46eb7
  • Loading branch information
braindigitalis committed Apr 21, 2006
1 parent 7a6b2fa commit 1624555
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/channels.cpp
Expand Up @@ -440,6 +440,17 @@ chanrec* add_channel(userrec *user, const char* cn, const char* key, bool overri
}
}
}
else
{
for (unsigned int index =0; index < user->chans.size(); index++)
{
if (user->chans[index]->channel == Ptr)
{
user->chans[index]->channel = NULL;
user->chans[index]->uc_modes = 0;
}
}
}
return NULL;
}

Expand Down
2 changes: 1 addition & 1 deletion src/helperfuncs.cpp
Expand Up @@ -1225,7 +1225,7 @@ void purge_empty_chans(userrec* u)
// firstly decrement the count on each channel
for (std::vector<ucrec*>::iterator f = u->chans.begin(); f != u->chans.end(); f++)
{
if (((ucrec*)(*f))->channel)
if ((*f) && ((ucrec*)(*f))->channel)
{
if (((ucrec*)(*f))->channel->DelUser(u) == 0)
{
Expand Down

0 comments on commit 1624555

Please sign in to comment.