MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / LoadBanList

Function LoadBanList

engine/Poseidon/Network/NetworkServer.cpp:180–209  ·  view source on GitHub ↗

Load ban list from file

Source from the content-addressed store, hash-verified

178 playerObjects.Delete(i);
179 return;
180 }
181 }
182}
183// Load ban list from file
184void LoadBanList(RString filename, FindArray<__int64>& list)
185{
186 list.Clear();
187 QIFStream f;
188 f.open(filename);
189 while (!f.eof() && !f.fail())
190 {
191 int c = f.get();
192 if (f.eof() || f.fail())
193 {
194 return;
195 }
196 while (!isdigit(c))
197 {
198 c = f.get();
199 if (f.eof() || f.fail())
200 {
201 return;
202 }
203 }
204 __int64 value = 0;
205 while (isdigit(c))
206 {
207 value *= 10;
208 value += c - '0';
209 c = f.get();
210 }
211 list.AddUnique(value);
212 }

Callers 3

NetworkServerMethod · 0.85
OnMessageMethod · 0.85

Calls 6

ClearMethod · 0.45
openMethod · 0.45
eofMethod · 0.45
failMethod · 0.45
getMethod · 0.45
AddUniqueMethod · 0.45

Tested by

no test coverage detected