diff options
author | Peter Powell <petpow@saberuk.com> | 2013-07-10 14:11:58 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2013-08-10 14:04:09 +0100 |
commit | a2720d169743cda1b7812b28f79a34fd33802e72 (patch) | |
tree | 2e7e3b0ceac70b224cda73cee62b6a70eca6db8e /src | |
parent | 28190fc82a9aefba5edfba7ddcef34a878775311 (diff) |
Prevent servers from ulining themselves.
Almost every single case I have seen where this has been done has
been an accident.
Diffstat (limited to 'src')
-rw-r--r-- | src/configreader.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp index 005b156ed..2dbd6e606 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -462,6 +462,10 @@ void ServerConfig::Fill() std::string server; if (!tag->readString("server", server)) throw CoreException("<uline> tag missing server at " + tag->getTagLocation()); + + if (ServerName == server) + throw CoreException("Servers should not uline themselves (at " + tag->getTagLocation() + ")"); + ulines[assign(server)] = tag->getBool("silent"); } |