Pārlūkot izejas kodu

* Changed cosmetics of ADDRESS: display in .whois for bots.

svn: 572
Bryan Drewery 22 gadi atpakaļ
vecāks
revīzija
abe40131e5
2 mainītis faili ar 9 papildinājumiem un 10 dzēšanām
  1. 1 0
      doc/UPDATES
  2. 8 10
      src/userent.c

+ 1 - 0
doc/UPDATES

@@ -19,6 +19,7 @@ This is a summary of ChangeLog basically.
 16.Changed some cosmetics in cmd_chaninfo.
 16.Changed some cosmetics in cmd_chaninfo.
 17.Removed some redundant system calls in getin system.
 17.Removed some redundant system calls in getin system.
 18.Fixed bots asking bots for ops in a chan where the op-bot is +d
 18.Fixed bots asking bots for ops in a chan where the op-bot is +d
+19.Changed cosmetics of ADDRESS: display in .whois for bots.
 
 
 1.0.14
 1.0.14
 1.Fixed order of log/info for cmd_whoami.
 1.Fixed order of log/info for cmd_whoami.

+ 8 - 10
src/userent.c

@@ -1037,21 +1037,19 @@ static int botaddr_expmem(struct user_entry *e)
 static void botaddr_display(int idx, struct user_entry *e, struct userrec *u)
 static void botaddr_display(int idx, struct user_entry *e, struct userrec *u)
 {
 {
 #ifdef HUB
 #ifdef HUB
-
   struct flag_record fr = {FR_GLOBAL, 0, 0, 0, 0, 0};
   struct flag_record fr = {FR_GLOBAL, 0, 0, 0, 0, 0};
 
 
   get_user_flagrec(dcc[idx].user, &fr, NULL);
   get_user_flagrec(dcc[idx].user, &fr, NULL);
-
   if (glob_admin(fr)) {
   if (glob_admin(fr)) {
-
-  register struct bot_addr *bi = (struct bot_addr *) e->u.extra;
-
-  dprintf(idx, STR("  ADDRESS: %.70s\n"), bi->address);
-  dprintf(idx, STR("     telnet: %d, relay: %d\n"), bi->telnet_port, bi->relay_port);
-  dprintf(idx, STR("     hublevel: %d, uplink: %s\n"), bi->hublevel, bi->uplink);
-
+    register struct bot_addr *bi = (struct bot_addr *) e->u.extra;
+    if (bi->address && bi->hublevel && bi->hublevel != 0)
+      dprintf(idx, STR("  ADDRESS: %.70s:%d\n"), bi->address, bi->telnet_port);
+    if (bi->hublevel && bi->hublevel != 0)
+      dprintf(idx, STR("  HUBLEVEL: %d\n"), bi->hublevel);
+    if (bi->uplink && bi->uplink[0])
+      dprintf(idx, STR("  UPLINK: %s\n"), bi->uplink);
   }
   }
-#endif
+#endif /* HUB */
 }
 }
 
 
 static int botaddr_gotshare(struct userrec *u, struct user_entry *e,
 static int botaddr_gotshare(struct userrec *u, struct user_entry *e,