Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Core/GameEngine/Include/GameNetwork/LANAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ class LANAPIInterface : public SubsystemInterface
RET_UNKNOWN, // Default message for oddity
};
UnicodeString getErrorStringFromReturnType( ReturnType ret );
// TheSuperHackers @feature arcticdolphin 08/03/2026 Adds processChatMessage to handle /me slash command in LAN chat, consistent with WOL
void processChatMessage( const UnicodeString &message );

// On functions are (generally) the result of network traffic
virtual void OnGameList( LANGameInfo *gameList ) = 0; ///< List of games
Expand Down
23 changes: 23 additions & 0 deletions Core/GameEngine/Source/GameNetwork/LANAPICallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,29 @@ UnicodeString LANAPIInterface::getErrorStringFromReturnType( ReturnType ret )
}
}

// TheSuperHackers @feature arcticdolphin 08/03/2026 Adds processChatMessage to handle /me slash command in LAN chat, consistent with WOL
void LANAPIInterface::processChatMessage( const UnicodeString &message )
{
AsciiString ascii;
ascii.translate(message);

if (!ascii.isEmpty() && ascii.getCharAt(0) == '/')
{
AsciiString remainder = ascii.str() + 1;
AsciiString token;
remainder.nextToken(&token);
token.toLower();

if (token == "me" && message.getLength() > 4)
{
RequestChat(UnicodeString(message.str() + 4), LANCHAT_EMOTE);
return;
}
}

RequestChat(message, LANCHAT_NORMAL);
}

// On functions are (generally) the result of network traffic

void LANAPI::OnAccept( UnsignedInt playerIP, Bool status )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,17 @@ static NameKeyType textEntryChatID = NAMEKEY_INVALID;
static NameKeyType textEntryMapDisplayID = NAMEKEY_INVALID;
static NameKeyType buttonBackID = NAMEKEY_INVALID;
static NameKeyType buttonStartID = NAMEKEY_INVALID;
static NameKeyType buttonEmoteID = NAMEKEY_INVALID;
// TheSuperHackers @tweak arcticdolphin 08/03/2026 Renamed from buttonEmote to buttonChat to reflect chat button purpose
static NameKeyType buttonChatID = NAMEKEY_INVALID;
static NameKeyType buttonSelectMapID = NAMEKEY_INVALID;
static NameKeyType windowMapID = NAMEKEY_INVALID;
// Window Pointers ------------------------------------------------------------------------
static GameWindow *parentLanGameOptions = nullptr;
static GameWindow *buttonBack = nullptr;
static GameWindow *buttonStart = nullptr;
static GameWindow *buttonSelectMap = nullptr;
static GameWindow *buttonEmote = nullptr;
// TheSuperHackers @tweak arcticdolphin 08/03/2026 Renamed from buttonEmote to buttonChat to reflect chat button purpose
static GameWindow *buttonChat = nullptr;
static GameWindow *textEntryChat = nullptr;
static GameWindow *textEntryMapDisplay = nullptr;
static GameWindow *windowMap = nullptr;
Expand Down Expand Up @@ -614,15 +616,17 @@ void InitLanGameGadgets()
textEntryChatID = TheNameKeyGenerator->nameToKey( "LanGameOptionsMenu.wnd:TextEntryChat" );
textEntryMapDisplayID = TheNameKeyGenerator->nameToKey( "LanGameOptionsMenu.wnd:TextEntryMapDisplay" );
listboxChatWindowLanGameID = TheNameKeyGenerator->nameToKey( "LanGameOptionsMenu.wnd:ListboxChatWindowLanGame" );
buttonEmoteID = TheNameKeyGenerator->nameToKey( "LanGameOptionsMenu.wnd:ButtonEmote" );
// TheSuperHackers @tweak arcticdolphin 08/03/2026 Renamed from buttonEmote to buttonChat to reflect chat button purpose
buttonChatID = TheNameKeyGenerator->nameToKey( "LanGameOptionsMenu.wnd:ButtonEmote" ); // TODO Rename ButtonEmote to ButtonChat in .wnd file
buttonSelectMapID = TheNameKeyGenerator->nameToKey( "LanGameOptionsMenu.wnd:ButtonSelectMap" );
windowMapID = TheNameKeyGenerator->nameToKey( "LanGameOptionsMenu.wnd:MapWindow" );

