mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Revert "Allow server to redirect clients"
Discussion wasn't finished:
https://github.com/ddnet/ddnet/pull/6757#issuecomment-1648565562.
This reverts commit 9d2f4318d5
.
This commit is contained in:
parent
e432dbb750
commit
4f103d5a4c
|
@ -1866,16 +1866,6 @@ void CClient::ProcessServerPacket(CNetChunk *pPacket, int Conn, bool Dummy)
|
|||
SendMsg(Conn, &MsgP, MSGFLAG_VITAL);
|
||||
}
|
||||
}
|
||||
else if(Msg == NETMSG_REDIRECT)
|
||||
{
|
||||
int RedirectPort = Unpacker.GetInt();
|
||||
char aAddr[128];
|
||||
char aIP[64];
|
||||
NETADDR ServerAddr = ServerAddress();
|
||||
net_addr_str(&ServerAddr, aIP, sizeof(aIP), 0);
|
||||
str_format(aAddr, sizeof(aAddr), "%s:%d", aIP, RedirectPort);
|
||||
Connect(aAddr);
|
||||
}
|
||||
else if(Conn == CONN_MAIN && (pPacket->m_Flags & NET_CHUNKFLAG_VITAL) != 0 && Msg == NETMSG_RCON_CMD_ADD)
|
||||
{
|
||||
const char *pName = Unpacker.GetString(CUnpacker::SANITIZE_CC);
|
||||
|
|
|
@ -32,4 +32,3 @@ UUID(NETMSG_PONGEX, "pong@ddnet.tw")
|
|||
UUID(NETMSG_CHECKSUM_REQUEST, "checksum-request@ddnet.tw")
|
||||
UUID(NETMSG_CHECKSUM_RESPONSE, "checksum-response@ddnet.tw")
|
||||
UUID(NETMSG_CHECKSUM_ERROR, "checksum-error@ddnet.tw")
|
||||
UUID(NETMSG_REDIRECT, "redirect@ddnet.org")
|
||||
|
|
|
@ -4214,20 +4214,6 @@ bool CGameContext::IsVersionBanned(int Version)
|
|||
return str_in_list(g_Config.m_SvBannedVersions, ",", aVersion);
|
||||
}
|
||||
|
||||
void CGameContext::RedirectClient(int ClientID, int Port, bool Verbose)
|
||||
{
|
||||
if(Verbose)
|
||||
{
|
||||
char aBuf[512];
|
||||
str_format(aBuf, sizeof(aBuf), "redirecting '%s' to port %d", Server()->ClientName(ClientID), Port);
|
||||
Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "redirect", aBuf);
|
||||
}
|
||||
|
||||
CMsgPacker Msg(NETMSG_REDIRECT, true);
|
||||
Msg.AddInt(Port);
|
||||
Server()->SendMsg(&Msg, MSGFLAG_VITAL, ClientID);
|
||||
}
|
||||
|
||||
void CGameContext::List(int ClientID, const char *pFilter)
|
||||
{
|
||||
int Total = 0;
|
||||
|
|
|
@ -472,7 +472,6 @@ private:
|
|||
void Converse(int ClientID, char *pStr);
|
||||
bool IsVersionBanned(int Version);
|
||||
void UnlockTeam(int ClientID, int Team);
|
||||
void RedirectClient(int ClientID, int Port, bool Verbose = false);
|
||||
|
||||
enum
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue