diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-01 22:40:14 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-01 22:40:14 +0000 |
commit | 7b37009dca64565dbd0143035e8729b9b45ecc8b (patch) | |
tree | b19e4f90dd8d52370bf70e4e11bf76efe389b9bc | |
parent | fca2a3c8ea88ecfefd3bfb729bcdcdb674bbe946 (diff) |
Fixed nasty bugs.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@944 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/inspircd.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 18b220e18..cf1d8b9f9 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -98,7 +98,7 @@ std::vector<std::string> module_names; extern std::vector<ircd_module*> factory; std::vector<int> fd_reap; -std::vector<std::string> pending_connects; +std::string pending_connects[MAXBUF]; extern int MODCOUNT; @@ -2440,11 +2440,11 @@ void FullConnectUser(userrec* user) // handles any connects where DNS isnt done yet, times out stale dns queries on users, and lets completed queries connect. void HandlePendingConnects() { - if (pending_connects.size()) + for (long i = 0; i < MAXBUF; i++) { - for (std::vector<std::string>::iterator i = pending_connects.begin(); i <= pending_connects.end(); i++) + std::string t = pending_connects[i]; + if (t != "") { - std::string t = *i; userrec* a = Find(t); if (a) { @@ -2452,7 +2452,7 @@ void HandlePendingConnects() if ((a->dns_done) && (a->registered == 3)) { FullConnectUser(a); // attack! attack!.... - pending_connects.erase(i); + pending_connects[i] = ""; return; // ...RUN AWAY! RUN AWAY! } // this users dns is NOT done, but its timed out. @@ -2460,7 +2460,7 @@ void HandlePendingConnects() { WriteServ(a->fd,"NOTICE Auth :Failed to resolve your hostname, using your IP address instead."); FullConnectUser(a); - pending_connects.erase(i); + pending_connects[i] = ""; return; } } @@ -2479,7 +2479,11 @@ void ConnectUser(userrec *user) else { // add them to the pending queue - pending_connects.push_back(user->nick); + for (int i = 0; i < MAXBUF; i++) + { + pending_connects[i] = std::string(user->nick); + break; + } } } |