|
|||
|
|||
|
#include <u_listmode.h>
Inheritance diagram for ListModeBase:


Public Member Functions | |
| ListModeBase (InspIRCd *Instance, char modechar, const std::string &eolstr, unsigned int lnum, unsigned int eolnum, bool autotidy, const std::string &ctag="banlist") | |
| Constructor. | |
| std::pair< bool, std::string > | ModeSet (User *, User *, Channel *channel, const std::string ¶meter) |
| See mode.h. | |
| virtual void | DisplayList (User *user, Channel *channel) |
| Display the list for this mode. | |
| virtual void | DisplayEmptyList (User *user, Channel *channel) |
| If your mode is a listmode, this method will be called to display an empty list (just the end of list numeric). | |
| virtual void | RemoveMode (Channel *channel, irc::modestacker *stack) |
| Remove all instances of the mode from a channel. | |
| virtual void | RemoveMode (User *, irc::modestacker *stack) |
| See mode.h. | |
| virtual void | DoRehash () |
| Perform a rehash of this mode's configuration data. | |
| virtual void | DoImplements (Module *m) |
| Populate the Implements list with the correct events for a List Mode. | |
| virtual ModeAction | OnModeChange (User *source, User *, Channel *channel, std::string ¶meter, bool adding, bool servermode) |
| Handle the list mode. | |
| virtual std::string & | GetInfoKey () |
| Get Extensible key for this mode. | |
| virtual void | DoChannelDelete (Channel *chan) |
| Handle channel deletion. | |
| virtual void | DoSyncChannel (Channel *chan, Module *proto, void *opaque) |
| Syncronize channel item list with another server. | |
| virtual void | DoCleanup (int, void *) |
| Clean up module on unload. | |
| virtual bool | ValidateParam (User *, Channel *, std::string &) |
| Validate parameters. | |
| virtual bool | TellListTooLong (User *, Channel *, std::string &) |
| Tell the user the list is too long. | |
| virtual void | TellAlreadyOnList (User *, Channel *, std::string &) |
| Tell the user an item is already on the list. | |
| virtual void | TellNotSet (User *, Channel *, std::string &) |
| Tell the user that the parameter is not in the list. | |
| virtual const char * | DoOnRequest (Request *request) |
Protected Attributes | |
| std::string | infokey |
| Storage key. | |
| unsigned int | listnumeric |
| Numeric to use when outputting the list. | |
| unsigned int | endoflistnumeric |
| Numeric to indicate end of list. | |
| std::string | endofliststring |
| String to send for end of list. | |
| bool | tidy |
| Automatically tidy up entries. | |
| std::string | configtag |
| Config tag to check for max items per channel. | |
| limitlist | chanlimits |
| Limits on a per-channel basis read from the tag specified in ListModeBase::configtag. | |
Definition at line 107 of file u_listmode.h.
|
||||||||||||||||||||||||||||||||
|
Constructor.
Definition at line 143 of file u_listmode.h. References DoRehash(), infokey, and ModeHandler::mode. |
|
||||||||||||
|
If your mode is a listmode, this method will be called to display an empty list (just the end of list numeric).
Reimplemented from ModeHandler. Definition at line 187 of file u_listmode.h. References endoflistnumeric, endofliststring, Channel::name, User::nick, and User::WriteNumeric(). |
|
||||||||||||
|
Display the list for this mode.
Reimplemented from ModeHandler. Definition at line 173 of file u_listmode.h. References InspIRCd::Config, endoflistnumeric, endofliststring, Extensible::GetExt(), infokey, listnumeric, Channel::name, User::nick, ModeHandler::ServerInstance, ServerConfig::ServerName, and User::WriteNumeric(). |
|
|
Handle channel deletion. See modules.h.
Definition at line 402 of file u_listmode.h. References Extensible::GetExt(), infokey, and Extensible::Shrink(). Referenced by ModuleInviteException::OnChannelDelete(), ModuleChanFilter::OnChannelDelete(), and ModuleBanException::OnChannelDelete(). |
|
||||||||||||
|
Clean up module on unload.
Definition at line 445 of file u_listmode.h. Referenced by ModuleInviteException::OnCleanup(), ModuleChanFilter::OnCleanup(), and ModuleBanException::OnCleanup(). |
|
|
Populate the Implements list with the correct events for a List Mode.
Definition at line 266 of file u_listmode.h. References ModuleManager::Attach(), I_OnChannelDelete, I_OnCleanup, I_OnRehash, I_OnRequest, I_OnSyncChannel, InspIRCd::Modules, and ModeHandler::ServerInstance. Referenced by ModuleBanException::ModuleBanException(), ModuleChanFilter::ModuleChanFilter(), and ModuleInviteException::ModuleInviteException(). |
|
|
Definition at line 493 of file u_listmode.h. References ListModeRequest::chan, ListModeRequest::extban, Extensible::GetExt(), User::GetFullHost(), User::GetFullRealHost(), Request::GetId(), GetInfoKey(), User::GetIPString(), User::ident, ListModeRequest::literal, InspIRCd::Match(), InspIRCd::MatchCIDR(), User::nick, and ListModeRequest::user. Referenced by ModuleInviteException::OnRequest(), ModuleChanFilter::OnRequest(), and ModuleBanException::OnRequest(). |
|
|
Perform a rehash of this mode's configuration data.
Definition at line 239 of file u_listmode.h. References chanlimits, Conf, configtag, ConfigReader::Enumerate(), ListLimit::limit, ListLimit::mask, ConfigReader::ReadInteger(), ConfigReader::ReadValue(), and ModeHandler::ServerInstance. Referenced by ListModeBase(), ModuleInviteException::OnRehash(), ModuleChanFilter::OnRehash(), and ModuleBanException::OnRehash(). |
|
||||||||||||||||
|
Syncronize channel item list with another server. See modules.h
Definition at line 420 of file u_listmode.h. References Extensible::GetExt(), irc::stringjoiner::GetJoined(), irc::modestacker::GetStackedLine(), infokey, ModeHandler::mode, Module::ProtoSendMode(), irc::modestacker::Push(), ModeHandler::ServerInstance, and TYPE_CHANNEL. Referenced by ModuleInviteException::OnSyncChannel(), ModuleChanFilter::OnSyncChannel(), and ModuleBanException::OnSyncChannel(). |
|
|
Get Extensible key for this mode.
Definition at line 393 of file u_listmode.h. References infokey. Referenced by DoOnRequest(), ModuleBanException::OnCheckBan(), ModuleBanException::OnCheckExtBan(), ModuleInviteException::OnCheckInvite(), ModuleBanException::OnCheckStringExtBan(), and ModuleChanFilter::ProcessMessages(). |
|
||||||||||||||||||||
|
See mode.h.
Reimplemented from ModeHandler. Definition at line 152 of file u_listmode.h. References Extensible::GetExt(), and infokey. |
|
||||||||||||||||||||||||||||
|
Handle the list mode. See mode.h Reimplemented from ModeHandler. Definition at line 275 of file u_listmode.h. References chanlimits, ModeParser::CleanMask(), InspIRCd::Config, Extensible::Extend(), Extensible::GetExt(), infokey, IS_LOCAL, ListItem::mask, InspIRCd::Match(), MODEACTION_ALLOW, MODEACTION_DENY, Channel::name, User::nick, ListItem::nick, ModeHandler::ServerInstance, ServerConfig::ServerName, Extensible::Shrink(), stringtime(), TellAlreadyOnList(), TellListTooLong(), TellNotSet(), ListItem::time, ValidateParam(), and User::WriteNumeric(). |
|
||||||||||||
|
See mode.h.
Reimplemented from ModeHandler. Definition at line 232 of file u_listmode.h. |
|
||||||||||||
|
Remove all instances of the mode from a channel. See mode.h
Reimplemented from ModeHandler. Definition at line 196 of file u_listmode.h. References Extensible::GetExt(), irc::modestacker::GetStackedLine(), infokey, Channel::name, irc::modestacker::Push(), and ModeHandler::ServerInstance. |
|
||||||||||||||||
|
Tell the user an item is already on the list. Overridden by implementing module.
Reimplemented in ChanFilter. Definition at line 479 of file u_listmode.h. Referenced by OnModeChange(). |
|
||||||||||||||||
|
Tell the user the list is too long. Overridden by implementing module.
Reimplemented in ChanFilter. Definition at line 468 of file u_listmode.h. Referenced by OnModeChange(). |
|
||||||||||||||||
|
Tell the user that the parameter is not in the list. Overridden by implementing module.
Reimplemented in ChanFilter. Definition at line 489 of file u_listmode.h. Referenced by OnModeChange(). |
|
||||||||||||||||
|
Validate parameters. Overridden by implementing module.
Reimplemented in ChanFilter. Definition at line 456 of file u_listmode.h. Referenced by OnModeChange(). |
|
|
Limits on a per-channel basis read from the tag specified in ListModeBase::configtag.
Definition at line 131 of file u_listmode.h. Referenced by DoRehash(), and OnModeChange(). |
|
|
Config tag to check for max items per channel.
Definition at line 127 of file u_listmode.h. Referenced by DoRehash(). |
|
|
Numeric to indicate end of list.
Definition at line 118 of file u_listmode.h. Referenced by DisplayEmptyList(), and DisplayList(). |
|
|
String to send for end of list.
Definition at line 121 of file u_listmode.h. Referenced by DisplayEmptyList(), and DisplayList(). |
|
|
Storage key.
Definition at line 112 of file u_listmode.h. Referenced by DisplayList(), DoChannelDelete(), DoSyncChannel(), GetInfoKey(), ListModeBase(), ModeSet(), OnModeChange(), and RemoveMode(). |
|
|
Numeric to use when outputting the list.
Definition at line 115 of file u_listmode.h. Referenced by DisplayList(). |
|
|
Automatically tidy up entries.
Definition at line 124 of file u_listmode.h. |