Server Only. Temp bans a player from the game
| 958 | } |
| 959 | // Server Only. Temp bans a player from the game |
| 960 | void BanPlayer(int pnum) { |
| 961 | if (basethis->GetLocalRole() != LR_SERVER) { |
| 962 | mprintf(0, "BanPlayer Error: You're Not The Server\n"); |
| 963 | return; |
| 964 | } |
| 965 | if (pnum == basethis->GetPlayerNum()) { |
| 966 | mprintf(0, "BanPlayer Error: Server can't ban themself\n"); |
| 967 | DLLAddHUDMessage(DTXT_SERVERCANTBAN); |
| 968 | return; |
| 969 | } |
| 970 | if (!basethis->CheckPlayerNum(pnum)) { |
| 971 | mprintf(0, "BanPlayer Error: Pnum %d not in game\n", pnum); |
| 972 | DLLAddHUDMessage(DTXT_INVALIDPNUM, pnum); |
| 973 | return; |
| 974 | } |
| 975 | basethis->SendControlMessageToPlayer(pnum, CM_BANNED); |
| 976 | DLLMultiDisconnectPlayer(pnum); |
| 977 | basethis->BanPlayerFromGame(pnum); |
| 978 | } |
| 979 | // Server Only. Ends the current level |
| 980 | void EndMultiLevel(int i) { |
| 981 | if (basethis->GetLocalRole() != LR_SERVER) { |
no test coverage detected