| 2228 | } |
| 2229 | |
| 2230 | SMPlugin *CPluginManager::FindPluginByConsoleArg(const char *arg) |
| 2231 | { |
| 2232 | int id; |
| 2233 | char *end; |
| 2234 | CPlugin *pl; |
| 2235 | |
| 2236 | id = strtol(arg, &end, 10); |
| 2237 | |
| 2238 | if (*end == '\0') |
| 2239 | { |
| 2240 | pl = GetPluginByOrder(id); |
| 2241 | if (!pl) |
| 2242 | { |
| 2243 | return NULL; |
| 2244 | } |
| 2245 | } |
| 2246 | else |
| 2247 | { |
| 2248 | char pluginfile[256]; |
| 2249 | const char *ext = libsys->GetFileExtension(arg) ? "" : ".smx"; |
| 2250 | ke::SafeSprintf(pluginfile, sizeof(pluginfile), "%s%s", arg, ext); |
| 2251 | |
| 2252 | if (!m_LoadLookup.retrieve(pluginfile, &pl)) |
| 2253 | return NULL; |
| 2254 | } |
| 2255 | |
| 2256 | return pl; |
| 2257 | } |
| 2258 | |
| 2259 | void CPluginManager::OnSourceModMaxPlayersChanged(int newvalue) |
| 2260 | { |
no test coverage detected