]> jfr.im git - solanum.git/blobdiff - ircd/s_user.c
ircd: implement EXTENDCHANS, based on ircd-seven (with some improvements from chatircd)
[solanum.git] / ircd / s_user.c
index 77577bf18604c8fc6aa237217511b0b23a59d4ca..55a0bb557771e4250e7d6d9ff78c12e724c5a856 100644 (file)
@@ -868,6 +868,12 @@ report_and_set_user_flags(struct Client *source_p, struct ConfItem *aconf)
                SetExemptShide(source_p);
                sendto_one_notice(source_p, ":*** You are exempt from serverhiding");
        }
+
+       if(IsConfExtendChans(aconf))
+       {
+               SetExtendChans(source_p);
+               sendto_one_notice(source_p, ":*** You are exempt from normal channel limits");
+       }
 }
 
 static void
@@ -1309,6 +1315,7 @@ oper_up(struct Client *source_p, struct oper_conf *oper_p)
 
        Count.oper++;
 
+       SetExtendChans(source_p);
        SetExemptKline(source_p);
 
        source_p->flags2 |= oper_p->flags;
@@ -1500,7 +1507,9 @@ change_nick_user_host(struct Client *target_p,    const char *nick, const char *use
                                        target_p->username, target_p->host);
        }
 
-       rb_strlcpy(target_p->username, user, sizeof target_p->username);
+       if (user != target_p->username)
+               rb_strlcpy(target_p->username, user, sizeof target_p->username);
+
        rb_strlcpy(target_p->host, host, sizeof target_p->host);
 
        if (changed)