From fca2a3c8ea88ecfefd3bfb729bcdcdb674bbe946 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 1 Apr 2005 22:11:22 +0000 Subject: Attempts to fix some random crashes git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@943 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/inspircd.cpp') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 5a16c9851..18b220e18 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -98,7 +98,7 @@ std::vector module_names; extern std::vector factory; std::vector fd_reap; -std::vector pending_connects; +std::vector pending_connects; extern int MODCOUNT; @@ -1056,7 +1056,7 @@ void strlower(char *n) /* Find a user record by nickname and return a pointer to it */ -userrec* Find(string nick) +userrec* Find(std::string nick) { user_hash::iterator iter = clientlist.find(nick); @@ -2442,9 +2442,10 @@ void HandlePendingConnects() { if (pending_connects.size()) { - for (std::vector::iterator i = pending_connects.begin(); i <= pending_connects.end(); i++) + for (std::vector::iterator i = pending_connects.begin(); i <= pending_connects.end(); i++) { - userrec* a = *i; + std::string t = *i; + userrec* a = Find(t); if (a) { // this user's dns is done now. @@ -2478,7 +2479,7 @@ void ConnectUser(userrec *user) else { // add them to the pending queue - pending_connects.push_back(user); + pending_connects.push_back(user->nick); } } -- cgit v1.2.3