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

Function setadmin

source/src/clientgame.cpp:1665–1676  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1663int sessionid = 0;
1664
1665void setadmin(int *claim, char *password)
1666{
1667 if(!*claim && (player1->clientrole))
1668 {
1669 conoutf("you released admin status");
1670 addmsg(SV_SETADMIN, "ri", 0);
1671 }
1672 else if(*claim != 0 && *password)
1673 addmsg(SV_SETADMIN, "ris", *claim, genpwdhash(player1->name, password, sessionid));
1674 else if(*claim != 0)
1675 addmsg(SV_SETADMIN, "ri", *claim);
1676}
1677COMMAND(setadmin, "is");
1678
1679static vector<mline> mlines;

Callers

nothing calls this directly

Calls 3

addmsgFunction · 0.85
genpwdhashFunction · 0.85
conoutfFunction · 0.70

Tested by

no test coverage detected