#include <xline.h>
Inherits Service.
Inherited by SGLineManager, SNLineManager, and SQLineManager.

Public Member Functions | |
| XLineManager (Module *creator, const Anope::string &name, char t) | |
| virtual | ~XLineManager () |
| const char & | Type () |
| size_t | GetCount () const |
| const std::vector< XLine * > & | GetList () const |
| void | AddXLine (XLine *x) |
| bool | DelXLine (XLine *x) |
| XLine * | GetEntry (unsigned index) |
| void | Clear () |
| bool | CanAdd (CommandSource &source, const Anope::string &mask, time_t expires, const Anope::string &reason) |
| XLine * | HasEntry (const Anope::string &mask) |
| XLine * | CheckAllXLines (User *u) |
| virtual bool | Check (User *u, const XLine *x)=0 |
| virtual void | OnMatch (User *u, XLine *x)=0 |
| virtual void | OnExpire (const XLine *x) |
| virtual void | Send (User *u, XLine *x)=0 |
| virtual void | SendDel (XLine *x)=0 |
Static Public Member Functions | |
| static void | RegisterXLineManager (XLineManager *xlm) |
| static void | UnregisterXLineManager (XLineManager *xlm) |
| static void | CheckAll (User *u) |
| static Anope::string | GenerateUID () |
Static Public Attributes | |
| static std::list< XLineManager * > | XLineManagers |
Private Attributes | |
| char | type |
| Serialize::Checker < std::vector< XLine * > > | xlines |
Static Private Attributes | |
| static Serialize::Checker < std::multimap< Anope::string, XLine *, ci::less > > | XLinesByUID |
Definition at line 50 of file xline.h.
| XLineManager::XLineManager | ( | Module * | creator, | |
| const Anope::string & | name, | |||
| char | t | |||
| ) |
| XLineManager::~XLineManager | ( | ) | [virtual] |
| void XLineManager::AddXLine | ( | XLine * | x | ) |
Add an entry to this XLineManager
| x | The entry |
Definition at line 277 of file xline.cpp.
References Anope::string::empty(), XLine::id, XLine::manager, xlines, and XLinesByUID.
Referenced by LoadOper(), LoadOperInfo(), CommandOSSQLine::OnAdd(), CommandOSSNLine::OnAdd(), UnrealIRCdProto::SendAkill(), InspIRCd12Proto::SendAkill(), InspIRCdProto::SendAkill(), HybridProto::SendAkill(), and BahamutIRCdProto::SendAkill().
| bool XLineManager::CanAdd | ( | CommandSource & | source, | |
| const Anope::string & | mask, | |||
| time_t | expires, | |||
| const Anope::string & | reason | |||
| ) |
Checks if a mask can/should be added to the XLineManager
| source | The source adding the mask. | |
| mask | The mask | |
| expires | When the mask would expire | |
| reason | the reason |
Definition at line 335 of file xline.cpp.
References _, Anope::string::c_str(), DelXLine(), Anope::string::equals_ci(), XLine::expires, GetCount(), GetEntry(), XLine::mask, Anope::Match(), XLine::reason, and CommandSource::Reply().
Referenced by CommandOSSNLine::OnAdd().
Check a user against an xline
| u | The user | |
| x | The xline |
Implemented in SGLineManager, SQLineManager, and SNLineManager.
Referenced by CheckAllXLines(), CommandOSSQLine::OnAdd(), and CommandOSSNLine::OnAdd().
| void XLineManager::CheckAll | ( | User * | u | ) | [static] |
Check a user against all known XLineManagers Wparam u The user
Definition at line 211 of file xline.cpp.
References CheckAllXLines(), OnMatch(), and XLineManagers.
Referenced by OperServCore::OnUserConnect().
Check a user against all of the xlines in this XLineManager
| u | The user |
Definition at line 406 of file xline.cpp.
References Check(), Anope::CurTime, DelXLine(), XLine::expires, OnExpire(), OnMatch(), and xlines.
Referenced by CheckAll(), and OperServCore::OnUserNickChange().
| void XLineManager::Clear | ( | ) |
Clear the XLine vector Note: This does not remove the XLines from the IRCd
Definition at line 323 of file xline.cpp.
References Anope::string::empty(), XLine::id, xlines, and XLinesByUID.
Referenced by OperServCore::~OperServCore(), and ~XLineManager().
| bool XLineManager::DelXLine | ( | XLine * | x | ) |
Delete an entry from this XLineManager
| x | The entry |
Definition at line 285 of file xline.cpp.
References Anope::string::empty(), XLine::id, SendDel(), xlines, and XLinesByUID.
Referenced by CanAdd(), CheckAllXLines(), SXLineDelCallback::DoDel(), CommandOSSXLineBase::OnClear(), and XLine::Unserialize().
| Anope::string XLineManager::GenerateUID | ( | ) | [static] |
Generate a unique ID for this XLine
Definition at line 227 of file xline.cpp.
References Anope::string::clear(), LOG_DEBUG, and XLinesByUID.
Referenced by OSSession::AddSession(), ProxyConnect::Ban(), CommandOSAKill::DoAdd(), CommandOSChanKill::Execute(), LoadOper(), LoadOperInfo(), CommandOSSQLine::OnAdd(), CommandOSSNLine::OnAdd(), DNSBLResolver::OnLookupComplete(), and OSDefcon::OnUserConnect().
| size_t XLineManager::GetCount | ( | ) | const |
Get the number of XLines in this XLineManager
Definition at line 267 of file xline.cpp.
References xlines.
Referenced by CanAdd(), and DBPlain::OnSaveDatabase().
| XLine * XLineManager::GetEntry | ( | unsigned | index | ) |
Gets an entry by index
| index | The index |
Definition at line 313 of file xline.cpp.
References Serializable::QueueUpdate(), and xlines.
Referenced by CanAdd(), SXLineDelCallback::HandleNumber(), CommandOSSXLineBase::OnClear(), DBPlain::OnSaveDatabase(), and CommandOSSXLineBase::ProcessList().
| const std::vector< XLine * > & XLineManager::GetList | ( | ) | const |
Get the XLine vector
Definition at line 272 of file xline.cpp.
References xlines.
Referenced by SQLineManager::CheckChannel().
| XLine * XLineManager::HasEntry | ( | const Anope::string & | mask | ) |
Checks if this list has an entry
| mask | The mask |
Definition at line 382 of file xline.cpp.
References Anope::string::equals_ci(), XLine::mask, Serializable::QueueUpdate(), xlines, and XLinesByUID.
Referenced by CommandOSSXLineBase::OnDel(), UnrealIRCdProto::SendAkill(), InspIRCd12Proto::SendAkill(), InspIRCdProto::SendAkill(), HybridProto::SendAkill(), and BahamutIRCdProto::SendAkill().
| void XLineManager::OnExpire | ( | const XLine * | x | ) | [virtual] |
Called when an XLine expires
| x | The xline |
Reimplemented in SGLineManager, SQLineManager, and SNLineManager.
Definition at line 429 of file xline.cpp.
Referenced by CheckAllXLines().
Called when a user matches a xline in this XLineManager
| u | The user | |
| x | The XLine they match |
Implemented in SGLineManager, SQLineManager, and SNLineManager.
Referenced by CheckAll(), and CheckAllXLines().
| void XLineManager::RegisterXLineManager | ( | XLineManager * | xlm | ) | [static] |
Register a XLineManager, places it in XLineManagers for use in XLineManager::CheckAll It is important XLineManagers are registered in the proper order. Eg, if you had one akilling clients and one handing them free olines, you would want the akilling one first. This way if a client matches an entry on both of the XLineManagers, they would be akilled.
| xlm | THe XLineManager |
Definition at line 198 of file xline.cpp.
References XLineManagers.
Referenced by OperServCore::OperServCore().
Called to send an XLine to the IRCd
| u | The user, if we know it | |
| x | The xline |
Implemented in SGLineManager, SQLineManager, and SNLineManager.
Referenced by CommandOSSQLine::OnAdd(), and CommandOSSNLine::OnAdd().
| virtual void XLineManager::SendDel | ( | XLine * | x | ) | [pure virtual] |
Called to remove an XLine from the IRCd
| x | The XLine |
Implemented in SGLineManager, SQLineManager, and SNLineManager.
Referenced by DelXLine().
| const char & XLineManager::Type | ( | ) |
The type of xline provided by this service
Definition at line 262 of file xline.cpp.
References type.
Referenced by LoadOper(), LoadOperInfo(), and DBPlain::OnSaveDatabase().
| void XLineManager::UnregisterXLineManager | ( | XLineManager * | xlm | ) | [static] |
Unregister a XLineManager
| xlm | The XLineManager |
Definition at line 203 of file xline.cpp.
References XLineManagers.
Referenced by OperServCore::~OperServCore().
char XLineManager::type [private] |
std::list< XLineManager * > XLineManager::XLineManagers [static] |
Definition at line 59 of file xline.h.
Referenced by CheckAll(), LoadOper(), LoadOperInfo(), DBPlain::OnSaveDatabase(), RegisterXLineManager(), and UnregisterXLineManager().
Serialize::Checker<std::vector<XLine *> > XLineManager::xlines [private] |
Definition at line 54 of file xline.h.
Referenced by AddXLine(), CheckAllXLines(), Clear(), DelXLine(), GetCount(), GetEntry(), GetList(), and HasEntry().
Serialize::Checker< std::multimap< Anope::string, XLine *, ci::less > > XLineManager::XLinesByUID [static, private] |
Definition at line 56 of file xline.h.
Referenced by AddXLine(), Clear(), DelXLine(), GenerateUID(), and HasEntry().
1.7.1