From bde6c20f52319b6c7405518af5ec3f751fccd527 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 27 Aug 2007 19:31:13 +0000 Subject: 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 --- src/users.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/users.cpp') 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++; -- cgit v1.2.3