From 484cb43c21aafa489634f9137428da8c5a8461b1 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 19 Feb 2006 20:46:35 +0000 Subject: Throws exception on failed GetIOHook() git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3257 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd_io.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/inspircd_io.cpp b/src/inspircd_io.cpp index 5995115f5..f1be7bc22 100644 --- a/src/inspircd_io.cpp +++ b/src/inspircd_io.cpp @@ -82,7 +82,12 @@ bool ServerConfig::AddIOHook(int port, Module* iomod) IOHookModule[port] = iomod; return true; } - return false; + else + { + ModuleException err("Port already hooked by another module"); + throw(err); + return false; + } } bool ServerConfig::DelIOHook(int port) @@ -259,7 +264,7 @@ void ServerConfig::Read(bool bail, userrec* user) Config->dns_timeout = atoi(DNT); if (!strchr(Config->ServerName,'.')) { - log(DEFAULT,"WARNING: '%s' is not a fully-qualified domain name. Changed to '%s\.'",Config->ServerName,Config->ServerName); + log(DEFAULT,"WARNING: '%s' is not a fully-qualified domain name. Changed to '%s%c'",Config->ServerName,Config->ServerName,'.'); strlcat(Config->ServerName,".",MAXBUF); } if (!Config->dns_timeout) -- cgit v1.2.3