diff options
| author | 2010-08-24 13:09:49 -0400 | |
|---|---|---|
| committer | 2010-08-24 13:10:53 -0400 | |
| commit | b97c3a0cfdbd492f2dadb3a4fa5e8dc91d5eb80b (patch) | |
| tree | d3cc91bd811fc051c132b7b4cbd921d08b515df2 /src/modules/m_autoop.cpp | |
| parent | Clarify GnuTLS error messages on files not found (diff) | |
| download | inspircd++-b97c3a0cfdbd492f2dadb3a4fa5e8dc91d5eb80b.tar.gz inspircd++-b97c3a0cfdbd492f2dadb3a4fa5e8dc91d5eb80b.tar.bz2 inspircd++-b97c3a0cfdbd492f2dadb3a4fa5e8dc91d5eb80b.zip | |
Recheck autoop lists upon account login
Diffstat (limited to 'src/modules/m_autoop.cpp')
| -rw-r--r-- | src/modules/m_autoop.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/modules/m_autoop.cpp b/src/modules/m_autoop.cpp index 48a89f0d5..9d648a88c 100644 --- a/src/modules/m_autoop.cpp +++ b/src/modules/m_autoop.cpp @@ -12,6 +12,7 @@ */ #include "inspircd.h" +#include "account.h" #include "opflags.h" #include "u_listmode.h" @@ -88,8 +89,8 @@ public: ServerInstance->Modules->AddService(mh); ServerInstance->AddCommand(&cmd); - Implementation list[] = { I_OnPostJoin }; - ServerInstance->Modules->Attach(list, this, 1); + Implementation list[] = { I_OnPostJoin, I_OnEvent }; + ServerInstance->Modules->Attach(list, this, 2); } void DoAutoop(Membership* memb) @@ -140,6 +141,17 @@ public: DoAutoop(memb); } + void OnEvent(Event& event) + { + if(event.id == "account_login"){ + AccountEvent& acct_event = static_cast<AccountEvent&>(event); + if(!IS_LOCAL(acct_event.user)) return; + std::vector<std::string> params; + for (UCListIter v = acct_event.user->chans.begin(); v != acct_event.user->chans.end(); ++v) + DoAutoop(&*v); + } + } + void ReadConfig(ConfigReadStatus&) { mh.DoRehash(); |
