summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-05-05 02:49:32 -0400
committerAdam <Adam@anope.org>2013-05-05 02:49:32 -0400
commitee2dcf11b8ff6cad5af4895738f7fe17e3baa9ee (patch)
treee3d7b9024f3d65b2b2ba069f3208b6b244de0346
parente91de41278ff5993973999e4e5095360612ec056 (diff)
Cache timeoutcheck and fix a typo in example.conf
-rw-r--r--data/example.conf2
-rw-r--r--include/config.h2
-rw-r--r--src/config.cpp1
-rw-r--r--src/main.cpp2
4 files changed, 5 insertions, 2 deletions
diff --git a/data/example.conf b/data/example.conf
index 82be8c9b5..9c492e5e7 100644
--- a/data/example.conf
+++ b/data/example.conf
@@ -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"
diff --git a/include/config.h b/include/config.h
index ca09c347f..6fb1c244f 100644
--- a/include/config.h
+++ b/include/config.h
@@ -93,6 +93,8 @@ namespace Configuration
bool DefPrivmsg;
/* Default language */
Anope::string DefLanguage;
+ /* options:timeoutcheck */
+ time_t TimeoutCheck;
/* either "/msg " or "/" */
Anope::string StrictPrivmsg;
diff --git a/src/config.cpp b/src/config.cpp
index 38e072de8..96ed47917 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -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)
{
diff --git a/src/main.cpp b/src/main.cpp
index 12fc1335c..99174279b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -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;