1.1 --- a/core/smn_menus.cpp Tue Oct 02 01:52:15 2007 +0000
1.2 +++ b/core/smn_menus.cpp Tue Oct 02 14:06:07 2007 +0000
1.3 @@ -42,6 +42,7 @@
1.4 #if defined MENU_DEBUG
1.5 #include "Logger.h"
1.6 #endif
1.7 +#include "ChatTriggers.h"
1.8
1.9 #if defined CreateMenu
1.10 #undef CreateMenu
1.11 @@ -261,11 +262,13 @@
1.12 {
1.13 if (m_pFunc)
1.14 {
1.15 + unsigned int old_reply = g_ChatTriggers.SetReplyTo(SM_REPLY_CHAT);
1.16 m_pFunc->PushCell(BAD_HANDLE);
1.17 m_pFunc->PushCell(MenuAction_Select);
1.18 m_pFunc->PushCell(client);
1.19 m_pFunc->PushCell(item);
1.20 m_pFunc->Execute(NULL);
1.21 + g_ChatTriggers.SetReplyTo(old_reply);
1.22 }
1.23 g_MenuHelpers.FreePanelHandler(this);
1.24 }
1.25 @@ -320,14 +323,18 @@
1.26
1.27 s_CurSelectPosition = &first_item;
1.28
1.29 + unsigned int old_reply = g_ChatTriggers.SetReplyTo(SM_REPLY_CHAT);
1.30 DoAction(menu, MenuAction_Select, client, item);
1.31 + g_ChatTriggers.SetReplyTo(old_reply);
1.32
1.33 s_CurSelectPosition = old_pos;
1.34 }
1.35
1.36 void CMenuHandler::OnMenuCancel(IBaseMenu *menu, int client, MenuCancelReason reason)
1.37 {
1.38 + unsigned int old_reply = g_ChatTriggers.SetReplyTo(SM_REPLY_CHAT);
1.39 DoAction(menu, MenuAction_Cancel, client, (cell_t)reason);
1.40 + g_ChatTriggers.SetReplyTo(old_reply);
1.41 }
1.42
1.43 void CMenuHandler::OnMenuEnd(IBaseMenu *menu, MenuEndReason reason)