This patch should prevent users with account and no hidden host from joining
a channel that has baned their hidden host.

Cheers,
notnet
Developer, Astrolink IRC Network

---- snip snip --->

Index: ChangeLog
===================================================================
RCS file: /cvsroot/undernet-ircu/ircu2.10/ChangeLog,v
retrieving revision 1.290.2.125
diff -u -r1.290.2.125 ChangeLog
--- ChangeLog   10 Oct 2002 09:13:23 -0000      1.290.2.125
+++ ChangeLog   16 Oct 2002 00:03:39 -0000
@@ -1,3 +1,9 @@
+2002-10-15  Tim Vogelsang <[EMAIL PROTECTED]>
+
+       * ircd/channel.c (is_banned): users that are using account and not
+       using the hidden host feature should have their accounts checked
+       against other hidden hosts banned in a attempted channel join
+
 2002-10-10  Perry Lorier <[EMAIL PROTECTED]>

        * include/patchlevel.h (PATCHLEVEL): release u2.10.11.02

Index: ircd/channel.c
===================================================================
RCS file: /cvsroot/undernet-ircu/ircu2.10/ircd/channel.c,v
retrieving revision 1.73.2.10
diff -u -r1.73.2.10 channel.c
--- ircd/channel.c      14 Sep 2002 20:44:32 -0000      1.73.2.10
+++ ircd/channel.c      16 Oct 2002 00:03:43 -0000
@@ -408,6 +408,7 @@
                      struct Membership* member)
 {
   struct SLink* tmp;
+  char          tmphost[HOSTLEN + 1];
   char          nu_host[NUH_BUFSIZE];
   char          nu_realhost[NUH_BUFSIZE];
   char          nu_ip[NUI_BUFSIZE];
@@ -423,11 +424,19 @@

   s = make_nick_user_host(nu_host, cli_name(cptr),
(cli_user(cptr))->username,
                          (cli_user(cptr))->host);
-  if (HasHiddenHost(cptr))
-    sr = make_nick_user_host(nu_realhost, cli_name(cptr),
-                            (cli_user(cptr))->username,
-                            cli_user(cptr)->realhost);
-
+  if (cli_flags(cptr) & FLAGS_ACCOUNT) {
+     if (HasHiddenHost(cptr))
+        sr = make_nick_user_host(nu_realhost, cli_name(cptr),
+                                cli_user(cptr)->username,
+                                cli_user(cptr)->realhost);
+     else {
+        ircd_snprintf(0, tmphost, HOSTLEN, "%s.%s",
+                      cli_user(cptr)->account,
feature_str(FEAT_HIDDEN_HOST));
+        sr = make_nick_user_host(nu_realhost, cli_name(cptr),
+                                 cli_user(cptr)->username,
+                                 tmphost);
+     }
+  }
   for (tmp = chptr->banlist; tmp; tmp = tmp->next) {
     if ((tmp->flags & CHFL_BAN_IPMASK)) {
       if (!ip_s)

<--- snip snip ----




Reply via email to