فهرست منبع

* cmd_[net|bot|]version now displays if a bot has been updated and is on timer for restart.

svn: 2190
Bryan Drewery 21 سال پیش
والد
کامیت
2f3feb4462
3فایلهای تغییر یافته به همراه7 افزوده شده و 2 حذف شده
  1. 1 0
      doc/UPDATES
  2. 5 1
      src/cmds.c
  3. 1 1
      src/mod/update.mod/update.h

+ 1 - 0
doc/UPDATES

@@ -167,6 +167,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * Disabled auto-renaming server names internally on connect if they don't match our own list
 * In config/-C, the ip field for bots can now be either ipv4 or ipv6. (ipv6 field still present)
 * Clearing chanset var now correctly uses defaults.
+* cmd_[net|bot|]version now displays if a bot has been updated and is on timer for restart.
 
 
 1.2.2

+ 5 - 1
src/cmds.c

@@ -40,6 +40,7 @@
 #include "src/mod/console.mod/console.h"
 #include "src/mod/server.mod/server.h"
 #include "src/mod/irc.mod/irc.h"
+#include "src/mod/update.mod/update.h"
 
 #include <ctype.h>
 #include <stdlib.h>
@@ -3502,7 +3503,10 @@ static void rcmd_ver(char * fbot, char * fhand, char * fidx) {
   if (uname(&un) < 0) {
     strcat(tmp, "(unknown OS)");
   } else {
-    simple_sprintf(tmp + strlen(tmp), "%s %s (%s)", un.sysname, un.release, un.machine);
+    if (updated) {
+      simple_sprintf(tmp + strlen(tmp), "%s %s (%s-UPDATED)", un.sysname, un.release, un.machine);
+    } else
+      simple_sprintf(tmp + strlen(tmp), "%s %s (%s)", un.sysname, un.release, un.machine);
   }
   botnet_send_cmdreply(conf.bot->nick, fbot, fhand, fidx, tmp);
 }

+ 1 - 1
src/mod/update.mod/update.h

@@ -6,7 +6,7 @@
 #ifndef _EGG_MOD_update_update_H
 #define _EGG_MOD_update_update_H
 
-extern int bupdating;
+extern int bupdating, updated;
 
 void finish_update(int);
 void update_report(int, int);