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:
+5
-3
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user