make new lobby-bot configurable
This commit is contained in:
@@ -48,7 +48,7 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly)
|
|||||||
myQtToolsInterface = CreateQtToolsWrapper();
|
myQtToolsInterface = CreateQtToolsWrapper();
|
||||||
|
|
||||||
// !!!! Revisionsnummer der Configdefaults !!!!!
|
// !!!! Revisionsnummer der Configdefaults !!!!!
|
||||||
configRev = 70;
|
configRev = 71;
|
||||||
|
|
||||||
//standard defaults
|
//standard defaults
|
||||||
logOnOffDefault = "1";
|
logOnOffDefault = "1";
|
||||||
@@ -221,7 +221,14 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly)
|
|||||||
configList.push_back(ConfigInfo("AdminIRCChannel", CONFIG_TYPE_STRING, "#test"));
|
configList.push_back(ConfigInfo("AdminIRCChannel", CONFIG_TYPE_STRING, "#test"));
|
||||||
configList.push_back(ConfigInfo("AdminIRCChannelPassword", CONFIG_TYPE_STRING, ""));
|
configList.push_back(ConfigInfo("AdminIRCChannelPassword", CONFIG_TYPE_STRING, ""));
|
||||||
configList.push_back(ConfigInfo("AdminIRCServerUseIpv6", CONFIG_TYPE_INT, "0"));
|
configList.push_back(ConfigInfo("AdminIRCServerUseIpv6", CONFIG_TYPE_INT, "0"));
|
||||||
configList.push_back(ConfigInfo("AdminIRCServerNick", CONFIG_TYPE_INT, "PokerTH"));
|
configList.push_back(ConfigInfo("AdminIRCServerNick", CONFIG_TYPE_INT, "PokerTH_Admin"));
|
||||||
|
configList.push_back(ConfigInfo("UseLobbyIRC", CONFIG_TYPE_INT, "0"));
|
||||||
|
configList.push_back(ConfigInfo("LobbyIRCServerAddress", CONFIG_TYPE_STRING, "chat.freenode.net"));
|
||||||
|
configList.push_back(ConfigInfo("LobbyIRCServerPort", CONFIG_TYPE_INT, "6667"));
|
||||||
|
configList.push_back(ConfigInfo("LobbyIRCChannel", CONFIG_TYPE_STRING, "#pokerth-lobby"));
|
||||||
|
configList.push_back(ConfigInfo("LobbyIRCChannelPassword", CONFIG_TYPE_STRING, ""));
|
||||||
|
configList.push_back(ConfigInfo("LobbyIRCServerUseIpv6", CONFIG_TYPE_INT, "0"));
|
||||||
|
configList.push_back(ConfigInfo("LobbyIRCServerNick", CONFIG_TYPE_INT, "PokerTH_Lobby"));
|
||||||
configList.push_back(ConfigInfo("UseChatCleaner", CONFIG_TYPE_INT, "0"));
|
configList.push_back(ConfigInfo("UseChatCleaner", CONFIG_TYPE_INT, "0"));
|
||||||
configList.push_back(ConfigInfo("ChatCleanerHostAddress", CONFIG_TYPE_STRING, "localhost"));
|
configList.push_back(ConfigInfo("ChatCleanerHostAddress", CONFIG_TYPE_STRING, "localhost"));
|
||||||
configList.push_back(ConfigInfo("ChatCleanerPort", CONFIG_TYPE_INT, "4327"));
|
configList.push_back(ConfigInfo("ChatCleanerPort", CONFIG_TYPE_INT, "4327"));
|
||||||
|
|||||||
+9
-6
@@ -289,16 +289,19 @@ void Session::startNetworkServer()
|
|||||||
myConfig->readConfigString("AdminIRCServerNick"),
|
myConfig->readConfigString("AdminIRCServerNick"),
|
||||||
myConfig->readConfigString("AdminIRCChannel"),
|
myConfig->readConfigString("AdminIRCChannel"),
|
||||||
myConfig->readConfigString("AdminIRCChannelPassword"));
|
myConfig->readConfigString("AdminIRCChannelPassword"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (myConfig->readConfigInt("UseLobbyIRC"))
|
||||||
|
{
|
||||||
tmpIrcLobbyThread = boost::shared_ptr<IrcThread>(new IrcThread(&myNetServer->GetLobbyBot()));
|
tmpIrcLobbyThread = boost::shared_ptr<IrcThread>(new IrcThread(&myNetServer->GetLobbyBot()));
|
||||||
|
|
||||||
tmpIrcLobbyThread->Init(
|
tmpIrcLobbyThread->Init(
|
||||||
myConfig->readConfigString("AdminIRCServerAddress"),
|
myConfig->readConfigString("LobbyIRCServerAddress"),
|
||||||
myConfig->readConfigInt("AdminIRCServerPort"),
|
myConfig->readConfigInt("LobbyIRCServerPort"),
|
||||||
myConfig->readConfigInt("AdminIRCServerUseIpv6") == 1,
|
myConfig->readConfigInt("LobbyIRCServerUseIpv6") == 1,
|
||||||
myConfig->readConfigString("AdminIRCServerNick"),
|
myConfig->readConfigString("LobbyIRCServerNick"),
|
||||||
myConfig->readConfigString("AdminIRCChannel"),
|
myConfig->readConfigString("LobbyIRCChannel"),
|
||||||
myConfig->readConfigString("AdminIRCChannelPassword"));
|
myConfig->readConfigString("LobbyIRCChannelPassword"));
|
||||||
}
|
}
|
||||||
|
|
||||||
myNetServer->Init(
|
myNetServer->Init(
|
||||||
|
|||||||
Reference in New Issue
Block a user