handles removing a ban from a player, given the ban index num (see $banlist) Usage: "$removeban " where bannum is the number corresponding to that given during a $banlist
| 759 | // handles removing a ban from a player, given the ban index num (see $banlist) |
| 760 | // Usage: "$removeban <int bannum>" where bannum is the number corresponding to that given during a $banlist |
| 761 | void DMFCInputCommand_RemoveBan(const char *input_string) { |
| 762 | if (basethis->GetLocalRole() != LR_SERVER) |
| 763 | return; |
| 764 | |
| 765 | int d; |
| 766 | char temp[20]; |
| 767 | |
| 768 | //"$removeban" |
| 769 | if (!StringParseWord(input_string, temp, 20, &input_string)) { |
| 770 | basethis->DisplayInputCommandHelp(DTXT_IC_REMOVEBAN); |
| 771 | return; |
| 772 | } |
| 773 | |
| 774 | // value |
| 775 | if (!StringParseNumber(input_string, &d, &input_string)) { |
| 776 | basethis->DisplayInputCommandHelp(DTXT_IC_REMOVEBAN); |
| 777 | return; |
| 778 | } |
| 779 | |
| 780 | if (basethis->RemoveBan(d)) { |
| 781 | DLLAddHUDMessage(DTXT_BANREMOVEDMSG); |
| 782 | DPrintf(DTXT_BANREMOVEDMSG); |
| 783 | } else { |
| 784 | DLLAddHUDMessage(DTXT_BANNOTREMOVEDMSG); |
| 785 | DPrintf(DTXT_BANNOTREMOVEDMSG); |
| 786 | } |
| 787 | } |
| 788 | |
| 789 | // handles changing the filter for death messages |
| 790 | // Usage: "$killmsgfilter <full/simple/none>" |
nothing calls this directly
no test coverage detected