MCPcopy Create free account
hub / github.com/assaultcube/AC / updatesdesc

Function updatesdesc

source/src/server.cpp:1996–2009  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1994bool updatedescallowed(void) { return scl.servdesc_pre[0] || scl.servdesc_suf[0]; }
1995
1996void updatesdesc(const char *newdesc, ENetAddress *caller = NULL)
1997{
1998 if(!newdesc || !newdesc[0] || !updatedescallowed())
1999 {
2000 copystring(sg->servdesc_current, scl.servdesc_full);
2001 sg->custom_servdesc = false;
2002 }
2003 else
2004 {
2005 formatstring(sg->servdesc_current)("%s%s%s", scl.servdesc_pre, newdesc, scl.servdesc_suf);
2006 sg->custom_servdesc = true;
2007 if(caller) sg->servdesc_caller = *caller;
2008 }
2009}
2010
2011int canspawn(client *c) // beware: canspawn() doesn't check m_arena!
2012{

Callers 2

performMethod · 0.85
startgameFunction · 0.85

Calls 2

updatedescallowedFunction · 0.85
copystringFunction · 0.85

Tested by

no test coverage detected