diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-07 22:30:45 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-07 22:30:45 +0000 |
commit | ef30d86d11696bb7ca639ae7a156a0c91d396cdb (patch) | |
tree | b7d22016abb3dfe129dec88ca83ec273a6ae8967 | |
parent | 7317c9184ca0d0aa6d34c7812f637b44ddfd6a74 (diff) |
Add extra stuff for w00t, AutoApplyToUserList method for XLineFactory
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9409 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | include/xline.h | 2 | ||||
-rw-r--r-- | src/xline.cpp | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/include/xline.h b/include/xline.h index 2670f4bab..d1fe0e882 100644 --- a/include/xline.h +++ b/include/xline.h @@ -415,6 +415,8 @@ class CoreExport XLineFactory : public classbase */ virtual XLine* Generate(time_t set_time, long duration, const char* source, const char* reason, const char* xline_specific_mask) = 0; + virtual bool AutoApplyToUserList(XLine* x) { return true; } + /** Destructor */ virtual ~XLineFactory() { } diff --git a/src/xline.cpp b/src/xline.cpp index 7ce6c3f0a..c964ec962 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -158,7 +158,13 @@ bool XLineManager::AddLine(XLine* line, User* user) return false; /*ELine* item = new ELine(ServerInstance, ServerInstance->Time(), duration, source, reason, ih.first.c_str(), ih.second.c_str());*/ - pending_lines.push_back(line); + XLineFactory* xlf = GetFactory(line->type); + if (!xlf) + return false; + + if (xlf->AutoApplyToUserList(line)) + pending_lines.push_back(line); + lookup_lines[line->type][line->Displayable()] = line; line->OnAdd(); |