mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
Merge #3438
3438: Replace unused chains in chat r=def- a=Jupeyy Probs we forgot it when we swapped from two configs to one ## Checklist - [ ] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test if it works standalone, system.c especially - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: Jupeyy <jupjopjap@gmail.com>
This commit is contained in:
commit
e6cf5bcacd
|
@ -151,13 +151,7 @@ void CChat::ConEcho(IConsole::IResult *pResult, void *pUserData)
|
|||
((CChat *)pUserData)->Echo(pResult->GetString(0));
|
||||
}
|
||||
|
||||
void CChat::ConchainChatTee(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
|
||||
{
|
||||
pfnCallback(pResult, pCallbackUserData);
|
||||
((CChat *)pUserData)->RebuildChat();
|
||||
}
|
||||
|
||||
void CChat::ConchainChatBackground(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
|
||||
void CChat::ConchainChatOld(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
|
||||
{
|
||||
pfnCallback(pResult, pCallbackUserData);
|
||||
((CChat *)pUserData)->RebuildChat();
|
||||
|
@ -175,8 +169,7 @@ void CChat::OnConsoleInit()
|
|||
Console()->Register("chat", "s['team'|'all'] ?r[message]", CFGFLAG_CLIENT, ConChat, this, "Enable chat with all/team mode");
|
||||
Console()->Register("+show_chat", "", CFGFLAG_CLIENT, ConShowChat, this, "Show chat");
|
||||
Console()->Register("echo", "r[message]", CFGFLAG_CLIENT, ConEcho, this, "Echo the text in chat window");
|
||||
Console()->Chain("cl_chat_tee", ConchainChatTee, this);
|
||||
Console()->Chain("cl_chat_background", ConchainChatBackground, this);
|
||||
Console()->Chain("cl_chat_old", ConchainChatOld, this);
|
||||
}
|
||||
|
||||
bool CChat::OnInput(IInput::CEvent Event)
|
||||
|
|
|
@ -107,8 +107,7 @@ class CChat : public CComponent
|
|||
static void ConShowChat(IConsole::IResult *pResult, void *pUserData);
|
||||
static void ConEcho(IConsole::IResult *pResult, void *pUserData);
|
||||
|
||||
static void ConchainChatTee(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
|
||||
static void ConchainChatBackground(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
|
||||
static void ConchainChatOld(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
|
||||
|
||||
bool LineShouldHighlight(const char *pLine, const char *pName);
|
||||
void StoreSave(const char *pText);
|
||||
|
|
Loading…
Reference in a new issue