From 63188bd3fe5bdfa9221a3d4feda6294e6193a91e Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 1 Apr 2004 13:29:11 +0000 Subject: Fixed issue where /connect crashes the ircd if no default routes defined git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@348 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/inspircd.cpp') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 23d32c830..996a1ee88 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -3550,9 +3550,16 @@ void handle_stats(char **parameters, int pcnt, userrec *user) void handle_connect(char **parameters, int pcnt, userrec *user) { WriteServ(user->fd,"NOTICE %s :*** Connecting to %s port %s...",user->nick,parameters[0],parameters[1]); - if (!me[defaultRoute]->BeginLink(parameters[0],atoi(parameters[1]),"password")) + if (me[defaultRoute]) { - WriteServ(user->fd,"NOTICE %s :*** Failed to send auth packet to %s!",user->nick,parameters[0]); + if (!me[defaultRoute]->BeginLink(parameters[0],atoi(parameters[1]),"password")) + { + WriteServ(user->fd,"NOTICE %s :*** Failed to send auth packet to %s!",user->nick,parameters[0]); + } + } + else + { + WriteServ(user->fd,"NOTICE %s :No default route is defined for server connections on this server",user->nick); } } -- cgit v1.2.3