diff --git a/include/patchlevel.h b/include/patchlevel.h index 2e43f0357..383064250 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -23,5 +23,5 @@ */ #ifndef PATCHLEVEL -#define PATCHLEVEL "hybrid-7.2.2+oftc1.7.0" +#define PATCHLEVEL "hybrid-7.2.2+oftc1.7.1" #endif diff --git a/modules/core/m_join.c b/modules/core/m_join.c index 57bd259f5..6c950bc46 100644 --- a/modules/core/m_join.c +++ b/modules/core/m_join.c @@ -179,15 +179,6 @@ m_join(struct Client *client_p, struct Client *source_p, continue; } - if ((dlink_list_length(&source_p->channel) >= ConfigChannel.max_chans_per_user) && - (!IsOper(source_p) || (dlink_list_length(&source_p->channel) >= - ConfigChannel.max_chans_per_user * 3))) - { - sendto_one(source_p, form_str(ERR_TOOMANYCHANNELS), - me.name, source_p->name, chan); - break; - } - if ((chptr = hash_find_channel(chan)) != NULL) { if (IsMember(source_p, chptr)) @@ -238,7 +229,10 @@ m_join(struct Client *client_p, struct Client *source_p, { sendto_one(source_p, form_str(i), me.name, source_p->name, chptr->chname); - continue; + if(i == ERR_TOOMANYCHANNELS) + break; + else + continue; } if(i != 0 && IsGod(source_p) && MyClient(source_p)) diff --git a/modules/m_svsjoin.c b/modules/m_svsjoin.c index 79124fc09..01640fe21 100644 --- a/modules/m_svsjoin.c +++ b/modules/m_svsjoin.c @@ -98,13 +98,27 @@ ms_svsjoin(struct Client *client_p, struct Client *source_p, { if (target_p->from != client_p) { + char *key; + char *seperator; + + if(parv[3] == NULL) + { + key = ""; + seperator = ""; + } + else + { + key = parv[3]; + seperator = " "; + } + if (IsCapable(target_p->from, CAP_ENCAP)) - sendto_one(target_p, ":%s ENCAP %s SVSJOIN %s %s", + sendto_one(target_p, ":%s ENCAP %s SVSJOIN %s %s%s%s", source_p->name, target_p->from->name, - target_p->name, parv[2]); + target_p->name, parv[2], seperator, key); else - sendto_one(target_p, ":%s SVSJOIN %s %s", - source_p->name, target_p->name, parv[2]); + sendto_one(target_p, ":%s SVSJOIN %s %s%s%s", + source_p->name, target_p->name, parv[2], seperator, key); } return; diff --git a/src/channel.c b/src/channel.c index edf9412ad..592c5500f 100644 --- a/src/channel.c +++ b/src/channel.c @@ -689,6 +689,12 @@ can_join(struct Client *source_p, struct Channel *chptr, const char *key) if(IsService(source_p)) return 0; + if ((dlink_list_length(&source_p->channel) >= ConfigChannel.max_chans_per_user) && + (!IsOper(source_p) || (dlink_list_length(&source_p->channel) >= + ConfigChannel.max_chans_per_user * 3))) + return ERR_TOOMANYCHANNELS; + + if (is_banned(chptr, source_p)) return ERR_BANNEDFROMCHAN;