I've found a small bug in the max channel check when someone joines more then 1 channel in 1 command. ( ex. JOIN #channel1,#channel2 ).<br>The current channels aren't updated, so when the limit is 2 channels per user, a user can join 4 channels by using: JOIN #chan1,#chan2,#chan3,#chan4
<br><br>To fix this, change line 512 and 513 of ircd-hybrid-7.2.0/modules/core/m_join.c to:<br><br>line 512:<br>if (((dlink_list_length(&source_p->channel) + ntargets) >= ConfigChannel.max_chans_per_user) &&
<br><br>line 513:<br>(!IsOper(source_p) || ((dlink_list_length(&source_p->channel) + ntargets) >=<br><br>Greetings,<br><br>Patrick aka Fool.<br><br><br><div><span class="gmail_quote">On 1/30/06, <b class="gmail_sendername">
ThaPrince</b> <<a href="mailto:thaprince@gmail.com">thaprince@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Hello,</div>
<div> </div>
<div>I have found numerous bugs in ircd-hybrid 7.2.0 as can be seen below:</div>
<div> </div>
<div>- sockhost is not properly relayed</div>
<div>- match was called wrong causing xlines to fail.</div>
<div>- Soft caller ID does not function correctly.</div>
<div>- channel list formatting is broken</div>
<div> </div>
<div>Patch to fix the first 3 issues is below:</div>
<div> </div>
<div>The 4th issue is something introduced with the new nuh code. you can replicate it like so:</div>
<div> </div>
<div>/mode #Channel +bbb nick1 nick2 nick3</div>
<div> </div>
<div>The same is true for any of the lists that take parameters in such a fashion.</div>
<div> </div>
<div>and look at the output.</div>
<div> </div>
<div>Regards,</div>
<div> </div>
<div>Jon</div>
<div> </div>
<div>Index: src/s_user.c<br>===================================================================<br>--- src/s_user.c (revision 380)<br>+++ src/s_user.c (working copy)<br>@@ -619,8 +619,7 @@<br> source_p->name, source_p->hopcount+1,
<br> (unsigned long)source_p->tsinfo,<br> ubuf, source_p->username, source_p->host,<br>- ((MyClient(source_p) && !IsIPSpoof(source_p)) ?<br>- source_p->sockhost : "0"),
<br>+ IsIPSpoof(source_p) ? "0" : source_p->sockhost,<br> source_p->id, source_p->info);<br> }<br> else<br>@@ -648,7 +647,7 @@<br> source_p->name, source_p->hopcount+1,
<br> (unsigned long)source_p->tsinfo,<br> ubuf, source_p->username, source_p->host,<br>- ((MyClient(source_p)&&!IsIPSpoof(source_p))?source_p->sockhost:"0"),
<br>+ IsIPSpoof(source_p) ? "0" : source_p->sockhost,<br> source_p->id, source_p->info);<br> else<br> sendto_one(server, "NICK %s %d %lu %s %s %s %s :%s",
<br>Index: src/client.c<br>===================================================================<br>--- src/client.c (revision 380)<br>+++ src/client.c (working copy)<br>@@ -1231,11 +1231,13 @@<br> }<br> <br>
if (IsSoftCallerId(target))<br>- {<br> DLINK_FOREACH(ptr, target->channel.head)<br>- if (IsMember(source, ptr->data))<br>+ {<br>+ struct Channel *chptr = ((struct Membership *) ptr->data)->chptr;
<br>+<br>+ if (IsMember(source, chptr))<br> return (1);<br>- }<br>+ }<br> <br> return (0);<br> }<br>Index: src/s_serv.c<br>===================================================================<br>--- src/s_serv.c (revision 380)
<br>+++ src/s_serv.c (working copy)<br>@@ -892,8 +892,8 @@<br> target_p->name, target_p->hopcount + 1,<br> (unsigned long) target_p->tsinfo,<br> ubuf, target_p->username, target_p->host,
<br>- ((MyClient(target_p)&&!IsIPSpoof(target_p))?target_p->sockhost:"0"),<br>- target_p->id, target_p->info);<br>+ IsIPSpoof(target_p) ? "0" : target_p->sockhost,
<br>+ target_p->id, target_p->info);<br> else<br> sendto_one(client_p, "NICK %s %d %lu %s %s %s %s :%s",<br> target_p->name, target_p->hopcount + 1,<br>Index: modules/m_xline.c
<br>===================================================================<br>--- modules/m_xline.c (revision 380)<br>+++ modules/m_xline.c (working copy)<br>@@ -235,7 +235,7 @@<br> "XLINE %s %s %s :%s",
<br> parv[1], parv[2], parv[3], parv[4]);<br> <br>- if (match(parv[1], <a href="http://me.name" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">me.name</a>))<br>+ if (!match(parv[1],
<a href="http://me.name" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">me.name</a>))<br> return;<br> <br>
if (find_matching_name_conf(ULINE_TYPE, source_p->servptr->name,</div>
</blockquote></div><br>