summaryrefslogtreecommitdiff
path: root/src/map/trade.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-01-23 18:40:29 +0100
committerHaru <haru@dotalux.com>2015-06-01 10:11:39 +0200
commit42e1df9e61f8efb6340ed1c9238cd247d553d9b8 (patch)
tree2a465b7468b438b200f011fb7994023f4113c33b /src/map/trade.c
parent0a54d25ccfd891814cbdada8589b48c6b9da23fd (diff)
downloadhercules-42e1df9e61f8efb6340ed1c9238cd247d553d9b8.tar.gz
hercules-42e1df9e61f8efb6340ed1c9238cd247d553d9b8.tar.bz2
hercules-42e1df9e61f8efb6340ed1c9238cd247d553d9b8.tar.xz
hercules-42e1df9e61f8efb6340ed1c9238cd247d553d9b8.zip
Replaced some of the hardcoded values with constants (char)
- Replaced several hardcoded values with the appropriate enums. - Added documentation for some hardcoded values that haven't been replaced by enums (yet) - Minor code legibility improvements. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/trade.c')
-rw-r--r--src/map/trade.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/trade.c b/src/map/trade.c
index 7417f05af..72e64e45d 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -208,13 +208,13 @@ int impossible_trade_check(struct map_session_data *sd)
intif->wis_message_to_gm(map->wisp_server_name, PC_PERM_RECEIVE_HACK_INFO, message_to_gm);
// if we block people
if (battle_config.ban_hack_trade < 0) {
- chrif->char_ask_name(-1, sd->status.name, 1, 0, 0, 0, 0, 0, 0); // type: 1 - block
+ chrif->char_ask_name(-1, sd->status.name, CHAR_ASK_NAME_BLOCK, 0, 0, 0, 0, 0, 0);
set_eof(sd->fd); // forced to disconnect because of the hack
// message about the ban
safestrncpy(message_to_gm, msg_txt(540), sizeof(message_to_gm)); // This player has been definitively blocked.
// if we ban people
} else if (battle_config.ban_hack_trade > 0) {
- chrif->char_ask_name(-1, sd->status.name, 2, 0, 0, 0, 0, battle_config.ban_hack_trade, 0); // type: 2 - ban (year, month, day, hour, minute, second)
+ chrif->char_ask_name(-1, sd->status.name, CHAR_ASK_NAME_BAN, 0, 0, 0, 0, battle_config.ban_hack_trade, 0); // type: 2 - ban (year, month, day, hour, minute, second)
set_eof(sd->fd); // forced to disconnect because of the hack
// message about the ban
sprintf(message_to_gm, msg_txt(507), battle_config.ban_hack_trade); // This player has been banned for %d minute(s).