changeset 16292:96db4d85ff89 draft

(svn r21000) -Feature[tte]: chat directly to the server or a bot/admin/irc channel monitoring the server (dihedral)
author rubidium <rubidium@openttd.org>
date Wed, 20 Oct 2010 07:30:15 +0000
parents 0b73411ad93a
children 2b69398498b1
files src/main_gui.cpp
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -230,6 +230,7 @@
 	GHK_CHAT,
 	GHK_CHAT_ALL,
 	GHK_CHAT_COMPANY,
+	GHK_CHAT_SERVER,
 };
 
 struct MainWindow : Window
@@ -380,6 +381,12 @@
 					ShowNetworkChatQueryWindow(DESTTYPE_TEAM, cio->client_playas);
 				}
 				break;
+
+			case GHK_CHAT_SERVER: // send text to the server
+				if (_networking && !_network_server) {
+					ShowNetworkChatQueryWindow(DESTTYPE_CLIENT, CLIENT_ID_SERVER);
+				}
+				break;
 #endif
 
 			default: return ES_NOT_HANDLED;
@@ -428,6 +435,7 @@
 const uint16 _ghk_chat_keys[] = {WKC_RETURN, 'T', 0};
 const uint16 _ghk_chat_all_keys[] = {WKC_SHIFT | WKC_RETURN, WKC_SHIFT | 'T', 0};
 const uint16 _ghk_chat_company_keys[] = {WKC_CTRL | WKC_RETURN, WKC_CTRL | 'T', 0};
+const uint16 _ghk_chat_server_keys[] = {WKC_CTRL | WKC_SHIFT | WKC_RETURN, WKC_CTRL | WKC_SHIFT | 'T', 0};
 
 Hotkey<MainWindow> MainWindow::global_hotkeys[] = {
 	Hotkey<MainWindow>(_ghk_quit_keys, "quit", GHK_QUIT),
@@ -467,6 +475,7 @@
 	Hotkey<MainWindow>(_ghk_chat_keys, "chat", GHK_CHAT),
 	Hotkey<MainWindow>(_ghk_chat_all_keys, "chat_all", GHK_CHAT_ALL),
 	Hotkey<MainWindow>(_ghk_chat_company_keys, "chat_company", GHK_CHAT_COMPANY),
+	Hotkey<MainWindow>(_ghk_chat_server_keys, "chat_server", GHK_CHAT_SERVER),
 #endif
 	HOTKEY_LIST_END(MainWindow)
 };