]> jfr.im git - irc/unrealircd/unrealircd.git/commitdiff
- Added Command *CommandAdd_Alias(Module *module, char *cmd, char *tok, int
authorstskeeps <redacted>
Fri, 22 Jun 2007 12:44:13 +0000 (12:44 +0000)
committerstskeeps <redacted>
Fri, 22 Jun 2007 12:44:13 +0000 (12:44 +0000)
  (*func)(aClient*, aClient*, int, char**, char *sentcmd), unsigned char
  params, int flags), which will add a command that gets the command that
  the user sent along in sentcmd

Changes
include/modules.h
src/api-command.c
u4modules/Velcro.module

diff --git a/Changes b/Changes
index 4cdcc11a17e3497692590b2cbb6fe4a8f64c9997..b799327559566e21703770af7f04e94a3d37776f 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1817,3 +1817,7 @@ MOTDs
   problem with overwriting during install
 - Added -b flag to install in make install, so src/ircd, INSTALL_CONFS,
   src/modules/*.so and *.pem is backed up to name~ if already exists
+- Added Command *CommandAdd_Alias(Module *module, char *cmd, char *tok, int
+  (*func)(aClient*, aClient*, int, char**, char *sentcmd), unsigned char
+  params, int flags), which will add a command that gets the command that
+  the user sent along in "sentcmd". 
index a17c32e4c32ea2a92b394dd04fc4ad83a25c15b0..42fcbaf855665c8545141fc0c496caee0b8190a6 100644 (file)
@@ -604,6 +604,7 @@ extern Efunction    *EfunctionAddMain(Module *module, int eftype, int (*intfunc)(),
 extern Efunction       *EfunctionDel(Efunction *cb);
 
 Command *CommandAdd(Module *module, char *cmd, char *tok, int (*func)(aClient*, aClient*, int, char**), unsigned char params, int flags);
+Command *CommandAdd_Alias(Module *module, char *cmd, char *tok, int (*func)(aClient*, aClient*, int, char**, char *sentcmd), unsigned char params, int flags);
 void CommandDel(Command *command);
 int CommandExists(char *name);
 Cmdoverride *CmdoverrideAdd(Module *module, char *cmd, iFP function);
index 7c505a0d3ee5bcab0af2b97ff52ac74af7b03197..3aa1378571addffdc7334ce66706cb46535c8cc9 100644 (file)
@@ -43,6 +43,11 @@ int CommandExists(char *name)
        return 0;
 }
 
+Command *CommandAdd_Alias(Module *module, char *cmd, char *tok, int (*func)(aClient *cptr, aClient *sptr, int parc, char *parv[], char *sentcmd), unsigned char params, int flags) {
+       return CommandAdd(module, cmd, tok, (iFP) func, params, flags|M_ALIAS);
+}
+
+
 Command *CommandAdd(Module *module, char *cmd, char *tok, int (*func)(), unsigned char params, int flags) {
        Command *command;
 
index 7865e1d2cfddff252ba39057182b87aeeaa34443..aad09c9afb4e1117eb749a422558518080e395b3 100644 (file)
@@ -59,6 +59,8 @@ class Velcro
        std::map<std::string, void *> modules;  
        bool isModuleLoaded(const char *module);
        bool isModuleLoading(const char *module);       
+
+       
 };
 
 implementation: