mirror of
https://github.com/anope/anope.git
synced 2026-07-04 02:43:12 +02:00
Cache timeoutcheck and fix a typo in example.conf
This commit is contained in:
+1
-1
@@ -22,7 +22,7 @@
|
||||
* }
|
||||
*
|
||||
* Note that nameless blocks are allowed and are often used with comments to allow
|
||||
* easially commenting an entire block, for example:
|
||||
* easialy commenting an entire block, for example:
|
||||
* #foobar
|
||||
* {
|
||||
* moo = "cow"
|
||||
|
||||
@@ -93,6 +93,8 @@ namespace Configuration
|
||||
bool DefPrivmsg;
|
||||
/* Default language */
|
||||
Anope::string DefLanguage;
|
||||
/* options:timeoutcheck */
|
||||
time_t TimeoutCheck;
|
||||
|
||||
/* either "/msg " or "/" */
|
||||
Anope::string StrictPrivmsg;
|
||||
|
||||
@@ -187,6 +187,7 @@ Conf::Conf() : Block("")
|
||||
this->DefPrivmsg = std::find(defaults.begin(), defaults.end(), "msg") != defaults.end();
|
||||
}
|
||||
this->DefLanguage = options->Get<const Anope::string &>("defaultlanguage");
|
||||
this->TimeoutCheck = options->Get<time_t>("timeoutcheck");
|
||||
|
||||
for (int i = 0; i < this->CountBlock("uplink"); ++i)
|
||||
{
|
||||
|
||||
+1
-1
@@ -157,7 +157,7 @@ int main(int ac, char **av, char **envp)
|
||||
Log(LOG_DEBUG_2) << "Top of main loop";
|
||||
|
||||
/* Process timers */
|
||||
if (Anope::CurTime - last_check >= Config->GetBlock("options")->Get<time_t>("timeoutcheck"))
|
||||
if (Anope::CurTime - last_check >= Config->TimeoutCheck)
|
||||
{
|
||||
TimerManager::TickTimers(Anope::CurTime);
|
||||
last_check = Anope::CurTime;
|
||||
|
||||
Reference in New Issue
Block a user