Do not send +r usermode to auth-on-connect users.
authorMichael Poole <mdpoole@troilus.org>
Tue, 10 Jan 2006 02:06:36 +0000 (02:06 +0000)
committerMichael Poole <mdpoole@troilus.org>
Tue, 10 Jan 2006 02:06:36 +0000 (02:06 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1609 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/s_user.c

index 641e62ef402fa4bed622c7265e8045c5380aee1b..17b73b8e2c4fbc64931e71a9b76c68e9c850c0e6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-01-09  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/s_user.c (register_user): Do not send +r flag to user when
+       they first connect.
+
 2006-01-09  Michael Poole <mdpoole@troilus.org>
 
        * include/ircd_features.h (FEAT_ZANNELS): Actually, put it back.
index 7d9faaf3d5b41c951c6813ccf76561a061fc42d1..d0a621732ca70ee26d73085a9816916620f775db 100644 (file)
@@ -690,6 +690,13 @@ int register_user(struct Client *cptr, struct Client *sptr,
   if (MyUser(sptr))
   {
     static struct Flags flags; /* automatically initialized to zeros */
+    /* To avoid sending +r to the client due to auth-on-connect, set
+     * the "old" FLAG_ACCOUNT bit to match the client's value.
+     */
+    if (IsAccount(cptr))
+      FlagSet(&flags, FLAG_ACCOUNT);
+    else
+      FlagClr(&flags, FLAG_ACCOUNT);
     send_umode(cptr, sptr, &flags, ALL_UMODES);
     if ((cli_snomask(sptr) != SNO_DEFAULT) && HasFlag(sptr, FLAG_SERVNOTICE))
       send_reply(sptr, RPL_SNOMASK, cli_snomask(sptr), cli_snomask(sptr));