From 75d690dda144486f6d0463cfc5f6ff398712267f Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 14 Apr 2005 15:56:17 +0000 Subject: Added ability for modules to hold users in a 'holding pattern' while they do stuff on connect git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1088 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/inspircd.h | 2 +- src/commands.cpp | 4 ++-- src/inspircd.cpp | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/inspircd.h b/include/inspircd.h index b7a5b7104..88b9eb22f 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -52,7 +52,7 @@ #define ERROR -1 #define TRUE 1 #define FALSE 0 -#define IDENTMAX 9 +#define IDENTMAX 12 #define MAXSOCKS 64 // maximum lengths of items diff --git a/src/commands.cpp b/src/commands.cpp index fb10243d0..635000974 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -1130,7 +1130,6 @@ void handle_user(char **parameters, int pcnt, userrec *user) WriteServ(user->fd,"461 %s USER :Not enough parameters",user->nick); } else { - WriteServ(user->fd,"NOTICE Auth :No ident response, ident prefixed with ~"); strcpy(user->ident,"~"); /* we arent checking ident... but these days why bother anyway? */ strlcat(user->ident,parameters[0],IDENTMAX); strlcpy(user->fullname,parameters[3],128); @@ -1146,6 +1145,7 @@ void handle_user(char **parameters, int pcnt, userrec *user) if (user->registered == 3) { /* user is registered now, bit 0 = USER command, bit 1 = sent a NICK command */ + FOREACH_MOD OnUserRegister(user); ConnectUser(user); } } @@ -1764,11 +1764,11 @@ void handle_nick(char **parameters, int pcnt, userrec *user) user->dns_done = (!lookup_dns(user->nick)); if (user->dns_done) log(DEBUG,"Aborting dns lookup of %s because dns server experienced a failure.",user->nick); - FOREACH_MOD OnUserRegister(user); } if (user->registered == 3) { /* user is registered now, bit 0 = USER command, bit 1 = sent a NICK command */ + FOREACH_MOD OnUserRegister(user); ConnectUser(user); } if (user->registered == 7) diff --git a/src/inspircd.cpp b/src/inspircd.cpp index cc4ccd35c..fa88ecdc4 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -2334,7 +2334,7 @@ void AddClient(int socket, char* host, int port, bool iscached, char* ip) strncpy(clientlist[tempnick]->host, host,160); strncpy(clientlist[tempnick]->dhost, host,160); strncpy(clientlist[tempnick]->server, ServerName,256); - strncpy(clientlist[tempnick]->ident, "unknown",9); + strncpy(clientlist[tempnick]->ident, "unknown",12); clientlist[tempnick]->registered = 0; clientlist[tempnick]->signon = TIME+dns_timeout; clientlist[tempnick]->lastping = 1; @@ -3929,12 +3929,14 @@ int InspIRCd(void) } if ((TIME > count2->second->signon) && (count2->second->registered == 3) && (AllModulesReportReady(count2->second))) { + log(DEBUG,"signon exceed, registered=3, and modules ready, OK"); count2->second->dns_done = true; FullConnectUser(count2->second); goto label; } if ((count2->second->dns_done) && (count2->second->registered == 3) && (AllModulesReportReady(count2->second))) // both NICK and USER... and DNS { + log(DEBUG,"dns done, registered=3, and modules ready, OK"); FullConnectUser(count2->second); goto label; } -- cgit v1.2.3