summaryrefslogtreecommitdiff
path: root/src/map/guild.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/guild.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/guild.c')
-rw-r--r--src/map/guild.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/map/guild.c b/src/map/guild.c
index 3e71e99dc..a33efb831 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -489,13 +489,13 @@ int guild_recv_info(struct guild *sg) {
if (sd->status.guild_id == sg->guild_id) {
// Guild member
- channel->join(chan,sd);
+ channel->join_sub(chan,sd,false);
sd->guild = g;
for (i = 0; i < MAX_GUILDALLIANCE; i++) {
// Join channels from allied guilds
if (tg[i] && !(tg[i]->channel->banned && idb_exists(tg[i]->channel->banned, sd->status.account_id)))
- channel->join(tg[i]->channel, sd);
+ channel->join_sub(tg[i]->channel, sd, false);
}
continue;
}
@@ -504,7 +504,7 @@ int guild_recv_info(struct guild *sg) {
if (tg[i] && sd->status.guild_id == tg[i]->guild_id) { // Shortcut to skip the alliance checks again
// Alliance member
if( !(chan->banned && idb_exists(chan->banned, sd->status.account_id)))
- channel->join(chan, sd);
+ channel->join_sub(chan, sd, false);
}
}
}
@@ -741,17 +741,7 @@ void guild_member_joined(struct map_session_data *sd)
sd->guild = g;
if (channel->config->ally && channel->config->ally_autojoin) {
- struct channel_data *chan = g->channel;
-
- if( !(chan->banned && idb_exists(chan->banned, sd->status.account_id) ) )
- channel->join(chan,sd);
- for (i = 0; i < MAX_GUILDALLIANCE; i++) {
- struct guild* sg = NULL;
- if( g->alliance[i].opposition == 0 && g->alliance[i].guild_id && (sg = guild->search(g->alliance[i].guild_id) ) ) {
- if( !(sg->channel->banned && idb_exists(sg->channel->banned, sd->status.account_id)))
- channel->join(sg->channel,sd);
- }
- }
+ channel->join(g->channel, sd, NULL, true);
}
}