| 38 | } |
| 39 | |
| 40 | bool SoundCommand::handle(int playerID, bz_ApiString /* command */, bz_ApiString message, bz_APIStringList* /* params */) { |
| 41 | if (!bz_hasPerm(playerID, bz_perm_setAll)) { |
| 42 | bz_sendTextMessage(BZ_SERVER, playerID, "You do not have permission to play sounds (SETALL)"); |
| 43 | return true; |
| 44 | } |
| 45 | |
| 46 | if (message.size() <= 0) { |
| 47 | bz_sendTextMessage(BZ_SERVER, playerID, "Missing sound file name"); |
| 48 | return true; |
| 49 | } |
| 50 | |
| 51 | bz_sendPlayCustomLocalSound(playerID, message.c_str()); |
| 52 | return true; |
| 53 | } |
| 54 | |
| 55 | |
| 56 | // Local Variables: *** |
nothing calls this directly
no test coverage detected