Browse Source

* Fix cmd_botset not setting default/global value on leaf bots when clearing a var (fixes #389)

Bryan Drewery 17 years ago
parent
commit
80d3d4ab8b
2 changed files with 2 additions and 1 deletions
  1. 1 0
      doc/UPDATES
  2. 1 1
      src/userent.c

+ 1 - 0
doc/UPDATES

@@ -16,6 +16,7 @@
 * Fix a case where the temporary file was not cleaned up when exiting config editor (-C) (fixes #428)
 * Fix cmd_slowpart issues
 * Remove pscloak feature, it was too malicious, pointless and stupid.
+* Fix cmd_botset not setting default/global value on leaf bots when clearing a var (fixes #389)
 
 1.2.16 - http://wraith.botpack.net/milestone/1.2.16
 * Add 'set altchars' so that alternative characters used for nicks can be changed. (fixes #418)

+ 1 - 1
src/userent.c

@@ -346,7 +346,7 @@ static bool set_gotshare(struct userrec *u, struct user_entry *e, char *buf, int
 
   if (!egg_strcasecmp(u->handle, conf.bot->nick)) {
     set_noshare = 1;
-    var_set_by_name(conf.bot->nick, name, buf);
+    var_set_by_name(conf.bot->nick, name, buf[0] ? buf : NULL);
     set_noshare = 0;
   /* var_set_by_name() called set_user(), no need to do it again... */
   }