diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-28 20:22:07 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-28 20:22:07 +0000 |
commit | 7972cc32495597ac411a51a40d41e0bb42f80a44 (patch) | |
tree | 169bcbe8024c5fb66032bd6a5c8581541815081e | |
parent | 3b6b04b1ee6ce0b9b5274def704170e6181236ec (diff) |
New system for client exits using CullList seems stable, needs testing
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2681 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | include/users.h | 5 | ||||
-rw-r--r-- | src/cmd_nick.cpp | 5 | ||||
-rw-r--r-- | src/cmd_user.cpp | 5 | ||||
-rw-r--r-- | src/userprocess.cpp | 3 | ||||
-rw-r--r-- | src/users.cpp | 15 |
5 files changed, 14 insertions, 19 deletions
diff --git a/include/users.h b/include/users.h index a5ec3191f..43150d169 100644 --- a/include/users.h +++ b/include/users.h @@ -27,6 +27,7 @@ #define __USERS_H__ #include "hashcomp.h" +#include "cull_list.h" #define STATUS_OP 4 #define STATUS_HOP 2 @@ -343,8 +344,8 @@ void kill_link(userrec *user,const char* r); void kill_link_silent(userrec *user,const char* r); void AddWhoWas(userrec* u); void AddClient(int socket, char* host, int port, bool iscached, char* ip); -void FullConnectUser(userrec* user); -void ConnectUser(userrec *user); +void FullConnectUser(userrec* user, CullList* Goners); +//void ConnectUser(userrec *user, CullList* Goners); userrec* ReHashNick(char* Old, char* New); void force_nickchange(userrec* user,const char* newnick); diff --git a/src/cmd_nick.cpp b/src/cmd_nick.cpp index fe600dc30..7b4ea1e98 100644 --- a/src/cmd_nick.cpp +++ b/src/cmd_nick.cpp @@ -49,7 +49,6 @@ using namespace std; #include "typedefs.h" #include "command_parse.h" #include "cmd_nick.h" -#include "cull_list.h" extern ServerConfig* Config; extern InspIRCd* ServerInstance; @@ -64,8 +63,6 @@ extern std::vector<userrec*> all_opers; extern std::vector<userrec*> local_users; extern userrec* fd_ref_table[65536]; -extern CullList* GlobalGoners; - void cmd_nick::Handle (char **parameters, int pcnt, userrec *user) { char oldnick[NICKMAX]; @@ -194,7 +191,7 @@ void cmd_nick::Handle (char **parameters, int pcnt, userrec *user) { /* user is registered now, bit 0 = USER command, bit 1 = sent a NICK command */ FOREACH_MOD(I_OnUserRegister,OnUserRegister(user)); - ConnectUser(user,GlobalGoners); + //ConnectUser(user,NULL); } if (user->registered == 7) { diff --git a/src/cmd_user.cpp b/src/cmd_user.cpp index 7aa64b092..3d1754af3 100644 --- a/src/cmd_user.cpp +++ b/src/cmd_user.cpp @@ -48,7 +48,6 @@ using namespace std; #include "typedefs.h" #include "command_parse.h" #include "cmd_user.h" -#include "cull_list.h" extern ServerConfig* Config; extern InspIRCd* ServerInstance; @@ -63,8 +62,6 @@ extern std::vector<userrec*> all_opers; extern std::vector<userrec*> local_users; extern userrec* fd_ref_table[65536]; -extern CullList* GlobalGoners; - void cmd_user::Handle (char **parameters, int pcnt, userrec *user) { log(DEBUG,"Handling USER from cmd_user class!"); @@ -95,7 +92,7 @@ void cmd_user::Handle (char **parameters, int pcnt, userrec *user) { /* user is registered now, bit 0 = USER command, bit 1 = sent a NICK command */ FOREACH_MOD(I_OnUserRegister,OnUserRegister(user)); - ConnectUser(user,GlobalGoners); + //ConnectUser(user,NULL); } } diff --git a/src/userprocess.cpp b/src/userprocess.cpp index 2398ff8fe..1acbb6547 100644 --- a/src/userprocess.cpp +++ b/src/userprocess.cpp @@ -283,11 +283,9 @@ bool DoBackgroundUserStuff(time_t TIME) if ((curr) && (curr->fd != 0)) /* XXX - why are we checking fd != 0? --w00t */ { - int currfd = curr->fd; // we don't check the state of remote users. if (IS_LOCAL(curr)) { - curr->FlushWriteBuf(); if (curr->GetWriteError() != "") { log(DEBUG,"InspIRCd: write error: %s",curr->GetWriteError().c_str()); @@ -329,6 +327,7 @@ bool DoBackgroundUserStuff(time_t TIME) curr->lastping = 0; curr->nping = TIME+curr->pingmax; // was hard coded to 120 } + curr->FlushWriteBuf(); } } } diff --git a/src/users.cpp b/src/users.cpp index bde0f99fd..4db6dedc5 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -35,6 +35,7 @@ using namespace std; #include "message.h" #include "wildcard.h" #include "xline.h" +#include "cull_list.h" extern InspIRCd* ServerInstance; extern int WHOWAS_STALE; @@ -717,14 +718,14 @@ void FullConnectUser(userrec* user, CullList* Goners) /* shows the message of the day, and any other on-logon stuff */ -void ConnectUser(userrec *user, CullList* Goners) -{ +//void ConnectUser(userrec *user) +//{ // dns is already done, things are fast. no need to wait for dns to complete just pass them straight on - if ((user->dns_done) && (user->registered >= 3) && (AllModulesReportReady(user))) - { - FullConnectUser(user, Goners); - } -} + //if ((user->dns_done) && (user->registered >= 3) && (AllModulesReportReady(user))) + //{ + // FullConnectUser(user, Goners); + //} +//} /* re-allocates a nick in the user_hash after they change nicknames, * returns a pointer to the new user as it may have moved */ |