diff options
author | Adam <Adam@anope.org> | 2011-02-09 13:25:28 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-02-09 13:25:28 -0500 |
commit | 36d3fd171085baecce62ac52c2818734ee7bd1f4 (patch) | |
tree | c7aca0fdcbd7cb6ec5dd7fccd5cd51e70e9853b1 /src/users.cpp | |
parent | d26a19b41d52c5ac3233165359980d357a3bf121 (diff) |
Do not crash if a user is introduced with a nonexistant server
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/users.cpp b/src/users.cpp index d9a6149cf..9f1cc8404 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -690,10 +690,12 @@ User *do_nick(const Anope::string &source, const Anope::string &nick, const Anop { if (source.empty()) { - /* This is a new user; create a User structure for it. */ - Log(LOG_DEBUG) << "new user: " << nick; - Server *serv = Server::Find(server); + if (serv == NULL) + { + Log() << "User " << nick << " introduced with nonexistant server " << server << "!"; + return NULL; + } /* Allocate User structure and fill it in. */ dynamic_reference<User> user = new User(nick, username, host, uid); |