]> jfr.im git - irc/evilnet/x3.git/commitdiff
send commands to LOC users now
authorsirvulcan <redacted>
Mon, 21 Nov 2005 04:59:23 +0000 (04:59 +0000)
committersirvulcan <redacted>
Mon, 21 Nov 2005 04:59:23 +0000 (04:59 +0000)
src/hash.h
src/nickserv.c
src/nickserv.h
src/proto-p10.c

index 04af66d02d2dcd2a87f12494e91eeacdeb2a52fa..d53ebdfc1bc7c65ca4212042600243b2aa0826dc 100644 (file)
@@ -128,6 +128,7 @@ struct userNode {
     char numeric[COMBO_NUMERIC_LEN+1];
     unsigned int num_local : 18;
 #endif
+    unsigned int loc;             /* Is user connecting via LOC? */
     unsigned int dead : 1;        /* Is user waiting to be recycled? */
     struct in_addr ip;            /* User's IP address */
     long modes;                   /* user flags +isw etc... */
index fe50e2ceb6d0877622b98df93b4b840156fab360..623010b9ca69d7beca162436d6ef8f69a6c37a3f 100644 (file)
@@ -906,6 +906,17 @@ apply_fakehost(struct handle_info *handle)
         assign_fakehost(target, fake, 1);
 }
 
+void send_func_list(struct userNode *user)
+{
+    unsigned int n;
+    struct handle_info *old_info;
+
+    old_info = user->handle_info;
+
+    for (n=0; n<auth_func_used; n++)
+        auth_func_list[n](user, old_info);
+}
+
 static void
 set_user_handle_info(struct userNode *user, struct handle_info *hi, int stamp)
 {
@@ -949,7 +960,8 @@ set_user_handle_info(struct userNode *user, struct handle_info *hi, int stamp)
     if (GetUserH(user->nick)) {
         for (n=0; n<auth_func_used; n++)
             auth_func_list[n](user, old_info);
-    }
+    } else
+      user->loc = 1;
 
     if (hi) {
         struct nick_info *ni;
index b2b9b7dd8900ec2f4361ef3856617fa98ebbc1a9..93d66fb172efdab09bd880777fcb0f330fd5bbf8 100644 (file)
@@ -159,4 +159,6 @@ void reg_allowauth_func(allowauth_func_t func);
 typedef void (*failpw_func_t)(struct userNode *user, struct handle_info *handle);
 void reg_failpw_func(failpw_func_t func);
 
+void send_func_list(struct userNode *user);
+
 #endif
index 1f82782f63b0b679ac8fa0936fb28917594acced..8ccc8e9aca306ee9a40dc8b73c1af27c3d992821 100644 (file)
@@ -18,6 +18,7 @@
  * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
  */
 
+#include "nickserv.h"
 #include "chanserv.h"
 #include "proto-common.c"
 
@@ -2091,6 +2092,10 @@ AddUser(struct server* uplink, const char *nick, const char *ident, const char *
     for (n=0; n<nuf_used; n++)
         if (nuf_list[n](uNode))
             break;
+
+    if ((uNode->loc == 1) && (uNode->handle_info))
+        send_func_list(uNode);
+
     return uNode;
 }