diff options
author | Haru <haru@dotalux.com> | 2016-04-21 20:38:18 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-04-23 19:11:52 +0200 |
commit | 4788c813c654c522d336dd9fb1229c1cbdd2d7de (patch) | |
tree | b96507116fb1863680c6101c4add29b041e536bb /src/map/guild.c | |
parent | d7ffa6adbcf4800821fe3f961513952450d06f98 (diff) | |
download | hercules-4788c813c654c522d336dd9fb1229c1cbdd2d7de.tar.gz hercules-4788c813c654c522d336dd9fb1229c1cbdd2d7de.tar.bz2 hercules-4788c813c654c522d336dd9fb1229c1cbdd2d7de.tar.xz hercules-4788c813c654c522d336dd9fb1229c1cbdd2d7de.zip |
Removed the 'len' argument from various message-related functions
- The argument was redundant, since the passed value is always the same
as the passed string's length (it doesn't make sense otherwise).
The argument is implicit now. Less typing and less errors.
- Affected functions: `clif->bg_message()`, `bg->send_message()`,
`party->send_message()`, `guild->send_message()`.
Signed-off-by: Haru <haru@dotalux.com>
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/guild.c')
-rw-r--r-- | src/map/guild.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/map/guild.c b/src/map/guild.c index 39d580bb7..a231ebd9b 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -1060,14 +1060,15 @@ int guild_recv_memberinfoshort(int guild_id,int account_id,int char_id,int onlin /*==================================================== * Send a message to whole guild *---------------------------------------------------*/ -int guild_send_message(struct map_session_data *sd,const char *mes,int len) +int guild_send_message(struct map_session_data *sd, const char *mes) { + int len = (int)strlen(mes); nullpo_ret(sd); - if(sd->status.guild_id==0) + if (sd->status.guild_id == 0) return 0; - intif->guild_message(sd->status.guild_id,sd->status.account_id,mes,len); - guild->recv_message(sd->status.guild_id,sd->status.account_id,mes,len); + intif->guild_message(sd->status.guild_id, sd->status.account_id, mes, len); + guild->recv_message(sd->status.guild_id, sd->status.account_id, mes, len); // Chat logging type 'G' / Guild Chat logs->chat(LOG_CHAT_GUILD, sd->status.guild_id, sd->status.char_id, sd->status.account_id, mapindex_id2name(sd->mapindex), sd->bl.x, sd->bl.y, NULL, mes); |