Use GetIRCSock() instead of m_pIRCSock directly

This patch makes the code in CClient use a wrapper function for accessing the
IRC socket. Wait and see for why I do this. ;)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1724 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-01-28 19:40:38 +00:00
parent f24b1bb890
commit b50d944bb9
3 changed files with 16 additions and 14 deletions

View File

@@ -231,8 +231,8 @@ void CClient::UserCommand(CString& sLine) {
return;
}
if (m_pIRCSock) {
m_pIRCSock->Quit();
if (GetIRCSock()) {
GetIRCSock()->Quit();
PutStatus("Jumping to the next server in the list...");
} else {
PutStatus("Connecting...");
@@ -245,8 +245,8 @@ void CClient::UserCommand(CString& sLine) {
// m_pIRCSock is only set after the low level connection
// to the IRC server was established. Before this we can
// only find the IRC socket by its name.
if (m_pIRCSock) {
m_pIRCSock->Quit();
if (GetIRCSock()) {
GetIRCSock()->Quit();
} else {
Csock* pIRCSock;
CString sSockName = "IRC::" + m_pUser->GetUserName();