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

Method AddvoteOption

src/game/client/components/voting.cpp:131–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void CVoting::AddvoteOption(const char *pDescription, const char *pCommand)
132{
133 char aBuf[128] = "add_vote \"";
134 char *pDst = aBuf + str_length(aBuf);
135 str_escape(&pDst, pDescription, aBuf + sizeof(aBuf));
136 str_append(aBuf, "\" \"");
137 pDst = aBuf + str_length(aBuf);
138 str_escape(&pDst, pCommand, aBuf + sizeof(aBuf));
139 str_append(aBuf, "\"");
140 Client()->Rcon(aBuf);
141}
142
143void CVoting::Vote(int v)
144{

Callers 1

RenderServerControlMethod · 0.80

Calls 5

str_lengthFunction · 0.85
str_escapeFunction · 0.85
RconMethod · 0.80
str_appendFunction · 0.50
ClientFunction · 0.50

Tested by

no test coverage detected