]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/modcmd.c
About time I added myself to the credits
[irc/evilnet/x3.git] / src / modcmd.c
index 84cb36d337ebfb302e15af552221f8b64b070f95..6800e1afc5d9a53dc169f152928ecf57db720f13 100644 (file)
@@ -608,7 +608,9 @@ svccmd_expand_alias(struct svccmd *cmd, struct userNode *user, unsigned int old_
         if (arg[1] == '$') {
             new_argv[new_argc++] = arg + 1;
         } else if (isdigit(arg[1])) {
-            unsigned int lbound, ubound, jj;
+            unsigned int lbound = 0;
+            unsigned int ubound = 0;
+            unsigned int jj = 0;
             char *end_num;
 
             lbound = strtoul(arg+1, &end_num, 10);
@@ -691,6 +693,7 @@ svccmd_invoke_argv(struct userNode *user, struct service *service, struct chanNo
     struct svccmd *cmd;
     unsigned int cmd_arg, perms, flags, options, result;
     char channel_name[CHANNELLEN+1];
+    char *new_argv[MAXNUMPARAMS]; /* for aliases */
 
     options = (server_qualified ? SVCCMD_QUALIFIED : 0) | SVCCMD_DEBIT | SVCCMD_NOISY;
     /* Find the command argument. */
@@ -754,7 +757,6 @@ svccmd_invoke_argv(struct userNode *user, struct service *service, struct chanNo
 
     /* Expand the alias arguments, if there are any. */
     if (cmd->alias.used) {
-        char *new_argv[MAXNUMPARAMS];
         int res;
 
         res = svccmd_expand_alias(cmd, user, argc, argv, new_argv);
@@ -808,8 +810,11 @@ svccmd_invoke_argv(struct userNode *user, struct service *service, struct chanNo
         safestrncpy(channel_name, channel->name, sizeof(channel_name));
     else
         channel_name[0] = 0;
-    if (!(result = cmd->command->func(user, channel, argc, argv, cmd)))
+
+    /* Call the function here */
+    if (!(result = cmd->command->func(user, channel, argc, argv, cmd))) 
         return 0;
+
     if (!(flags & MODCMD_NO_LOG)) {
         enum log_severity slvl;
         if (result & CMD_LOG_OVERRIDE)
@@ -2055,7 +2060,7 @@ static MODCMD_FUNC(cmd_credits) {
     send_message_type(4, user, cmd->parent->bot, "OSI Certified is a certification mark of the Open Source Initiative.");
     send_message_type(4, user, cmd->parent->bot, "$b$b");
     send_message_type(4, user, cmd->parent->bot, "The srvx 1.3.x Development Team includes Paul Chang, Adrian Dewhurst, Miles Peterson, Michael Poole and others.");
-    send_message_type(4, user, cmd->parent->bot, "The X3 Development Team includes Alex Schumann, Reed Loden, Neil Spierling.");
+    send_message_type(4, user, cmd->parent->bot, "The X3 Development Team includes Alex Schumann, Reed Loden, Neil Spierling, Matthew Beeching.");
     send_message_type(4, user, cmd->parent->bot, "The X3 Development Team can be reached at http://evilnet.sourceforge.net or in #evilnet on irc.afternet.org.");
     send_message_type(4, user, cmd->parent->bot, "$b$b");
     send_message_type(4, user, cmd->parent->bot, "Thanks goes to ThiefMaster, Joe Hansche (joeatrr), Martijn Smit (wasted), and to any other people who have contributed to X3.");