Esempio n. 1
0
bool TS3::Init()
{
	_nickname = GetRawConfigValue("Teamspeak.Name");
	if (_nickname.empty())
		_nickname = "Unseen\\svoice";

	_channelID = easy_stoll(_botPtr->GetRawConfigValue("Teamspeak.Channel"));

	StartServerQueryClient();
	return true;
}
Esempio n. 2
0
RSSWatcher::RSSWatcher(LemonBot *bot)
	: LemonHandler("rss", bot)
{
	_feeds.init("rss");

	auto updateRate = easy_stoll(GetRawConfigValue("RSS.UpdateSeconds"));

	if (updateRate <= 0)
	{
		LOG(WARNING) << "Invalid RSS update rate, defaulting to 1 hour";
		updateRate = 60 * 60;
	}

	_updateSecondsMax = updateRate;

	UpdateFeeds();

	_updateThread = std::thread(&UpdateThread, this);
}