Skip to content

Commit

Permalink
Merge branch 'release/oftc-hybrid-1.7.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
cryogen committed Jul 15, 2016
2 parents d0a3f6d + a8d1835 commit 41ae2de
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 15 deletions.
2 changes: 1 addition & 1 deletion include/patchlevel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 4 additions & 10 deletions modules/core/m_join.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down
22 changes: 18 additions & 4 deletions modules/m_svsjoin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 6 additions & 0 deletions src/channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 41ae2de

Please sign in to comment.