summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEyesOfAHawk <blackoutro2006@gmail.com>2018-10-15 21:07:04 +1300
committerEyesOfAHawk <blackoutro2006@gmail.com>2018-10-15 21:07:04 +1300
commitcf2c2f8e243cc4d2792a05907a13d1d5c855c5b3 (patch)
treee8575006feadf9fa39c36937ff2a2bac1dedb668
parentbaeb7a1742b0fd7ac5d3a4cecd90f74d461895fe (diff)
downloadhercules-cf2c2f8e243cc4d2792a05907a13d1d5c855c5b3.tar.gz
hercules-cf2c2f8e243cc4d2792a05907a13d1d5c855c5b3.tar.bz2
hercules-cf2c2f8e243cc4d2792a05907a13d1d5c855c5b3.tar.xz
hercules-cf2c2f8e243cc4d2792a05907a13d1d5c855c5b3.zip
Change channel delay message to instruct time left before can message channel again.
-rw-r--r--conf/messages.conf2
-rw-r--r--src/map/channel.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/conf/messages.conf b/conf/messages.conf
index 9fc85cb55..cf2cd15bd 100644
--- a/conf/messages.conf
+++ b/conf/messages.conf
@@ -1499,7 +1499,7 @@
1452: option '%s' is now enabled for channel '%s' with %d seconds
1453: option '%s' is now disabled for channel '%s'
1454: option '%s' is not enabled on channel '%s'
-1455: You're talking too fast!
+1455: You cannot send a message to this channel for another %d seconds.
1456: -- %s ban <channel name> <character name>
1457: - bans <character name> from <channel name> channel
1458: -- %s banlist <channel name>
diff --git a/src/map/channel.c b/src/map/channel.c
index f1946385d..eadd7367b 100644
--- a/src/map/channel.c
+++ b/src/map/channel.c
@@ -276,7 +276,9 @@ static void channel_send(struct channel_data *chan, struct map_session_data *sd,
if (sd && chan->msg_delay != 0
&& DIFF_TICK(sd->hchsysch_tick + chan->msg_delay*1000, timer->gettick()) > 0
&& !pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN)) {
- clif->messagecolor_self(sd->fd, COLOR_RED, msg_sd(sd,1455));
+ char output[CHAT_SIZE_MAX];
+ sprintf(output, msg_sd(sd, 1455), DIFF_TICK(sd->hchsysch_tick + chan->msg_delay * 1000, timer->gettick()) / 1000); // "You cannot send a message to this channel for another %d seconds."
+ clif->messagecolor_self(sd->fd, COLOR_RED, output);
return;
} else if (sd) {
int i;