diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-02 13:45:36 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-02 13:45:36 +0000 |
commit | 50d72df64f3e34659fde678eceeb4e6bd9e55821 (patch) | |
tree | 5acf9c8b85761c9829300a9aff2591da8c1b6195 /include/modules.h | |
parent | 2ad5f8c30ff22e7546d83f3bb56787adfbf5e95c (diff) |
Added ability to override modes (allows SAMODE support etc)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@355 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/modules.h')
-rw-r--r-- | include/modules.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/include/modules.h b/include/modules.h index b26554d56..82f6e6466 100644 --- a/include/modules.h +++ b/include/modules.h @@ -36,6 +36,7 @@ typedef file_cache string_list; #define FOREACH_MOD for (int i = 0; i <= MODCOUNT; i++) modules[i]-> extern void createcommand(char* cmd, handlerfunc f, char flags, int minparams); +extern void server_mode(char **parameters, int pcnt, userrec *user); // class Version holds the version information of a Module, returned // by Module::GetVersion (thanks RD) @@ -151,7 +152,8 @@ class Module : public classbase * If the mode is not a channel mode, chanrec* chan is null, and should not be read from or written to. */ virtual bool OnExtendedMode(userrec* user, chanrec* chan, char modechar, int type, bool mode_on, string_list ¶ms); - + + }; @@ -291,6 +293,24 @@ class Server : public classbase */ virtual void AddCommand(char* cmd, handlerfunc f, char flags, int minparams); + /** Sends a servermode. + * you must format the parameters array with the target, modes and parameters for those modes. + * + * For example: + * + * char modes[3][MAXBUF]; + * modes[0] = ChannelName; + * modes[1] = "+o"; + * modes[2] = user->nick; + * Srv->SendMode(modes,3,user); + * + * The modes will originate from the server where the command was issued, however responses (e.g. numerics) + * will be sent to the user you provide as the third parameter. + * You must be sure to get the number of parameters correct in the pcnt parameter otherwise you could leave + * your server in an unstable state! + */ + + virtual void SendMode(char **parameters, int pcnt, userrec *user); }; /** Allows reading of values from configuration files |