1
0
mirror of https://github.com/anope/anope.git synced 2026-06-26 13:56:38 +02:00

Do not crash if a user is introduced with a nonexistant server

This commit is contained in:
Adam
2011-02-09 13:25:28 -05:00
parent d26a19b41d
commit 36d3fd1710
+5 -3
View File
@@ -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);