MCPcopy Create free account
hub / github.com/ddnet/ddnet / RconAuth

Method RconAuth

src/engine/client/client.cpp:263–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261}
262
263void CClient::RconAuth(const char *pName, const char *pPassword, bool Dummy)
264{
265 if(m_aRconAuthed[Dummy] != 0)
266 return;
267
268 if(pName != m_aRconUsername)
269 str_copy(m_aRconUsername, pName);
270 if(pPassword != m_aRconPassword)
271 str_copy(m_aRconPassword, pPassword);
272
273 if(IsSixup())
274 {
275 CMsgPacker Msg7(protocol7::NETMSG_RCON_AUTH, true, true);
276 Msg7.AddString(pPassword);
277 SendMsg(Dummy, &Msg7, MSGFLAG_VITAL);
278 return;
279 }
280
281 CMsgPacker Msg(NETMSG_RCON_AUTH, true);
282 Msg.AddString(pName);
283 Msg.AddString(pPassword);
284 Msg.AddInt(1);
285 SendMsg(Dummy, &Msg, MSGFLAG_VITAL);
286}
287
288void CClient::Rcon(const char *pCmd)
289{

Callers 4

ExecuteLineMethod · 0.80
RconAuthIfPossibleMethod · 0.80
Con_RconAuthMethod · 0.80
Con_RconLoginMethod · 0.80

Calls 3

AddIntMethod · 0.80
str_copyFunction · 0.50
AddStringMethod · 0.45

Tested by

no test coverage detected