diff options
-rw-r--r-- | conf/msg_athena.conf | 3 | ||||
-rw-r--r-- | src/map/atcommand.c | 4 | ||||
-rw-r--r-- | src/map/pc_groups.h | 42 |
3 files changed, 29 insertions, 20 deletions
diff --git a/conf/msg_athena.conf b/conf/msg_athena.conf index ef868001d..4c4000d14 100644 --- a/conf/msg_athena.conf +++ b/conf/msg_athena.conf @@ -1342,5 +1342,8 @@ 1391: You do not possess a cart to be removed 1392: Cart Added. +// atcommand.c::is_atcommand +1393: You can't use commands while dead. + //Custom translations import: conf/import/msg_conf.txt diff --git a/src/map/atcommand.c b/src/map/atcommand.c index cceb3093e..8aaef2769 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -9322,6 +9322,10 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message (*command == charcommand_symbol && info->char_groups[sd->group_pos] == 0) ) { return false; } + if( pc_isdead(sd) && pc_has_permission(sd,PC_PERM_DISABLE_CMD_DEAD) ) { + clif_displaymessage(fd, msg_txt(1393)); // You can't use commands while dead + return true; + } } // Check if target is valid only if confirmed that player can use command. diff --git a/src/map/pc_groups.h b/src/map/pc_groups.h index 8951a41cd..65c48935a 100644 --- a/src/map/pc_groups.h +++ b/src/map/pc_groups.h @@ -22,26 +22,27 @@ void pc_groups_reload(void); enum e_pc_permission { PC_PERM_NONE = 0, - PC_PERM_TRADE = 0x00001, - PC_PERM_PARTY = 0x00002, - PC_PERM_ALL_SKILL = 0x00004, - PC_PERM_USE_ALL_EQUIPMENT = 0x00008, - PC_PERM_SKILL_UNCONDITIONAL = 0x00010, - PC_PERM_JOIN_ALL_CHAT = 0x00020, - PC_PERM_NO_CHAT_KICK = 0x00040, - PC_PERM_HIDE_SESSION = 0x00080, - PC_PERM_WHO_DISPLAY_AID = 0x00100, - PC_PERM_RECEIVE_HACK_INFO = 0x00200, - PC_PERM_WARP_ANYWHERE = 0x00400, - PC_PERM_VIEW_HPMETER = 0x00800, - PC_PERM_VIEW_EQUIPMENT = 0x01000, - PC_PERM_USE_CHECK = 0x02000, - PC_PERM_USE_CHANGEMAPTYPE = 0x04000, - PC_PERM_USE_ALL_COMMANDS = 0x08000, - PC_PERM_RECEIVE_REQUESTS = 0x10000, - PC_PERM_SHOW_BOSS = 0x20000, - PC_PERM_DISABLE_PVM = 0x40000, - PC_PERM_DISABLE_PVP = 0x80000, + PC_PERM_TRADE = 0x000001, + PC_PERM_PARTY = 0x000002, + PC_PERM_ALL_SKILL = 0x000004, + PC_PERM_USE_ALL_EQUIPMENT = 0x000008, + PC_PERM_SKILL_UNCONDITIONAL = 0x000010, + PC_PERM_JOIN_ALL_CHAT = 0x000020, + PC_PERM_NO_CHAT_KICK = 0x000040, + PC_PERM_HIDE_SESSION = 0x000080, + PC_PERM_WHO_DISPLAY_AID = 0x000100, + PC_PERM_RECEIVE_HACK_INFO = 0x000200, + PC_PERM_WARP_ANYWHERE = 0x000400, + PC_PERM_VIEW_HPMETER = 0x000800, + PC_PERM_VIEW_EQUIPMENT = 0x001000, + PC_PERM_USE_CHECK = 0x002000, + PC_PERM_USE_CHANGEMAPTYPE = 0x004000, + PC_PERM_USE_ALL_COMMANDS = 0x008000, + PC_PERM_RECEIVE_REQUESTS = 0x010000, + PC_PERM_SHOW_BOSS = 0x020000, + PC_PERM_DISABLE_PVM = 0x040000, + PC_PERM_DISABLE_PVP = 0x080000, + PC_PERM_DISABLE_CMD_DEAD = 0x100000, }; static const struct { @@ -68,6 +69,7 @@ static const struct { { "show_bossmobs", PC_PERM_SHOW_BOSS }, { "disable_pvm", PC_PERM_DISABLE_PVM }, { "disable_pvp", PC_PERM_DISABLE_PVP }, + { "disable_commands_when_dead", PC_PERM_DISABLE_CMD_DEAD }, }; #endif // _PC_GROUPS_H_ |