opers now ignore nodelete
[srvx.git] / src / modcmd.c
index 873624439a3aff4712824f27f17810c6dac135ee..cb02c8f3a255aaff4bd901a6fbce6380047ff2f1 100644 (file)
@@ -721,10 +721,14 @@ 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];
+        char *old_argv[MAXNUMPARAMS];
         int res;
+        unsigned int nn;
+
+        for(nn=0;nn<argc;nn++)
+            old_argv[nn] = argv[nn];
 
-        res = svccmd_expand_alias(cmd, argc, argv, new_argv);
+        res = svccmd_expand_alias(cmd, argc, old_argv, argv);
         if (res < 0) {
             send_message(user, service->bot, "MSG_MISSING_PARAMS", cmd->name);
             return 0;
@@ -733,7 +737,6 @@ svccmd_invoke_argv(struct userNode *user, struct service *service, struct chanNo
             return 0;
         }
         argc = res;
-        argv = new_argv;
 
         /* Try again to grab a handle to the channel after alias
          * expansion, overwriting any previous channel. This should,
@@ -914,7 +917,7 @@ modcmd_privmsg(struct userNode *user, struct userNode *bot, const char *text, in
              * users, except to add copyright information pertaining
              * to changes you make to srvx.
              */
-            snprintf(response, sizeof(response), "\x01VERSION %s (%s) %s\x01", PACKAGE_STRING, CODENAME, git_version);
+            snprintf(response, sizeof(response), "\x01VERSION %s (%s) GIT Revision: %s\x01", PACKAGE_STRING, CODENAME, git_version);
             irc_notice_user(bot, user, response);
         }
         return;
@@ -1598,7 +1601,7 @@ static MODCMD_FUNC(cmd_stats_services) {
 
     if (argc < 2) {
         tbl.length = dict_size(services) + 1;
-        tbl.width = 4;
+        tbl.width = 5;
         tbl.flags = TABLE_PAD_LEFT;
         tbl.contents = calloc(tbl.length, sizeof(tbl.contents[0]));
         tbl.contents[0] = calloc(tbl.width, sizeof(tbl.contents[0][0]));
@@ -1606,6 +1609,7 @@ static MODCMD_FUNC(cmd_stats_services) {
         tbl.contents[0][1] = "Commands";
         tbl.contents[0][2] = "Priv'd?";
         tbl.contents[0][3] = "Trigger";
+        tbl.contents[0][4] = "Offchannel";
         extra = calloc(2, tbl.length);
         for (ii=1, it=dict_first(services); it; it=iter_next(it), ii++) {
             service = iter_data(it);
@@ -1615,6 +1619,7 @@ static MODCMD_FUNC(cmd_stats_services) {
             tbl.contents[ii][2] = service->privileged ? "yes" : "no";
             extra[ii*2] = service->trigger;
             tbl.contents[ii][3] = extra+ii*2;
+                       tbl.contents[ii][4] = offchannel_allowed[(unsigned char)service->trigger] ? "yes" : "no";
         }
         table_send(cmd->parent->bot, user->nick, 0, 0, tbl);
         free(extra);
@@ -1939,11 +1944,8 @@ static MODCMD_FUNC(cmd_version) {
      * command or its accessibility to normal IRC users, except to add
      * copyright information pertaining to changes you make to srvx.
      */
-    send_message_type(4, user, cmd->parent->bot, "$b"PACKAGE_STRING"$b ("CODENAME"), Built: "__DATE__", "__TIME__".  Copyright 2000-2008 srvx Development Team.");
-    if (argc > 1)
-        send_message_type(4, user, cmd->parent->bot, "%s", git_version);
-    else
-        send_message_type(12, user, cmd->parent->bot, "The srvx Development Team includes Paul Chang, Adrian Dewhurst, Miles Peterson, Michael Poole and others.\nThe srvx Development Team can be reached at http://sf.net/projects/srvx/ or in #srvx on irc.gamesurge.net.\nThis version has been modified by pk910 - visit #srvx @ irc.nextirc.net.");
+    send_message_type(4, user, cmd->parent->bot, "$b"PACKAGE_STRING"$b ("CODENAME"), GIT Revision: %s, Built: "__DATE__", "__TIME__".  Copyright 2000-2008 srvx Development Team.", git_version);
+    send_message_type(12, user, cmd->parent->bot, "The srvx Development Team includes Paul Chang, Adrian Dewhurst, Miles Peterson, Michael Poole and others.\nThe srvx Development Team can be reached at http://sf.net/projects/srvx/ or in #srvx on irc.gamesurge.net.\nThis version has been modified by pk910, Stricted, NurPech - visit #dev @ irc.nextirc.net.");
     return 1;
 }