diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-07 17:04:04 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-07 17:04:04 +0000 |
commit | 211b24ba8cf6e21f435f145b0366adc8a3b62460 (patch) | |
tree | 8119f965d57ad163f57c220ff8e11ca772184419 /include/modules.h | |
parent | e4a08d44617d8b46f58a0e110ffcf7f8df29a56f (diff) |
Started work on /UNLOADMODULE, resource tracking and flags in Version class
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@999 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/modules.h')
-rw-r--r-- | include/modules.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/modules.h b/include/modules.h index 9b2118472..b1f505e29 100644 --- a/include/modules.h +++ b/include/modules.h @@ -96,7 +96,7 @@ typedef std::deque<userrec*> chanuserlist; // ********************************************************************************************* -extern void createcommand(char* cmd, handlerfunc f, char flags, int minparams); +extern void createcommand(char* cmd, handlerfunc f, char flags, int minparams, char* source); extern void server_mode(char **parameters, int pcnt, userrec *user); // class Version holds the version information of a Module, returned @@ -109,8 +109,8 @@ extern void server_mode(char **parameters, int pcnt, userrec *user); class Version : public classbase { public: - const int Major, Minor, Revision, Build; - Version(int major, int minor, int revision, int build); + const int Major, Minor, Revision, Build, Flags; + Version(int major, int minor, int revision, int build, int flags); }; /** Holds /ADMIN data @@ -545,8 +545,11 @@ class Server : public classbase * than the 'minparams' value you specified when creating the command. The *user parameter is the class of * the user which caused the command to trigger, who will always have the flag you specified in 'flags' when * creating the initial command. For example to create an oper only command create the commands with flags='o'. + * The source parameter is used for resource tracking, and should contain the name of your module (with file + * extension) e.g. "m_blarp.so". If you place the wrong identifier here, you can cause crashes if your module + * is unloaded. */ - virtual void AddCommand(char* cmd, handlerfunc f, char flags, int minparams); + virtual void AddCommand(char* cmd, handlerfunc f, char flags, int minparams, char* source); /** Sends a servermode. * you must format the parameters array with the target, modes and parameters for those modes. |