summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-01 22:11:22 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-01 22:11:22 +0000
commitfca2a3c8ea88ecfefd3bfb729bcdcdb674bbe946 (patch)
treebbf962e30e47c0f30b30a471ad6e315c34992efc /src/inspircd.cpp
parent7f4395d336c331dd434bca91b6273c072f26e1bc (diff)
Attempts to fix some random crashes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@943 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp11
1 files changed, 6 insertions, 5 deletions
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<std::string> module_names;
extern std::vector<ircd_module*> factory;
std::vector<int> fd_reap;
-std::vector<userrec*> pending_connects;
+std::vector<std::string> 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<userrec*>::iterator i = pending_connects.begin(); i <= pending_connects.end(); i++)
+ for (std::vector<std::string>::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);
}
}