SV_RemoveIP_f.
(List<String> args, GameExportsImpl gameExports)
| 182 | * SV_RemoveIP_f. |
| 183 | */ |
| 184 | private static void SVCmd_RemoveIP_f(List<String> args, GameExportsImpl gameExports) { |
| 185 | GameSVCmds.ipfilter_t f = new GameSVCmds.ipfilter_t(); |
| 186 | |
| 187 | if (args.size() < 3) { |
| 188 | gameExports.gameImports.cprintf(null, Defines.PRINT_HIGH, |
| 189 | "Usage: sv removeip <ip-mask>\n"); |
| 190 | return; |
| 191 | } |
| 192 | |
| 193 | if (!StringToFilter(args.get(2), f, gameExports)) |
| 194 | return; |
| 195 | |
| 196 | for (int i = 0; i < numipfilters; i++) |
| 197 | if (ipfilters[i].mask == f.mask |
| 198 | && ipfilters[i].compare == f.compare) { |
| 199 | for (int j = i + 1; j < numipfilters; j++) |
| 200 | ipfilters[j - 1] = ipfilters[j]; |
| 201 | numipfilters--; |
| 202 | gameExports.gameImports.cprintf(null, Defines.PRINT_HIGH, "Removed.\n"); |
| 203 | return; |
| 204 | } |
| 205 | gameExports.gameImports.cprintf(null, Defines.PRINT_HIGH, "Didn't find " + args.get(2) + ".\n"); |
| 206 | } |
| 207 | |
| 208 | /** |
| 209 | * SV_ListIP_f. |
no test coverage detected