Add DenySetVHost patch from Veit Wahlich aka cru

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@925 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2008-01-18 22:18:36 +00:00
parent 47c0cb9b82
commit 5370a54012
6 changed files with 46 additions and 12 deletions
+7 -5
View File
@@ -1304,7 +1304,7 @@ void CClient::UserCommand(const CString& sLine) {
PutStatus("Unable to unload [" + sMod + "] Modules are not enabled.");
#endif
return;
} else if (sCommand.CaseCmp("SETVHOST") == 0) {
} else if (sCommand.CaseCmp("SETVHOST") == 0 && (m_pUser->IsAdmin() || !m_pUser->DenySetVHost())) {
CString sVHost = sLine.Token(1);
if (sVHost.empty()) {
@@ -1540,10 +1540,12 @@ void CClient::HelpUser() {
Table.SetCell("Arguments", "<#chan> [linecount]");
Table.SetCell("Description", "Set the buffer count for a channel");
Table.AddRow();
Table.SetCell("Command", "SetVHost");
Table.SetCell("Arguments", "<vhost (ip preferred)>");
Table.SetCell("Description", "Set the VHost for this connection");
if (m_pUser->IsAdmin() || !m_pUser->DenySetVHost()) {
Table.AddRow();
Table.SetCell("Command", "SetVHost");
Table.SetCell("Arguments", "<vhost (ip preferred)>");
Table.SetCell("Description", "Set the VHost for this connection");
}
Table.AddRow();
Table.SetCell("Command", "Jump");