Allow adding a server multiple times if a different port or pass is used

This also moves the check for multiple servers
from CClient to CUser::AddServer().

The idea for this is from cnu, thanks.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1295 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2008-12-20 19:59:36 +00:00
parent d254240866
commit baab007f2b
2 changed files with 24 additions and 5 deletions

View File

@@ -321,15 +321,11 @@ void CClient::UserCommand(const CString& sLine) {
return;
}
if (m_pUser->FindServer(sServer)) {
PutStatus("That server already exists");
return;
}
if (m_pUser->AddServer(sLine.Token(1, true))) {
PutStatus("Server added");
} else {
PutStatus("Unable to add that server");
PutStatus("Perhaps the server is already added or openssl is disabled?");
}
} else if (sCommand.Equals("REMSERVER") || sCommand.Equals("DELSERVER")) {
CString sServer = sLine.Token(1);