mirror of
https://github.com/znc/znc.git
synced 2026-05-02 11:32:29 +02:00
Add '/msg *status restart'
Thanks to kroimon for the patch. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1174 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -236,6 +236,15 @@ void CClient::UserCommand(const CString& sLine) {
|
||||
usleep(100000); // Sleep for 10ms to attempt to allow the previous Broadcast() to go through to all users
|
||||
|
||||
throw CException(CException::EX_Shutdown);
|
||||
} else if (m_pUser->IsAdmin() && sCommand.CaseCmp("RESTART") == 0) {
|
||||
CString sMessage = sLine.Token(1, true);
|
||||
|
||||
if (sMessage.empty()) {
|
||||
sMessage = "ZNC is being restarted NOW!!";
|
||||
}
|
||||
|
||||
CZNC::Get().Broadcast(sMessage);
|
||||
throw CException(CException::EX_Restart);
|
||||
} else if (sCommand.CaseCmp("JUMP") == 0 ||
|
||||
sCommand.CaseCmp("CONNECT") == 0) {
|
||||
if (m_pUser) {
|
||||
@@ -1171,6 +1180,11 @@ void CClient::HelpUser() {
|
||||
Table.SetCell("Command", "Shutdown");
|
||||
Table.SetCell("Arguments", "[message]");
|
||||
Table.SetCell("Description", "Shutdown znc completely");
|
||||
|
||||
Table.AddRow();
|
||||
Table.SetCell("Command", "Restart");
|
||||
Table.SetCell("Arguments", "[message]");
|
||||
Table.SetCell("Description", "Restarts znc");
|
||||
}
|
||||
|
||||
if (Table.size()) {
|
||||
|
||||
Reference in New Issue
Block a user