From 80acaa7c1655b992b86944f830f83f4b97f1abcb Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Thu, 19 Jul 2012 01:08:16 +0700 Subject: [PATCH] Add ShowBindHost command. --- src/ClientCommand.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ClientCommand.cpp b/src/ClientCommand.cpp index 16fb8631..f888722c 100644 --- a/src/ClientCommand.cpp +++ b/src/ClientCommand.cpp @@ -1083,6 +1083,11 @@ void CClient::UserCommand(CString& sLine) { } else if (sCommand.Equals("CLEARUSERBINDHOST") && (m_pUser->IsAdmin() || !m_pUser->DenySetBindHost())) { m_pUser->SetBindHost(""); PutStatus("Bind host cleared"); + } else if (sCommand.Equals("SHOWBINDHOST")) { + PutStatus("This user's default bind host " + (m_pUser->GetBindHost().empty() ? "not set" : "is [" + m_pUser->GetBindHost() + "]")); + if (m_pNetwork) { + PutStatus("This network's bind host " + (m_pNetwork->GetBindHost().empty() ? "not set" : "is [" + m_pNetwork->GetBindHost() + "]")); + } } else if (sCommand.Equals("PLAYBUFFER")) { if (!m_pNetwork) { PutStatus("You must be connected with a network to use this command"); @@ -1477,6 +1482,10 @@ void CClient::HelpUser() { Table.SetCell("Description", "Clear the default bind host for this user"); } + Table.AddRow(); + Table.SetCell("Command", "ShowBindHost"); + Table.SetCell("Description", "Show currently selected bind host"); + Table.AddRow(); Table.SetCell("Command", "Jump [server]"); Table.SetCell("Description", "Jump to the next or the specified server");