diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-19 20:46:35 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-19 20:46:35 +0000 |
commit | 484cb43c21aafa489634f9137428da8c5a8461b1 (patch) | |
tree | f3e9f9fe242b8fa0e07a6e25a246dfc289c4948d /src | |
parent | c1f1f982e8af92f633db150a26caa8b4d1fbdb01 (diff) |
Throws exception on failed GetIOHook()
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3257 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/inspircd_io.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
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: <server:name> '%s' is not a fully-qualified domain name. Changed to '%s\.'",Config->ServerName,Config->ServerName); + log(DEFAULT,"WARNING: <server:name> '%s' is not a fully-qualified domain name. Changed to '%s%c'",Config->ServerName,Config->ServerName,'.'); strlcat(Config->ServerName,".",MAXBUF); } if (!Config->dns_timeout) |