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:
bors[bot] 2020-12-22 18:34:12 +00:00 committed by GitHub
commit e6cf5bcacd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 11 deletions

View file

@ -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)

View file

@ -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);