]> jfr.im git - irc/quakenet/newserv.git/commitdiff
Add name to authext authname structure.
authorChris Porter <redacted>
Wed, 6 Aug 2008 23:21:05 +0000 (00:21 +0100)
committerChris Porter <redacted>
Wed, 6 Aug 2008 23:21:05 +0000 (00:21 +0100)
authext/authext.c
authext/authext.h

index 54f71e726f0a6880f0c556e5d1fb1bc810b8e5fa..2451a6227bfddc4675ae88a890ea5bf0ee29764c 100644 (file)
@@ -5,6 +5,7 @@
 #include "../lib/irc_string.h"
 #include "../nick/nick.h"
 #include "../core/hooks.h"
+#include "../lib/strlfunc.h"
 
 #include <string.h>
 #include <stdio.h>
@@ -126,7 +127,7 @@ authname *findauthnamebyname(const char *name) {
     return NULL;
 
   for (anp=authnametablebyname[authnamehashbyname(name)];anp;anp=(authname *)anp->nextbyname)
-    if (!ircd_strcmp(anp->nicks->authname, name))
+    if (!ircd_strcmp(anp->name, name))
       return anp;
 
   return NULL;
@@ -145,6 +146,7 @@ authname *findorcreateauthname(unsigned long userid, const char *name) {
 
   anp=newauthname();
   anp->userid=userid;
+  strlcpy(anp->name, name, sizeof(anp->name));
   anp->usercount=0;
   anp->marker=0;
   anp->flags=0;
index 0e9a7f6f916c72cfdc44401d2fd8e7b134befb26..adc022058553519a821b0d7ff2ec39a1f171382b 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef __AUTHEXT_H
 #define __AUTHEXT_H
 
+#include "../irc/irc_config.h"
 #include "../lib/flags.h"
 
 #define MAXAUTHNAMEEXTS 5
@@ -15,6 +16,7 @@ typedef struct authname {
   struct authname *next, *nextbyname;
   unsigned int namebucket;
   flag_t flags;
+  char name[ACCOUNTLEN+1];
   /* These are extensions only used by other modules */
   void *exts[MAXAUTHNAMEEXTS];
 } authname;