فهرست منبع

* Fixed bot adding it's new hostmask on server but then losing it due to old userfile transfer from hubs. (#85)

svn: 2125
Bryan Drewery 21 سال پیش
والد
کامیت
57828c22a3
4فایلهای تغییر یافته به همراه10 افزوده شده و 3 حذف شده
  1. 1 1
      doc/UPDATES
  2. 1 1
      src/mod/server.mod/server.h
  3. 4 1
      src/mod/server.mod/servmsg.c
  4. 4 0
      src/mod/share.mod/share.c

+ 1 - 1
doc/UPDATES

@@ -45,7 +45,7 @@ Lines prefixed with '-' were disabled before release and are not finishsed, or a
 * Users who are v|o in a +private chan are now voiced, as before |v was needed.
 * Users who are v|o in a +private chan are now voiced, as before |v was needed.
 * Added channel flag +|-botbitch, when set only bots will be allowed to be opped, users are auto-deopped.
 * Added channel flag +|-botbitch, when set only bots will be allowed to be opped, users are auto-deopped.
 * chanset -bitch/-private/-botbitch/+botbitch/+closed/+private will now trigger bots to recheck channel (op/deop/kick people)
 * chanset -bitch/-private/-botbitch/+botbitch/+closed/+private will now trigger bots to recheck channel (op/deop/kick people)
-* Fixed bot not updating it's hostmask when reconnecting to server
+* Fixed bot not updating it's hostmask when reconnecting to server (#11/#85)
 * Fixed bot sending +Ie modes before recieving list from server after opping.
 * Fixed bot sending +Ie modes before recieving list from server after opping.
 * Fixed channel bans not displaying on hubs (#1)
 * Fixed channel bans not displaying on hubs (#1)
 * Fixed users showing up in .whom after doing .botcmd and relinking the bot which the cmd was ran on. (#9)
 * Fixed users showing up in .whom after doing .botcmd and relinking the bot which the cmd was ran on. (#9)

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

@@ -69,4 +69,4 @@ void nuke_server(const char *);
 bool match_my_nick(char *);
 bool match_my_nick(char *);
 void rehash_server(const char *, const char *);
 void rehash_server(const char *, const char *);
 void join_chans();
 void join_chans();
-
+void check_hostmask();

+ 4 - 1
src/mod/server.mod/servmsg.c

@@ -1094,8 +1094,11 @@ irc_whois(char *nick, const char *format, ...)
       dprintf(idx, "%s\n", va_out);
       dprintf(idx, "%s\n", va_out);
 }
 }
 
 
-static void check_hostmask()
+void check_hostmask()
 {
 {
+  if (!server_online || !botuserhost[0])
+    return;
+
   char s[UHOSTLEN + 2] = "";
   char s[UHOSTLEN + 2] = "";
 
 
   simple_sprintf(s, "*!%s", botuserhost);              /* just add actual user@ident, regardless of ~ */
   simple_sprintf(s, "*!%s", botuserhost);              /* just add actual user@ident, regardless of ~ */

+ 4 - 0
src/mod/share.mod/share.c

@@ -29,6 +29,7 @@
 #include "src/mod/transfer.mod/transfer.h"
 #include "src/mod/transfer.mod/transfer.h"
 #include "src/mod/channels.mod/channels.h"
 #include "src/mod/channels.mod/channels.h"
 #include "src/mod/irc.mod/irc.h"
 #include "src/mod/irc.mod/irc.h"
+#include "src/mod/server.mod/server.h"
 
 
 static struct flag_record fr = { 0, 0, 0, 0 };
 static struct flag_record fr = { 0, 0, 0, 0 };
 
 
@@ -1294,6 +1295,9 @@ finish_share(int idx)
    */
    */
   clear_userlist(ou);
   clear_userlist(ou);
 
 
+  /* Our hostmask may have been updated on connect, but the new userfile may not have it. */
+  check_hostmask();
+
   /* copy over any auth users */
   /* copy over any auth users */
   Auth::FillUsers();
   Auth::FillUsers();