MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / handle

Method handle

plugins/soundTest/soundTest.cpp:40–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40bool 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: ***

Callers

nothing calls this directly

Calls 5

bz_hasPermFunction · 0.85
bz_sendTextMessageFunction · 0.85
c_strMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected