summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarkus Mittendrein <git@maxmitti.tk>2016-06-15 22:50:13 +0200
committerMarkus Mittendrein <git@maxmitti.tk>2016-06-15 22:50:13 +0200
commit518e30840933c14989b5cc690acd899d1fa25c52 (patch)
tree2abe1554768f4886d0a6ac8eb3b43f0850b37cf2 /src
parentfbdd2ecae9ff47866dcd3cc7e2237debc3802c71 (diff)
downloadmanager-518e30840933c14989b5cc690acd899d1fa25c52.tar.gz
manager-518e30840933c14989b5cc690acd899d1fa25c52.zip
Allow setting CTCP VERSION-replay through config
Diffstat (limited to 'src')
-rw-r--r--src/CRSMConfig.hpp2
-rw-r--r--src/crsm.cpp4
2 files changed, 6 insertions, 0 deletions
diff --git a/src/CRSMConfig.hpp b/src/CRSMConfig.hpp
index fb06f31..5ecb158 100644
--- a/src/CRSMConfig.hpp
+++ b/src/CRSMConfig.hpp
@@ -72,6 +72,7 @@ public:
String QuitMessage = "Dedicated Clonk server powered by CRSM";
Integer ReconnectDelay = 10;
String ScenListMessage = "A list of available scenarios is available over DCC, ingame or in a lobby.";
+ String CtcpVersion = "Dedicated Clonk server powered by CRSM (unversioned)";
Map(String, String) Moderators;
} IRC;
@@ -163,6 +164,7 @@ public:
ConfigVal(IRC.QuitMessage),
ConfigVal(IRC.ReconnectDelay),
ConfigVal(IRC.ScenListMessage),
+ ConfigVal(IRC.CtcpVersion),
ConfigVal(IRC.Moderators),
diff --git a/src/crsm.cpp b/src/crsm.cpp
index c0d3d45..19dc775 100644
--- a/src/crsm.cpp
+++ b/src/crsm.cpp
@@ -1806,6 +1806,10 @@ void CRSM::applyConfig()
connection->sendCommand(IrcCommand::createJoin(Config.IRC.IngameChannel));
}
}
+ if(connection != nullptr)
+ {
+ connection->setCtcpReplies({{"VERSION", Config.IRC.CtcpVersion}});
+ }
}
else
{