From 0b9040901842d3bbfd4cea674f6510d9b00c41b5 Mon Sep 17 00:00:00 2001 From: psychon Date: Fri, 1 Feb 2008 14:30:14 +0000 Subject: [PATCH] Add ClearVHost command (patch from SilverLeo, thanks) git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@940 726aef4b-f618-498e-8847-2d620e286838 --- Client.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Client.cpp b/Client.cpp index d02e2874..223e0eeb 100644 --- a/Client.cpp +++ b/Client.cpp @@ -1309,10 +1309,14 @@ void CClient::UserCommand(const CString& sLine) { if (sVHost.empty()) { PutStatus("Usage: SetVHost "); + return; } m_pUser->SetVHost(sVHost); PutStatus("Set VHost to [" + m_pUser->GetVHost() + "]"); + } else if (sCommand.CaseCmp("CLEARVHOST") == 0 && (m_pUser->IsAdmin() || !m_pUser->DenySetVHost())) { + m_pUser->SetVHost(""); + PutStatus("VHost Cleared"); } else if (sCommand.CaseCmp("PLAYBUFFER") == 0) { CString sChan = sLine.Token(1); @@ -1545,6 +1549,11 @@ void CClient::HelpUser() { Table.SetCell("Command", "SetVHost"); Table.SetCell("Arguments", ""); Table.SetCell("Description", "Set the VHost for this connection"); + + Table.AddRow(); + Table.SetCell("Command", "ClearVHost"); + Table.SetCell("Arguments", ""); + Table.SetCell("Description", "Clear the VHost for this connection"); } Table.AddRow();