From 041b5e54797f03a22bd96153b8d232630c71592a Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Mon, 25 Apr 2011 11:55:07 +0300 Subject: [PATCH] Added /#time command to server for changing the time of day --- src/server.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/server.cpp b/src/server.cpp index 20a14fca3..9c02389e2 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -2833,7 +2833,7 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id) line += L"status "; if(is_operator) { - line += L"shutdown setting "; + line += L"shutdown setting time "; } else { @@ -2867,6 +2867,15 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id) send_to_sender = true; valid_command = true; } + else if(message_s.substr(0,5) == "time ") + { + u32 time = stoi(message_s.substr(5)); + m_time_of_day.set(time); + m_time_of_day_send_timer = 0; + line += L"-!- time_of_day changed."; + send_to_sender = true; + valid_command = true; + } } if(valid_command == false) -- 2.25.1