diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-14 20:35:21 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-14 20:35:21 +0000 |
commit | 458a3297e436bcc9546f4e1377910c88c4478c3e (patch) | |
tree | 33f32e12a1b56138d5c2af9819a2b30342b69f1b /src/users.cpp | |
parent | 51b1560725e8b95562a0d09b87755add4ba59aef (diff) |
Fix silly bug of the day.
User was only getting a userrec::chans entry added if they had any privelages on the channel. If they werent opped, voiced, or halfopped on join, no entry in the hash. Silly brain now added a:
user->chans[Ptr] = 0;
:p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5990 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/users.cpp b/src/users.cpp index 2f1916391..033cd227f 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -786,8 +786,12 @@ void userrec::QuitUser(InspIRCd* Instance, userrec *user, const std::string &qui if (user->registered == REG_ALL) { user->PurgeEmptyChannels(); - FOREACH_MOD_I(Instance,I_OnUserQuit,OnUserQuit(user,reason)); user->WriteCommonExcept("QUIT :%s",reason.c_str()); + FOREACH_MOD_I(Instance,I_OnUserQuit,OnUserQuit(user,reason)); + } + else + { + Instance->Log(DEBUG,"FULL'O'FAIL! user->registered is %d, REG_ALL is %d", user->registered, REG_ALL); } FOREACH_MOD_I(Instance,I_OnUserDisconnect,OnUserDisconnect(user)); @@ -1331,7 +1335,6 @@ int userrec::GetPort() } break; default: - ServerInstance->Log(DEBUG,"Ut oh, '%s' has an unknown protocol family!",this->nick); break; } return 0; @@ -1381,7 +1384,6 @@ const char* userrec::GetIPString() } break; default: - ServerInstance->Log(DEBUG,"Ut oh, '%s' has an unknown protocol family!",this->nick); break; } return ""; @@ -1424,7 +1426,6 @@ const char* userrec::GetIPString(char* buf) break; default: - ServerInstance->Log(DEBUG,"Ut oh, '%s' has an unknown protocol family!",this->nick); break; } return ""; @@ -1961,11 +1962,13 @@ ConnectClass& userrec::GetClass() void userrec::PurgeEmptyChannels() { + ServerInstance->Log(DEBUG,"In PurgeEmptyChannels"); std::vector<chanrec*> to_delete; // firstly decrement the count on each channel for (UCListIter f = this->chans.begin(); f != this->chans.end(); f++) { + ServerInstance->Log(DEBUG,"Iterate channel %s", f->first->name); f->first->RemoveAllPrefixes(this); if (f->first->DelUser(this) == 0) { @@ -2053,6 +2056,9 @@ void userrec::HandleEvent(EventType et, int errornum) /* If the user has raised an error whilst being processed, quit them now we're safe to */ if (!WriteError.empty()) + { + ServerInstance->Log(DEBUG,"Write error is set, quitting user with error '%s'", GetWriteError()); userrec::QuitUser(ServerInstance, this, GetWriteError()); + } } |