Get rid of remaining tabs and replace them with spaces.
[srvx.git] / src / modcmd.c
index f1720f2e1b7ae76b16fca6d68be9542bae4cf3ca..c8e5128477e2b5f51b497cd185d40680e036bf70 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
  */
 
-#include "arch-version.h"
+#include "git-version.h"
 #include "chanserv.h"
 #include "conf.h"
 #include "modcmd.h"
@@ -626,7 +626,7 @@ int
 svccmd_invoke_argv(struct userNode *user, struct service *service, struct chanNode *channel, unsigned int argc, char *argv[], unsigned int server_qualified) {
     extern struct userNode *chanserv;
     struct svccmd *cmd;
-    unsigned int cmd_arg, perms, flags, options;
+    unsigned int cmd_arg, perms, flags, options, result;
     char channel_name[CHANNELLEN+1];
 
     /* First check pubcmd for the channel. */
@@ -737,11 +737,13 @@ 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 (!cmd->command->func(user, channel, argc, argv, cmd))
+    if (!(result = cmd->command->func(user, channel, argc, argv, cmd)))
         return 0;
     if (!(flags & MODCMD_NO_LOG)) {
         enum log_severity slvl;
-        if (perms & ACTION_STAFF)
+        if (result & CMD_LOG_OVERRIDE)
+            slvl = LOG_OVERRIDE;
+        else if ((perms & ACTION_STAFF) || (result & CMD_LOG_STAFF))
             slvl = LOG_STAFF;
         else if (perms & ACTION_OVERRIDE)
             slvl = LOG_OVERRIDE;
@@ -875,7 +877,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, ARCH_VERSION);
+            snprintf(response, sizeof(response), "\x01VERSION %s (%s) %s\x01", PACKAGE_STRING, CODENAME, GIT_VERSION);
             irc_notice_user(bot, user, response);
         }
         return;
@@ -1211,8 +1213,8 @@ static MODCMD_FUNC(cmd_readhelp) {
     stop.tv_sec -= start.tv_sec;
     stop.tv_usec -= start.tv_usec;
     if (stop.tv_usec < 0) {
-       stop.tv_sec -= 1;
-       stop.tv_usec += 1000000;
+        stop.tv_sec -= 1;
+        stop.tv_usec += 1000000;
     }
     reply("MCMSG_HELPFILE_READ", module->name, stop.tv_sec, stop.tv_usec/1000);
     return 1;
@@ -1236,8 +1238,8 @@ static MODCMD_FUNC(cmd_timecmd) {
     stop.tv_sec -= start.tv_sec;
     stop.tv_usec -= start.tv_usec;
     if (stop.tv_usec < 0) {
-       stop.tv_sec -= 1;
-       stop.tv_usec += 1000000;
+        stop.tv_sec -= 1;
+        stop.tv_usec += 1000000;
     }
     reply("MCMSG_COMMAND_TIME", cmd_text, stop.tv_sec, stop.tv_usec);
     return 1;
@@ -1854,8 +1856,8 @@ static MODCMD_FUNC(cmd_version) {
      * 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-2006 srvx Development Team.");
-    if ((argc > 1) && !irccasecmp(argv[1], "arch"))
-        send_message_type(4, user, cmd->parent->bot, "%s", ARCH_VERSION);
+    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.");
     return 1;