summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-01-22 18:10:46 +0100
committerHaru <haru@dotalux.com>2015-01-24 14:37:25 +0100
commit5066af1700e95b5db24f9998cf1ff052b45f5fa0 (patch)
tree3f34c2d7592dc8fcd6b1b20f1678e7b784ee22ee /src/map/clif.c
parentfe55c7980099b2813a182cdfcc571df705601a4a (diff)
downloadhercules-5066af1700e95b5db24f9998cf1ff052b45f5fa0.tar.gz
hercules-5066af1700e95b5db24f9998cf1ff052b45f5fa0.tar.bz2
hercules-5066af1700e95b5db24f9998cf1ff052b45f5fa0.tar.xz
hercules-5066af1700e95b5db24f9998cf1ff052b45f5fa0.zip
Channels refactoring: join
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 10ab7121a..c66176d45 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -10062,20 +10062,9 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd)
if( sd->channels[k] == chan )
break;
}
- if( k < sd->channel_count ) {
+ if (k < sd->channel_count) {
channel->send(chan,sd,message);
- } else if( chan->password[0] == '\0' && !(chan->banned && idb_exists(chan->banned, sd->status.account_id)) ) {
- if( chan->type == HCS_TYPE_ALLY ) {
- struct guild *g = sd->guild;
- for (k = 0; k < MAX_GUILDALLIANCE; k++) {
- struct guild *sg = NULL;
- if( g->alliance[k].opposition == 0 && g->alliance[k].guild_id && (sg = guild->search(g->alliance[k].guild_id) ) ) {
- if( !(sg->channel->banned && idb_exists(sg->channel->banned, sd->status.account_id)))
- channel->join(sg->channel,sd);
- }
- }
- }
- channel->join(chan,sd);
+ } else if (channel->join(chan, sd, NULL, true) == HCS_STATUS_OK) {
channel->send(chan,sd,message);
} else {
clif->message(fd, msg_txt(1402));