diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-10 23:19:43 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-10 23:19:43 +0000 |
commit | b37a253d962ed7af1ea7a328abf2a1af74f30759 (patch) | |
tree | a43660b037c817393f7b4ab75071fe4f380f1058 /include | |
parent | f9636a2eff46f6829bf9e01c711ab1ba45a7d50a (diff) |
Note: FOR THE MOMENT, this is BROKEN. It wont run right until im done.
Changed Parameter for modules from Server* to InspIRCd*.
TODO: Move remaining Server* Modules into InspIRCd* and remove class Server.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4859 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r-- | include/modules.h | 8 | ||||
-rw-r--r-- | include/u_listmode.h | 8 |
2 files changed, 9 insertions, 7 deletions
diff --git a/include/modules.h b/include/modules.h index 6e326e00b..b67462515 100644 --- a/include/modules.h +++ b/include/modules.h @@ -356,14 +356,16 @@ enum Implementation { I_OnUserConnect, I_OnUserQuit, I_OnUserDisconnect, I_OnUse */ class Module : public Extensible { + protected: + InspIRCd* ServerInstance; public: /** Default constructor * Creates a module class. - * @param Me An instance of the Server class which can be saved for future use + * @param Me An instance of the InspIRCd class which will be saved into ServerInstance for your use * \exception ModuleException Throwing this class, or any class derived from ModuleException, causes loading of the module to abort. */ - Module(Server* Me); + Module(InspIRCd* Me); /** Default destructor * destroys a module class @@ -1628,7 +1630,7 @@ class ModuleFactory : public classbase * Your inherited class of ModuleFactory must return a pointer to your Module class * using this method. */ - virtual Module * CreateModule(Server* Me) = 0; + virtual Module * CreateModule(InspIRCd* Me) = 0; }; diff --git a/include/u_listmode.h b/include/u_listmode.h index 8e1b9e335..bd5bde74c 100644 --- a/include/u_listmode.h +++ b/include/u_listmode.h @@ -9,6 +9,7 @@ #include "channels.h" #include "modules.h" #include "helperfuncs.h" +#include "wildcard.h" #include "inspircd.h" /* $ModDesc: Provides support for easily creating listmodes, stores the time set, the user, and a parameter. */ @@ -48,7 +49,6 @@ typedef std::vector<ListLimit> limitlist; class ListModeBase : public ModeHandler { protected: - Server* Srv; std::string infokey; std::string listnumeric; std::string endoflistnumeric; @@ -58,8 +58,8 @@ class ListModeBase : public ModeHandler limitlist chanlimits; public: - ListModeBase(InspIRCd* Instance, Server* serv, char modechar, const std::string &eolstr, const std::string &lnum, const std::string &eolnum, bool autotidy, const std::string &ctag = "banlist") - : ModeHandler(Instance, modechar, 1, 1, true, MODETYPE_CHANNEL, false), Srv(serv), listnumeric(lnum), endoflistnumeric(eolnum), endofliststring(eolstr), tidy(autotidy), configtag(ctag) + ListModeBase(InspIRCd* Instance, char modechar, const std::string &eolstr, const std::string &lnum, const std::string &eolnum, bool autotidy, const std::string &ctag = "banlist") + : ModeHandler(Instance, modechar, 1, 1, true, MODETYPE_CHANNEL, false), listnumeric(lnum), endoflistnumeric(eolnum), endofliststring(eolstr), tidy(autotidy), configtag(ctag) { this->DoRehash(); infokey = "exceptionbase_mode_" + std::string(1, mode) + "_list"; @@ -173,7 +173,7 @@ class ListModeBase : public ModeHandler for (limitlist::iterator it = chanlimits.begin(); it != chanlimits.end(); it++) { - if (Srv->MatchText(channel->name, it->mask)) + if (match(channel->name, it->mask.c_str())) { // We have a pattern matching the channel... maxsize = el->size(); |