diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-01 13:29:11 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-01 13:29:11 +0000 |
commit | 63188bd3fe5bdfa9221a3d4feda6294e6193a91e (patch) | |
tree | ccffe15f918be458326a8df54bed4a4933f9b81f /src/inspircd.cpp | |
parent | 1078718b3c90e9653ffb1d92054c7740abf11356 (diff) |
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
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
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); } } |