// Initialize the pointers to our gadgets
parentLanGameOptions = TheWindowManager->winGetWindowFromId( nullptr, parentLanGameOptionsID );
DEBUG_ASSERTCRASH(parentLanGameOptions, ("Could not find the parentLanGameOptions"));
buttonEmote = TheWindowManager->winGetWindowFromId( parentLanGameOptions,buttonEmoteID );
DEBUG_ASSERTCRASH(buttonEmote, ("Could not find the buttonEmote"));
// TheSuperHackers @tweak arcticdolphin 08/03/2026 Renamed from buttonEmote to buttonChat to reflect chat button purpose
buttonChat = TheWindowManager->winGetWindowFromId( parentLanGameOptions,buttonChatID );
DEBUG_ASSERTCRASH(buttonChat, ("Could not find the buttonChat"));
buttonSelectMap = TheWindowManager->winGetWindowFromId( parentLanGameOptions,buttonSelectMapID );
DEBUG_ASSERTCRASH(buttonSelectMap, ("Could not find the buttonSelectMap"));
buttonStart = TheWindowManager->winGetWindowFromId( parentLanGameOptions,buttonStartID );
Expand Down Expand Up @@ -717,7 +721,8 @@ void InitLanGameGadgets()
void DeinitLanGameGadgets()
{
parentLanGameOptions = nullptr;
buttonEmote = nullptr;
// TheSuperHackers @tweak arcticdolphin 08/03/2026 Renamed from buttonEmote to buttonChat to reflect chat button purpose
buttonChat = nullptr;
buttonSelectMap = nullptr;
buttonStart = nullptr;
buttonBack = nullptr;
Expand Down Expand Up @@ -1132,7 +1137,8 @@ WindowMsgHandledType LanGameOptionsMenuSystem( GameWindow *window, UnsignedInt m
//TheShell->pop();

}
else if ( controlID == buttonEmoteID )
// TheSuperHackers @tweak arcticdolphin 08/03/2026 Renamed from buttonEmote to buttonChat to reflect chat button purpose
else if ( controlID == buttonChatID )
{
// read the user's input
txtInput.set(GadgetTextEntryGetText( textEntryChat ));
Expand All @@ -1142,7 +1148,10 @@ WindowMsgHandledType LanGameOptionsMenuSystem( GameWindow *window, UnsignedInt m
txtInput.trim();
// Echo the user's input to the chat window
if (!txtInput.isEmpty())
TheLAN->RequestChat(txtInput, LANAPIInterface::LANCHAT_EMOTE);
{
// TheSuperHackers @feature arcticdolphin 08/03/2026 Uses processChatMessage to handle /me slash command in LAN chat
TheLAN->processChatMessage(txtInput);
}
}
else if ( controlID == buttonSelectMapID )
{
Expand Down Expand Up @@ -1274,7 +1283,10 @@ WindowMsgHandledType LanGameOptionsMenuSystem( GameWindow *window, UnsignedInt m
txtInput.trim();
// Echo the user's input to the chat window
if (!txtInput.isEmpty())
TheLAN->RequestChat(txtInput, LANAPIInterface::LANCHAT_NORMAL);
{
// TheSuperHackers @feature arcticdolphin 08/03/2026 Uses processChatMessage to handle /me slash command in LAN chat
TheLAN->processChatMessage(txtInput);
}

}
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,8 @@ static NameKeyType buttonClearID = NAMEKEY_INVALID;
static NameKeyType buttonHostID = NAMEKEY_INVALID;
static NameKeyType buttonJoinID = NAMEKEY_INVALID;
static NameKeyType buttonDirectConnectID = NAMEKEY_INVALID;
static NameKeyType buttonEmoteID = NAMEKEY_INVALID;
// TheSuperHackers @tweak arcticdolphin 08/03/2026 Renamed from buttonEmote to buttonChat to reflect chat button purpose
static NameKeyType buttonChatID = NAMEKEY_INVALID;
static NameKeyType staticToolTipID = NAMEKEY_INVALID;
static NameKeyType textEntryPlayerNameID = NAMEKEY_INVALID;
static NameKeyType textEntryChatID = NAMEKEY_INVALID;
Expand All @@ -310,7 +311,8 @@ static GameWindow *buttonClear = nullptr;
static GameWindow *buttonHost = nullptr;
static GameWindow *buttonJoin = nullptr;
static GameWindow *buttonDirectConnect = nullptr;
static GameWindow *buttonEmote = nullptr;
// TheSuperHackers @tweak arcticdolphin 08/03/2026 Renamed from buttonEmote to buttonChat to reflect chat button purpose
static GameWindow *buttonChat = nullptr;
static GameWindow *staticToolTip = nullptr;
static GameWindow *textEntryPlayerName = nullptr;
static GameWindow *textEntryChat = nullptr;
Expand Down Expand Up @@ -373,7 +375,8 @@ void LanLobbyMenuInit( WindowLayout *layout, void *userData )
buttonHostID = TheNameKeyGenerator->nameToKey( "LanLobbyMenu.wnd:ButtonHost" );
buttonJoinID = TheNameKeyGenerator->nameToKey( "LanLobbyMenu.wnd:ButtonJoin" );
buttonDirectConnectID = TheNameKeyGenerator->nameToKey( "LanLobbyMenu.wnd:ButtonDirectConnect" );
buttonEmoteID = TheNameKeyGenerator->nameToKey( "LanLobbyMenu.wnd:ButtonEmote" );
// TheSuperHackers @tweak arcticdolphin 08/03/2026 Renamed from buttonEmote to buttonChat to reflect chat button purpose
buttonChatID = TheNameKeyGenerator->nameToKey( "LanLobbyMenu.wnd:ButtonEmote" ); // TODO Rename ButtonEmote to ButtonChat in .wnd file
staticToolTipID = TheNameKeyGenerator->nameToKey( "LanLobbyMenu.wnd:StaticToolTip" );
textEntryPlayerNameID = TheNameKeyGenerator->nameToKey( "LanLobbyMenu.wnd:TextEntryPlayerName" );
textEntryChatID = TheNameKeyGenerator->nameToKey( "LanLobbyMenu.wnd:TextEntryChat" );
Expand All @@ -390,7 +393,8 @@ void LanLobbyMenuInit( WindowLayout *layout, void *userData )
buttonHost = TheWindowManager->winGetWindowFromId( nullptr, buttonHostID );
buttonJoin = TheWindowManager->winGetWindowFromId( nullptr, buttonJoinID );
buttonDirectConnect = TheWindowManager->winGetWindowFromId( nullptr, buttonDirectConnectID );
buttonEmote = TheWindowManager->winGetWindowFromId( nullptr,buttonEmoteID );
// TheSuperHackers @tweak arcticdolphin 08/03/2026 Renamed from buttonEmote to buttonChat to reflect chat button purpose
buttonChat = TheWindowManager->winGetWindowFromId( nullptr,buttonChatID );
staticToolTip = TheWindowManager->winGetWindowFromId( nullptr, staticToolTipID );
textEntryPlayerName = TheWindowManager->winGetWindowFromId( nullptr, textEntryPlayerNameID );
textEntryChat = TheWindowManager->winGetWindowFromId( nullptr, textEntryChatID );
Expand Down Expand Up @@ -805,7 +809,8 @@ WindowMsgHandledType LanLobbyMenuSystem( GameWindow *window, UnsignedInt msg,
}

}
else if ( controlID == buttonEmoteID )
// TheSuperHackers @tweak arcticdolphin 08/03/2026 Renamed from buttonEmote to buttonChat to reflect chat button purpose
else if ( controlID == buttonChatID )
{
// read the user's input
txtInput.set(GadgetTextEntryGetText( textEntryChat ));
Expand All @@ -815,8 +820,8 @@ WindowMsgHandledType LanLobbyMenuSystem( GameWindow *window, UnsignedInt msg,
txtInput.trim();
// Echo the user's input to the chat window
if (!txtInput.isEmpty()) {
// TheLAN->RequestChat(txtInput, LANAPIInterface::LANCHAT_EMOTE);
TheLAN->RequestChat(txtInput, LANAPIInterface::LANCHAT_NORMAL);
// TheSuperHackers @feature arcticdolphin 08/03/2026 Uses processChatMessage to handle /me slash command in LAN chat
TheLAN->processChatMessage(txtInput);
}
}
else if (controlID == buttonDirectConnectID)
Expand Down Expand Up @@ -897,7 +902,10 @@ WindowMsgHandledType LanLobbyMenuSystem( GameWindow *window, UnsignedInt msg,

// Echo the user's input to the chat window
if (!txtInput.isEmpty())
TheLAN->RequestChat(txtInput, LANAPIInterface::LANCHAT_NORMAL);
{
// TheSuperHackers @feature arcticdolphin 08/03/2026 Uses processChatMessage to handle /me slash command in LAN chat
TheLAN->processChatMessage(txtInput);
}

}
/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ static NameKeyType parentID = NAMEKEY_INVALID;
static NameKeyType buttonOkID = NAMEKEY_INVALID;
///static NameKeyType buttonRehostID = NAMEKEY_INVALID;
static NameKeyType textEntryChatID = NAMEKEY_INVALID;
static NameKeyType buttonEmoteID = NAMEKEY_INVALID;
// TheSuperHackers @tweak arcticdolphin 08/03/2026 Renamed from buttonEmote to buttonChat to reflect chat button purpose
static NameKeyType buttonChatID = NAMEKEY_INVALID;
static NameKeyType chatBoxBorderID = NAMEKEY_INVALID;
static NameKeyType buttonContinueID = NAMEKEY_INVALID;
static NameKeyType buttonBuddiesID = NAMEKEY_INVALID;
Expand All @@ -116,7 +117,8 @@ static GameWindow *buttonOk = nullptr;
//static GameWindow *buttonRehost = nullptr;
static GameWindow *buttonContinue = nullptr;
static GameWindow *textEntryChat = nullptr;
static GameWindow *buttonEmote = nullptr;
// TheSuperHackers @tweak arcticdolphin 08/03/2026 Renamed from buttonEmote to buttonChat to reflect chat button purpose
static GameWindow *buttonChat = nullptr;
static GameWindow *chatBoxBorder = nullptr;
static GameWindow *buttonBuddies = nullptr;
static GameWindow *staticTextGameSaved = nullptr;
Expand Down Expand Up @@ -228,7 +230,8 @@ void ScoreScreenInit( WindowLayout *layout, void *userData )
parentID = TheNameKeyGenerator->nameToKey( "ScoreScreen.wnd:ParentScoreScreen" );
buttonOkID = TheNameKeyGenerator->nameToKey( "ScoreScreen.wnd:ButtonOk" );
textEntryChatID = TheNameKeyGenerator->nameToKey( "ScoreScreen.wnd:TextEntryChat" );
buttonEmoteID = TheNameKeyGenerator->nameToKey( "ScoreScreen.wnd:ButtonEmote" );
// TheSuperHackers @tweak arcticdolphin 08/03/2026 Renamed from buttonEmote to buttonChat to reflect chat button purpose
buttonChatID = TheNameKeyGenerator->nameToKey( "ScoreScreen.wnd:ButtonEmote" ); // TODO Rename ButtonEmote to ButtonChat in .wnd file
listboxChatWindowScoreScreenID = TheNameKeyGenerator->nameToKey( "ScoreScreen.wnd:ListboxChatWindowScoreScreen" );
// buttonRehostID = TheNameKeyGenerator->nameToKey( "ScoreScreen.wnd:ButtonRehost" );
chatBoxBorderID = TheNameKeyGenerator->nameToKey( "ScoreScreen.wnd:ChatBoxBorder" );
Expand All @@ -239,7 +242,8 @@ void ScoreScreenInit( WindowLayout *layout, void *userData )
parent = TheWindowManager->winGetWindowFromId( nullptr, parentID );
buttonOk = TheWindowManager->winGetWindowFromId( parent, buttonOkID );
textEntryChat = TheWindowManager->winGetWindowFromId( parent, textEntryChatID );
buttonEmote = TheWindowManager->winGetWindowFromId( parent,buttonEmoteID );
// TheSuperHackers @tweak arcticdolphin 08/03/2026 Renamed from buttonEmote to buttonChat to reflect chat button purpose
buttonChat = TheWindowManager->winGetWindowFromId( parent,buttonChatID );
listboxChatWindowScoreScreen = TheWindowManager->winGetWindowFromId( parent, listboxChatWindowScoreScreenID );
// buttonRehost = TheWindowManager->winGetWindowFromId( parent, buttonRehostID );
chatBoxBorder = TheWindowManager->winGetWindowFromId( parent, chatBoxBorderID );
Expand Down Expand Up @@ -498,7 +502,8 @@ WindowMsgHandledType ScoreScreenSystem( GameWindow *window, UnsignedInt msg,
saveReplayLayout->bringForward();
}

else if ( controlID == buttonEmoteID )
// TheSuperHackers @tweak arcticdolphin 08/03/2026 Renamed from buttonEmote to buttonChat to reflect chat button purpose
else if ( controlID == buttonChatID )
{
// read the user's input
txtInput.set(GadgetTextEntryGetText( textEntryChat ));
Expand All @@ -509,7 +514,10 @@ WindowMsgHandledType ScoreScreenSystem( GameWindow *window, UnsignedInt msg,
// Echo the user's input to the chat window
if (!txtInput.isEmpty())
if(TheLAN)
TheLAN->RequestChat(txtInput, LANAPIInterface::LANCHAT_EMOTE);
{
// TheSuperHackers @feature arcticdolphin 08/03/2026 Uses processChatMessage to handle /me slash command in LAN chat
TheLAN->processChatMessage(txtInput);
}
//add the gamespy chat request here
}
for(Int i = 0; i < MAX_SLOTS; ++i)
Expand Down Expand Up @@ -566,7 +574,10 @@ WindowMsgHandledType ScoreScreenSystem( GameWindow *window, UnsignedInt msg,
// Echo the user's input to the chat window
if (!txtInput.isEmpty())
if(TheLAN)
TheLAN->RequestChat(txtInput, LANAPIInterface::LANCHAT_NORMAL);
{
// TheSuperHackers @feature arcticdolphin 08/03/2026 Uses processChatMessage to handle /me slash command in LAN chat
TheLAN->processChatMessage(txtInput);
}
//add the gamespy chat request here

}
Expand All @@ -590,8 +601,9 @@ void initSkirmish()
grabMultiPlayerInfo();
if (textEntryChat)
textEntryChat->winHide(TRUE);
if (buttonEmote)
buttonEmote->winHide(TRUE);
// TheSuperHackers @tweak arcticdolphin 08/03/2026 Renamed from buttonEmote to buttonChat to reflect chat button purpose
if (buttonChat)
buttonChat->winHide(TRUE);
if (chatBoxBorder)
chatBoxBorder->winHide(TRUE);
if (buttonBuddies)
Expand Down Expand Up @@ -729,8 +741,9 @@ void finishSinglePlayerInit()
buttonContinue->winHide(TRUE);
if (textEntryChat)
textEntryChat->winHide(TRUE);
if (buttonEmote)
buttonEmote->winHide(TRUE);
// TheSuperHackers @tweak arcticdolphin 08/03/2026 Renamed from buttonEmote to buttonChat to reflect chat button purpose
if (buttonChat)
buttonChat->winHide(TRUE);
if (listboxChatWindowScoreScreen)
listboxChatWindowScoreScreen->winHide(TRUE);
if (chatBoxBorder)
Expand Down Expand Up @@ -792,8 +805,9 @@ void finishSinglePlayerInit()
buttonContinue->winHide(FALSE);
if (textEntryChat)
textEntryChat->winHide(TRUE);
if (buttonEmote)
buttonEmote->winHide(TRUE);
// TheSuperHackers @tweak arcticdolphin 08/03/2026 Renamed from buttonEmote to buttonChat to reflect chat button purpose
if (buttonChat)
buttonChat->winHide(TRUE);
if (listboxChatWindowScoreScreen)
listboxChatWindowScoreScreen->winHide(TRUE);
if (chatBoxBorder)
Expand All @@ -817,8 +831,9 @@ void initReplaySinglePlayer()
staticTextGameSaved->winHide(TRUE);
if (textEntryChat)
textEntryChat->winHide(TRUE);
if (buttonEmote)
buttonEmote->winHide(TRUE);
// TheSuperHackers @tweak arcticdolphin 08/03/2026 Renamed from buttonEmote to buttonChat to reflect chat button purpose
if (buttonChat)
buttonChat->winHide(TRUE);
if (chatBoxBorder)
chatBoxBorder->winHide(TRUE);
if (buttonContinue)
Expand All @@ -843,8 +858,9 @@ void initLANMultiPlayer()
staticTextGameSaved->winHide(TRUE);
if (textEntryChat)
textEntryChat->winHide(FALSE);
if (buttonEmote)
buttonEmote->winHide(FALSE);
// TheSuperHackers @tweak arcticdolphin 08/03/2026 Renamed from buttonEmote to buttonChat to reflect chat button purpose
if (buttonChat)
buttonChat->winHide(FALSE);
if (buttonContinue)
buttonContinue->winHide(TRUE);
if (listboxChatWindowScoreScreen)
Expand All @@ -869,8 +885,9 @@ void initInternetMultiPlayer()
buttonContinue->winHide(TRUE);
if (textEntryChat)
textEntryChat->winHide(TRUE);
if (buttonEmote)
buttonEmote->winHide(TRUE);
// TheSuperHackers @tweak arcticdolphin 08/03/2026 Renamed from buttonEmote to buttonChat to reflect chat button purpose
if (buttonChat)
buttonChat->winHide(TRUE);
if (listboxChatWindowScoreScreen)
listboxChatWindowScoreScreen->winHide(FALSE);
if (chatBoxBorder)
Expand Down Expand Up @@ -901,8 +918,9 @@ void initReplayMultiPlayer()
staticTextGameSaved->winHide(TRUE);
if (textEntryChat)
textEntryChat->winHide(TRUE);
if (buttonEmote)
buttonEmote->winHide(TRUE);
// TheSuperHackers @tweak arcticdolphin 08/03/2026 Renamed from buttonEmote to buttonChat to reflect chat button purpose
if (buttonChat)
buttonChat->winHide(TRUE);
if (listboxChatWindowScoreScreen)
listboxChatWindowScoreScreen->winHide(TRUE);
if (chatBoxBorder)
Expand Down
Loading
Loading