summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-27 19:31:13 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-27 19:31:13 +0000
commitbde6c20f52319b6c7405518af5ec3f751fccd527 (patch)
treeeae81599da61327010c709069d1f00e9f686892a
parent18ea9418c4948123f7e4f58879b2f60dff7ba6c8 (diff)
Catch exceptions here for duplicate uuid (it shouldnt happen, which is why the exception message is so rediculous)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7914 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/users.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 35a0e716f..4856ebc38 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -873,7 +873,17 @@ void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached,
/* NOTE: Calling this one parameter constructor for userrec automatically
* allocates a new UUID and places it in the hash_map.
*/
- userrec* New = new userrec(Instance);
+ userrec* New = NULL;
+ try
+ {
+ New = new userrec(Instance);
+ }
+ catch (CoreException &e)
+ {
+ Instance->Log(DEFAULT,"*** WTF *** Duplicated UUID! -- Crack smoking monkies have been unleashed.");
+ return;
+ }
+
int j = 0;
Instance->unregistered_count++;