mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 19:10:25 +00:00
[Quest API] Add SendGMCommand() to Perl/Lua. (#2527)
* [Quest API] Add SendGMCommand() to Perl/Lua. # Perl - Add `$client->SendGMCommand(message)` to Perl. - Add `$client->SendGMCommand(message, ignore_status)` to Perl. # Lua - Add `client:SendGMCommand(message)` to Lua. - Add `client:SendGMCommand(message, ignore_status)` to Lua. # Notes - `ignore_status` allows you to have players use GM commands that they are not the required status level for through the Quest API. - `ignore_status` is default false, so if you don't send it, it checks and makes sure the player can use the command you're sending before allowing it. * Typo. * Formatting.
This commit is contained in:
+5
-1
@@ -1118,7 +1118,7 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
|
||||
}
|
||||
case ChatChannel_Say: { /* Say */
|
||||
if (message[0] == COMMAND_CHAR) {
|
||||
if (command_dispatch(this, message) == -2) {
|
||||
if (command_dispatch(this, message, false) == -2) {
|
||||
if (parse->PlayerHasQuestSub(EVENT_COMMAND)) {
|
||||
int i = parse->EventPlayer(EVENT_COMMAND, this, message, 0);
|
||||
if (i == 0 && !RuleB(Chat, SuppressCommandErrors)) {
|
||||
@@ -11751,3 +11751,7 @@ void Client::AddAAPoints(uint32 points)
|
||||
|
||||
SendAlternateAdvancementStats();
|
||||
}
|
||||
|
||||
bool Client::SendGMCommand(std::string message, bool ignore_status) {
|
||||
return command_dispatch(this, message, ignore_status) >= 0 ? true : false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user