Fix sf.net bugs 1762981 and 1762977 and commit the patch from a comment in one

of them.

Now partyline doesn't segfault anymore if you remove a user which isn't there.

I think NULL pointers don't like me :/.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@818 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2007-08-06 09:04:40 +00:00
parent fd8570454e
commit 014b830796
+6 -1
View File
@@ -449,7 +449,12 @@ public:
CUser* pUser = CZNC::Get().FindUser(sUser);
CPartylineChannel* pChan = FindChannel(sChan);
if(!pChan || pChan->IsFixedChan(sUser)) {
if(pUser == NULL) {
PutModule("Unknown User '" + sUser + "'");
return;
}
if(!pChan || !pChan->IsFixedChan(sUser)) {
PutModule(sUser + " is not in " + sChan + " or isnt fixed to it");
return;
}