diff options
author | Haru <haru@dotalux.com> | 2015-06-18 01:52:38 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2015-08-15 00:51:38 +0200 |
commit | 1034bfb7a390cb21623c3892f4d2304e2458af79 (patch) | |
tree | 236ce246af0d248cff51bb85725a735c5aeccb06 /src/map/trade.c | |
parent | 747d3b7d5c6056470b1c9d3f41e09e0ed92af6d6 (diff) | |
download | hercules-1034bfb7a390cb21623c3892f4d2304e2458af79.tar.gz hercules-1034bfb7a390cb21623c3892f4d2304e2458af79.tar.bz2 hercules-1034bfb7a390cb21623c3892f4d2304e2458af79.tar.xz hercules-1034bfb7a390cb21623c3892f4d2304e2458af79.zip |
Cleaned up socket interface
- Replaced some macro calls with the proper interface syntax
- Removed useless macros and workarounds
API changes summary:
- WFIFOSET() can now be safely used both inside and outside socket.c
- RFIFOSKIP() can now be safely used both inside and outside socket.c
- do_close() is now sockt->close()
- flush_fifo() is now sockt->flush()
- flush_fifos() is now sockt->flush_fifos()
- getips() is now sockt->getips()
- host2ip() is now sockt->host2ip()
- ip2str() is now sockt->ip2str()
- ntows() is now sockt->ntows()
- make_connection() is now sockt->make_connection()
- make_listen_bind() is now sockt->make_listen_bind()
- realloc_fifo() is now sockt->realloc_fifo()
- realloc_writefifo() is now sockt->realloc_writefifo()
- session_isActive() is now sockt->session_is_active()
- session_isValid() is now sockt->session_is_valid()
- set_defaultparse() is now sockt->set_defaultparse()
- set_eof() is now sockt->eof()
- set_noblocking() is now sockt->set_noblocking()
- str2ip() is now sockt->str2ip()
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/trade.c')
-rw-r--r-- | src/map/trade.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/trade.c b/src/map/trade.c index 4dd6ffafa..2f6e2a648 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -209,13 +209,13 @@ int impossible_trade_check(struct map_session_data *sd) // if we block people if (battle_config.ban_hack_trade < 0) { 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 + sockt->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, 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 + sockt->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). } else |