From c2b838bf7710f3954aa49df3374b0b35b85902f7 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Thu, 7 Aug 2014 13:49:19 +0400 Subject: [PATCH] add GUI menu item to Restart Lua Virtual Machine --- src/bnetd/connection.cpp | 1 + src/win32/resource.h | 1 + src/win32/resource.rc | 6 ++++-- src/win32/winmain.cpp | 3 +++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/bnetd/connection.cpp b/src/bnetd/connection.cpp index 65755e4c0..9ba478e05 100644 --- a/src/bnetd/connection.cpp +++ b/src/bnetd/connection.cpp @@ -2284,6 +2284,7 @@ namespace pvpgn { queue_clear(q); conn_set_state(c, conn_state_destroy); + eventlog(eventlog_level_error, __FUNCTION__, "outqueue reached limit of 1000 packets (hack attempt?)"); return 0; } diff --git a/src/win32/resource.h b/src/win32/resource.h index 339c799b7..d61e59a13 100644 --- a/src/win32/resource.h +++ b/src/win32/resource.h @@ -9,6 +9,7 @@ #define IDR_MENU 104 #define IDM_SAVE 105 #define IDM_RESTART 106 +#define IDM_RESTART_LUA 101 #define IDM_SHUTDOWN 107 #define IDM_EXIT 108 #define IDM_CLEAR 109 diff --git a/src/win32/resource.rc b/src/win32/resource.rc index 305ed6a19..38af253f8 100644 --- a/src/win32/resource.rc +++ b/src/win32/resource.rc @@ -34,6 +34,7 @@ BEGIN POPUP "&Server" BEGIN MENUITEM "&Save Accounts", IDM_SAVE + MENUITEM "&Restart Lua VM", IDM_RESTART_LUA MENUITEM "&Restart", IDM_RESTART MENUITEM "Sh&utdown", IDM_SHUTDOWN MENUITEM SEPARATOR @@ -146,7 +147,7 @@ FONT 8, "MS Sans Serif", 0, 0 BEGIN DEFPUSHBUTTON "&OK",IDOK,174,18,50,14 GROUPBOX PVPGN_VERSION ,IDC_STATIC,7,4,225,93 - CTEXT "coded by the PvPGN Team\r\n\r\n- - - - - - - - - - - - - - -\r\n\r\nvisit us @ www.pvpgn.org or \r\n irc.pvpgn.org #pvpgn\r\n\r\nŠ2002 &2003 PvPGN Is a Open Source Project \r\n As specified by the GPL", + CTEXT "coded by the PvPGN Team\r\n\r\n- - - - - - - - - - - - - - -\r\n\r\nvisit us @ www.pvpgn.pro or \r\n irc.pvpgn.org #pvpgn\r\n\r\nŠ2002-&2014 PvPGN Is an Open Source Project \r\n As specified by the GPL", IDC_STATIC,16,18,154,75 END @@ -227,7 +228,8 @@ STRINGTABLE BEGIN IDS_APP_TITLE "bnet" IDM_SAVE "Save Accounts" - IDM_RESTART "Restart" + IDM_RESTART_LUA "Restart Lua VM" + IDM_RESTART "Restart" IDM_SHUTDOWN "Shutdown" IDM_EXIT "Exit" IDM_CLEAR "Clear Window" diff --git a/src/win32/winmain.cpp b/src/win32/winmain.cpp index 3d5cdcdda..de24e3a39 100644 --- a/src/win32/winmain.cpp +++ b/src/win32/winmain.cpp @@ -290,6 +290,9 @@ namespace pvpgn case IDM_SAVE: server_save_wraper(); break; + case IDM_RESTART_LUA: + server_restart_wraper(restart_mode_lua); + break; case IDM_RESTART: server_restart_wraper(restart_mode_all); break;