mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-18 15:17:23 +08:00

The main goal was improving the readability of the original code however some ugliness remains. - Swapped from pointer singleton to instance singleton - Actually make use of the alpha logic that used to be present - Added a counter to notifications to indicate if something is being spammed - Notification timeouts reset if they're sent to the queue again
25 lines
579 B
C++
25 lines
579 B
C++
#include "default_command_context.hpp"
|
|
|
|
namespace big
|
|
{
|
|
player_ptr default_command_context::get_sender() const
|
|
{
|
|
return g_player_service->get_self();
|
|
}
|
|
|
|
CommandAccessLevel default_command_context::get_access_level() const
|
|
{
|
|
return CommandAccessLevel::ADMIN;
|
|
}
|
|
|
|
void default_command_context::report_output(const std::string& output) const
|
|
{
|
|
g_notification_service.push("BACKEND_COMMAND"_T.data(), output);
|
|
}
|
|
|
|
void default_command_context::report_error(const std::string& error) const
|
|
{
|
|
g_notification_service.push_error("BACKEND_COMMAND"_T.data(), error);
|
|
}
|
|
}
|