mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-04 02:03:13 +02:00
Module devs: Add priorities for command overrides.
Use: CmdoverrideAddEx(module, name, priority, function) Suggested by Gottem in https://bugs.unrealircd.org/view.php?id=5143 ..and needed by some upcoming stuff.
This commit is contained in:
@@ -702,6 +702,7 @@ extern Command *CommandAdd(Module *module, char *cmd, int (*func)(aClient *cptr,
|
||||
extern void CommandDel(Command *command);
|
||||
extern int CommandExists(char *name);
|
||||
extern Cmdoverride *CmdoverrideAdd(Module *module, char *cmd, int (*func)(Cmdoverride *ovr, aClient *cptr, aClient *sptr, int parc, char *parv[]));
|
||||
extern Cmdoverride *CmdoverrideAddEx(Module *module, char *name, int priority, int (*func)(Cmdoverride *ovr, aClient *cptr, aClient *sptr, int parc, char *parv[]));
|
||||
extern void CmdoverrideDel(Cmdoverride *ovr);
|
||||
extern int CallCmdoverride(Cmdoverride *ovr, aClient *cptr, aClient *sptr, int parc, char *parv[]);
|
||||
|
||||
|
||||
@@ -1704,6 +1704,7 @@ struct Command {
|
||||
|
||||
struct _cmdoverride {
|
||||
Cmdoverride *prev, *next;
|
||||
int priority;
|
||||
Module *owner;
|
||||
aCommand *command;
|
||||
int (*func)();
|
||||
|
||||
Reference in New Issue
Block a user