MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / ReadSMC_KeyValue

Method ReadSMC_KeyValue

core/logic/AdminCache.cpp:147–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145 return SMCResult_Continue;
146 }
147 SMCResult ReadSMC_KeyValue(const SMCStates *states, const char *key, const char *value)
148 {
149 if (m_LevelState != LEVEL_STATE_FLAGS || m_IgnoreLevel)
150 {
151 return SMCResult_Continue;
152 }
153
154 unsigned char c = (unsigned)value[0];
155
156 if (c < (unsigned)'a' || c > (unsigned)'z')
157 {
158 ParseError(states, "Flag \"%c\" is not a lower-case ASCII letter", c);
159 return SMCResult_Continue;
160 }
161
162 c -= (unsigned)'a';
163
164 if (!g_Admins.FindFlag(key, &g_FlagLetters[c]))
165 {
166 ParseError(states, "Unrecognized admin level \"%s\"", key);
167 return SMCResult_Continue;
168 }
169
170 g_FlagCharSet[c] = true;
171
172 return SMCResult_Continue;
173 }
174 SMCResult ReadSMC_LeavingSection(const SMCStates *states)
175 {
176 if (m_IgnoreLevel)

Callers

nothing calls this directly

Calls 1

FindFlagMethod · 0.80

Tested by

no test coverage detected