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