summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-06-02 02:23:24 +0200
committerHaru <haru@dotalux.com>2015-06-02 02:23:24 +0200
commit60e499282e124cd8978a32bb84d4b394811f29dc (patch)
tree1b3211a6e39e1dacfe9bdfe80b0a798a48ddaecf /src/map/atcommand.c
parentd66cc50af6d781d179f46ae67d74bf26bf5914e5 (diff)
parent3b4362cd0148a0cabf37306eccf1abbff0edc360 (diff)
downloadhercules-60e499282e124cd8978a32bb84d4b394811f29dc.tar.gz
hercules-60e499282e124cd8978a32bb84d4b394811f29dc.tar.bz2
hercules-60e499282e124cd8978a32bb84d4b394811f29dc.tar.xz
hercules-60e499282e124cd8978a32bb84d4b394811f29dc.zip
Merge remote-tracking branch 'upstream/pr/530' into hercules
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c29
1 files changed, 5 insertions, 24 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index f42a6332d..0bd236fa7 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -8785,14 +8785,7 @@ ACMD(channel) {
unsigned short msg_len = 1;
msg_len += sprintf(mout, "[ %s list colors ] : %s", command, channel->config->colors_name[k]);
- // FIXME: This is clif code.
- WFIFOHEAD(fd,msg_len + 12);
- WFIFOW(fd,0) = 0x2C1;
- WFIFOW(fd,2) = msg_len + 12;
- WFIFOL(fd,4) = 0;
- WFIFOL(fd,8) = channel->config->colors[k];
- safestrncpy((char*)WFIFOP(fd,12), mout, msg_len);
- WFIFOSET(fd, msg_len + 12);
+ clif->colormes( fd, (enum clif_colors)channel->config->colors[k], mout );
}
} else {
DBIterator *iter = db_iterator(channel->db);
@@ -9177,14 +9170,8 @@ ACMD(fontcolor) {
if( !message || !*message ) {
for( k = 0; k < channel->config->colors_count; k++ ) {
msg_len += sprintf(mout, "[ %s ] : %s", command, channel->config->colors_name[k]);
- // FIXME: This is clif code.
- WFIFOHEAD(fd,msg_len + 12);
- WFIFOW(fd,0) = 0x2C1;
- WFIFOW(fd,2) = msg_len + 12;
- WFIFOL(fd,4) = 0;
- WFIFOL(fd,8) = channel->config->colors[k];
- safestrncpy((char*)WFIFOP(fd,12), mout, msg_len);
- WFIFOSET(fd, msg_len + 12);
+
+ clif->colormes( fd, (enum clif_colors)channel->config->colors[k], mout );
}
return false;
}
@@ -9207,14 +9194,8 @@ ACMD(fontcolor) {
sd->fontcolor = k + 1;
msg_len += sprintf(mout, "Color changed to '%s'", channel->config->colors_name[k]);
- // FIXME: This is clif code.
- WFIFOHEAD(fd,msg_len + 12);
- WFIFOW(fd,0) = 0x2C1;
- WFIFOW(fd,2) = msg_len + 12;
- WFIFOL(fd,4) = 0;
- WFIFOL(fd,8) = channel->config->colors[k];
- safestrncpy((char*)WFIFOP(fd,12), mout, msg_len);
- WFIFOSET(fd, msg_len + 12);
+ clif->colormes( fd, (enum clif_colors)channel->config->colors[k], mout );
+
return true;
}
ACMD(searchstore){