X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_conn_join.cpp;h=e5df97d9018bfac11dcb2ff057fd7d8b9e12a0e5;hb=1041cb9329027ea2b3855836e2bb68ab7411730f;hp=631e5945ce3623e658d07efd88e23e9f6112ca57;hpb=0babd8c0783242fc647cdcdfefb399c099e367ad;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_conn_join.cpp b/src/modules/m_conn_join.cpp index 631e5945c..e5df97d90 100644 --- a/src/modules/m_conn_join.cpp +++ b/src/modules/m_conn_join.cpp @@ -43,7 +43,7 @@ class JoinTimer : public Timer public: JoinTimer(LocalUser* u, SimpleExtItem& ex, const std::string& chans, unsigned int delay) - : Timer(delay, ServerInstance->Time(), false) + : Timer(delay, false) , user(u), channels(chans), ext(ex) { ServerInstance->Timers.AddTimer(this); @@ -66,7 +66,8 @@ class ModuleConnJoin : public Module unsigned int defdelay; public: - ModuleConnJoin() : ext("join_timer", this) + ModuleConnJoin() + : ext("join_timer", ExtensionItem::EXT_USER, this) { } @@ -74,10 +75,10 @@ class ModuleConnJoin : public Module { ConfigTag* tag = ServerInstance->Config->ConfValue("autojoin"); defchans = tag->getString("channel"); - defdelay = tag->getInt("delay", 0, 0, 60); + defdelay = tag->getDuration("delay", 0, 0, 60*15); } - void Prioritize() + void Prioritize() CXX11_OVERRIDE { ServerInstance->Modules->SetPriority(this, I_OnPostConnect, PRIORITY_LAST); } @@ -94,7 +95,7 @@ class ModuleConnJoin : public Module return; std::string chanlist = localuser->GetClass()->config->getString("autojoin"); - unsigned int chandelay = localuser->GetClass()->config->getInt("autojoindelay", 0, 0, 60); + unsigned int chandelay = localuser->GetClass()->config->getDuration("autojoindelay", 0, 0, 60*15); if (chanlist.empty()) {