diff options
author | Adam <Adam@anope.org> | 2013-05-05 01:55:04 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-05-05 01:55:04 -0400 |
commit | 1d0bb9b26b7ad58ab0bf979ac046f4511b3bf12b (patch) | |
tree | 4486f0784bdf050fd7eb225c0cb9df352ce1f45a /src/main.cpp | |
parent | 781defb7076ddfddf723ca08cd0a518b6657b64f (diff) |
Rework the config file reader to be much more flexible and move many configuration directives to the actual modules they are used in.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index 059650df0..12fc1335c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -144,12 +144,12 @@ int main(int ac, char **av, char **envp) } catch (const SocketException &ex) { - Log(LOG_TERMINAL) << "Unable to connect to uplink #" << Anope::CurrentUplink << " (" << Config->Uplinks[Anope::CurrentUplink]->host << ":" << Config->Uplinks[Anope::CurrentUplink]->port << "): " << ex.GetReason(); + Log(LOG_TERMINAL) << "Unable to connect to uplink #" << (Anope::CurrentUplink + 1) << " (" << Config->Uplinks[Anope::CurrentUplink].host << ":" << Config->Uplinks[Anope::CurrentUplink].port << "): " << ex.GetReason(); } /* Set up timers */ time_t last_check = Anope::CurTime; - UpdateTimer updateTimer(Config->UpdateTimeout); + UpdateTimer updateTimer(Config->GetBlock("options")->Get<time_t>("updatetimeout")); /*** Main loop. ***/ while (!Anope::Quitting) @@ -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->TimeoutCheck) + if (Anope::CurTime - last_check >= Config->GetBlock("options")->Get<time_t>("timeoutcheck")) { TimerManager::TickTimers(Anope::CurTime); last_check = Anope::CurTime; |