Gave Suspect logs their own number to differiate in events and changed
authorRick Bird <nveid@bender.theari.com>
Thu, 12 May 2011 00:49:16 +0000 (20:49 -0400)
committerRick Bird <nveid@bender.theari.com>
Thu, 12 May 2011 00:58:40 +0000 (20:58 -0400)
intmax_t for %d va_arg to int to be friendlier.

Signed-off-by: Rick Bird <nveid@bender.theari.com>
hdrs/log.h
src/game.c
src/log.c
src/modules.c
src/parse.c

index 417a34176dafb72b33bfccc19f1cea41d31717b6..287ce10784c690037db6a7c200b5b3e02e87feef 100644 (file)
@@ -2,14 +2,14 @@
 #define LOG_H
 
 /* log types */
-#define LT_ERR    0
-#define LT_CMD    1
-#define LT_WIZ    2
-#define LT_CONN   3
-#define LT_TRACE  4
-#define LT_RPAGE  5             /* Obsolete */
-#define LT_CHECK  6
-#define LT_HUH    7
+#define LT_ERR         0
+#define LT_CMD         1
+#define LT_WIZ         2
+#define LT_CONN        3
+#define LT_TRACE       4
+#define LT_SUSPECT     5             /* Obsolete */
+#define LT_CHECK       6
+#define LT_HUH         7
 
 /* From log.c */
 extern void start_all_logs(void);
index abf3a29f96f5ff374629a419632ee2ff4778c5fa..e161c3d68dd8f59438a34c095032451c4b4a4a4d 100644 (file)
@@ -1238,7 +1238,7 @@ process_command(dbref player, char *command, dbref cause, dbref realcause,  int
 
     log_activity(LA_CMD, player, msg);
     if (options.log_commands || Suspect(player))
-      do_log(LT_CMD, player, NOTHING, "%s", msg);
+      do_log(Suspect(player) ? LT_SUSPECT : LT_CMD, player, NOTHING, "%s", msg);
     if Verbose
       (player)
       raw_notify(Owner(player), tprintf("#%d] %s", player, msg));
index a48e8670f1fdb431aa98465c49e7dff9d297ba64..58c2ea5f929e119f5cdfbe8bbea7e5ff66022712 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -217,6 +217,7 @@ do_rawlog(int logtype, const char *fmt, ...)
   case LT_ERR:
     f = stderr;
     break;
+  case LT_SUSPECT:
   case LT_HUH:
   case LT_CMD:
     start_log(&cmdlog_fp, CMDLOG);
@@ -286,6 +287,7 @@ do_log(int logtype, dbref player, dbref object, const char *fmt, ...)
   case LT_ERR:
     do_rawlog(logtype, "RPT: %s", tbuf1);
     break;
+  case LT_SUSPECT:
   case LT_CMD:
     strcpy(unp1, quick_unparse(player));
     if (GoodObject(object)) {
index 016de4fde39d5fc53f739572678a8e899694acf4..27655668c558a23bc300cbc35ba1bd8087251eaf 100644 (file)
@@ -361,7 +361,7 @@ CHook_SC(struct core_entry_t *entry, const char *format, va_list arguments)
       case 'D':
       case 'd':
         global_eval_context.wenv[spot++] =
-            unparse_integer(va_arg(arguments, intmax_t));
+            unparse_integer(va_arg(arguments, int));
         next = 0;
         break;
       case 'S':
index edd3058dc74a505ecab2dfa9a583190aba4d90a1..21d01e295a903bac104feb2f62267c310d173c66 100644 (file)
@@ -1145,14 +1145,7 @@ process_expression(char *buff, char **bp, char const **str,
           if (attrib)
             safe_str(atr_value(attrib), buff, bp);
           break;
-        default:               /* just copy */
-          safe_chr(savec, buff, bp);
-        }
 
-        if (isupper((unsigned char) savec))
-          *savepos = UPCASE(*savepos);
-      }
-      break;
         case 'z':
         case 'Z':
           nextc = **str;
@@ -1226,6 +1219,14 @@ process_expression(char *buff, char **bp, char const **str,
               break;
             }
             break;
+        default:               /* just copy */
+          safe_chr(savec, buff, bp);
+        }
+
+        if (isupper((unsigned char) savec))
+          *savepos = UPCASE(*savepos);
+      }
+      break;
           }
 
     case '{':                  /* "{}" parse group; recurse with no function check */