Просмотр исходного кода

* Removed cmd_botinfo
* Removed restart_chons()


svn: 1037

Bryan Drewery 22 лет назад
Родитель
Сommit
0a04e92dd0
8 измененных файлов с 3 добавлено и 123 удалено
  1. 1 0
      doc/UPDATES
  2. 2 9
      misc/help.txt
  3. 0 60
      src/botcmd.c
  4. 0 8
      src/botmsg.c
  5. 0 12
      src/botnet.c
  6. 0 1
      src/botnet.h
  7. 0 32
      src/cmds.c
  8. 0 1
      src/tandem.h

+ 1 - 0
doc/UPDATES

@@ -21,6 +21,7 @@ This is a summary of ChangeLog basically.
 17.Added CFG: servport.
 18.Fixed setting ban/invite/exempt on hub, and leafs not setting it.
 19.Annoying log -NOTICE- *** should be fixed.
+20.Removed cmd_botinfo.
 
 1.1.7
 

+ 2 - 9
misc/help.txt

@@ -279,13 +279,6 @@ See also: bc, cmdpass
    will be used for all options.
  
 See also: botconfig
-:hub:botinfo
-###  %bbotinfo%b
-   Requests information from every bot currently on the botnet. Each bot should
-   eventually send you one line containing its version, network setting,
-   channels, and uptime.
- 
-See also: %{+n}bottree %{-}%{+m}, bots%{-}
 ::botjoin
 ###  %bbotjoin%b <bot> <channel> [options]
     Adds a channel to the bot's channel list. If options are specified, the 
@@ -326,7 +319,7 @@ See also: botjoin, +chan, -chan, chanset, chaninfo
    There is no indication of which bots are directly connected to this current
    bot. %{+n}Use %b'%dwho'%b or %b'%dbottree'%b for that information.%{-}
  
-See also: downbots%{+n}, bottree%{-}, botinfo
+See also: downbots%{+n}, bottree%{-}
 ::botserver:
 ###  %bbotserver%b <bot>
    The bot will display it's current server and lag over DCC.
@@ -338,7 +331,7 @@ See also: netserver, servers%{+n}, config%{-}
    nice way to get a feel for how the bots are physically connected. If 2 bots
    are sharing, a + will be indicated, or a ? if nothing is known.
  
-See also: bots, downbots, botinfo
+See also: bots, downbots
 ::botversion:
 ###  %bbotversion%b <bot>
    The bot will display it's pack version and uname.

+ 0 - 60
src/botcmd.c

@@ -501,65 +501,6 @@ static void bot_endlink(int idx, char *par)
   dcc[idx].status &= ~STAT_LINKING;
 }
 
-/* info? <from@bot>   -> send priv
- */
-static void bot_infoq(int idx, char *par)
-{
-#ifdef LEAF
-  char s[200] = "";
-  struct chanset_t *chan = NULL;
-#endif /* LEAF */
-  char s2[32] = "", *realnick = NULL;
-  time_t now2;
-  int hr, min;
-
-  /* Strip the idx from user@bot */
-  realnick = strchr(par, ':');
-  if (realnick)
-    realnick++;
-  else
-    realnick = par;
-  putlog(LOG_BOTS, "@", "#%s# botinfo", realnick);
-
-  now2 = now - online_since;
-  s2[0] = 0;
-  if (now2 > 86400) {
-    int mydays = now2 / 86400;
-
-    /* Days */
-    sprintf(s2, "%d day", mydays);
-    if (mydays >= 2)
-      strcat(s2, "s");
-    strcat(s2, ", ");
-    now2 -= mydays * 86400;
-  }
-  hr = (time_t) ((int) now2 / 3600);
-  now2 -= (hr * 3600);
-  min = (time_t) ((int) now2 / 60);
-  sprintf(&s2[strlen(s2)], "%02d:%02d", (int) hr, (int) min);
-#ifdef LEAF
-  s[0] = 0;
-  for (chan = chanset; chan; chan = chan->next) {
-    if (!channel_secret(chan)) {
-      if ((strlen(s) + strlen(chan->dname) + strlen(network) + strlen(conf.bot->nick) + strlen(ver) + 1) >= 200) {
-        strcat(s,"++  ");
-        break; /* Yegads..! */
-      }
-      strcat(s, chan->dname);
-      strcat(s, ", ");
-    }
-  }
-  if (s[0]) {
-    s[strlen(s) - 2] = 0;
-    botnet_send_priv(idx, conf.bot->nick, par, NULL, "%s <%s> (%s) [UP %s]", ver, network, s, s2);
-  } else
-    botnet_send_priv(idx, conf.bot->nick, par, NULL, "%s <%s> (%s) [UP %s]", ver, network, BOT_NOCHANNELS, s2);
-#else /* !HUB */
-  botnet_send_priv(idx, conf.bot->nick, par, NULL, "%s <NO_IRC> [UP %s]", ver, s2);
-#endif /* LEAF */
-  botnet_send_infoq(idx, par);
-}
-
 static void bot_ping(int idx, char *par)
 {
   botnet_send_pong(idx);
@@ -1274,7 +1215,6 @@ botcmd_t C_bot[] =
   {"e",			(Function) bot_error},
   {"el",		(Function) bot_endlink},
   {"i",			(Function) bot_idle},
-  {"i?",		(Function) bot_infoq},
   {"j",			(Function) bot_join},
   {"l",			(Function) bot_link},
   {"n",			(Function) bot_nlinked},

+ 0 - 8
src/botmsg.c

@@ -304,14 +304,6 @@ void botnet_send_who(int idx, char *from, char *to, int chan)
   tputs(dcc[idx].sock, OBUF, len);
 }
 
-void botnet_send_infoq(int idx, char *par)
-{
-  size_t len;
-
-  len = simple_sprintf(OBUF, "i? %s\n", par);
-  send_tand_but(idx, OBUF, len);
-}
-
 void botnet_send_unlink(int idx, char *who, char *via, char *bot, char *reason)
 {
   size_t len;

+ 0 - 12
src/botnet.c

@@ -1673,18 +1673,6 @@ void zapfbot(int idx)
   lostdcc(idx);
 }
 
-void restart_chons()
-{
-  int i;
-
-  /* Dump party line members */
-  for (i = 0; i < dcc_total; i++) {
-    if (dcc[i].type == &DCC_CHAT) {
-      check_bind_chon(dcc[i].nick, i);
-    }
-  }
-}
-
 static int get_role(char *bot)
 {
   int rl, i;

+ 0 - 1
src/botnet.h

@@ -11,7 +11,6 @@ extern tand_t		*tandbot;
 extern party_t		*party;
 extern int		tands;
 
-void restart_chons();
 void lower_bot_linked(int idx);
 void answer_local_whom(int, int);
 char *lastbot(char *);

+ 0 - 32
src/cmds.c

@@ -204,37 +204,6 @@ static void tell_who(struct userrec *u, int idx, int chan)
   }
 }
 
-static void cmd_botinfo(struct userrec *u, int idx, char *par)
-{
-  char s[512] = "", s2[32] = "";
-  time_t now2;
-  int hr, min;
-
-  putlog(LOG_CMDS, "*", "#%s# botinfo", dcc[idx].nick);
-
-  now2 = now - online_since;
-  s2[0] = 0;
-  if (now2 > 86400) {
-    int mydays = now2 / 86400;
-
-    /* mydays */
-    sprintf(s2, "%d day", mydays);
-    if (mydays >= 2)
-      strcat(s2, "s");
-    strcat(s2, ", ");
-    now2 -= mydays * 86400;
-  }
-  hr = (time_t) ((int) now2 / 3600);
-  now2 -= (hr * 3600);
-  min = (time_t) ((int) now2 / 60);
-  sprintf(&s2[strlen(s2)], "%02d:%02d", (int) hr, (int) min);
-  simple_sprintf(s, "%d:%s@%s", dcc[idx].sock, dcc[idx].nick, conf.bot->nick);
-  botnet_send_infoq(-1, s);
-
-  dprintf(idx, "*** [%s] %s <NO_IRC> [UP %s]\n", conf.bot->nick, ver, s2);
-}
-#endif /* HUB */
-
 static void cmd_whom(struct userrec *u, int idx, char *par)
 {
   if (par[0] == '*') {
@@ -4254,7 +4223,6 @@ cmd_t C_dcc[] =
   {"backup",		"m|m",	(Function) cmd_backup,		NULL},
   {"boot",		"m",	(Function) cmd_boot,		NULL},
   {"botconfig",		"n",	(Function) cmd_botconfig,	NULL},
-  {"botinfo",		"",	(Function) cmd_botinfo,		NULL},
   {"bots",		"m",	(Function) cmd_bots,		NULL},
   {"downbots",		"m",	(Function) cmd_downbots,	NULL},
   {"bottree",		"n",	(Function) cmd_bottree,		NULL},

+ 0 - 1
src/tandem.h

@@ -50,7 +50,6 @@ void botnet_send_ping(int);
 void botnet_send_pong(int);
 void botnet_send_priv (int, char *, char *, char *, char *, ...) __attribute__((format(printf, 5, 6)));
 void botnet_send_who(int, char *, char *, int);
-void botnet_send_infoq(int, char *);
 void botnet_send_unlinked(int, char *, char *);
 void botnet_send_traced(int, char *, char *);
 void botnet_send_trace(int, char *, char *, char *);