Ver Fonte

* More work on new console modes
* Changed my plugs in show_banner


svn: 1054

Bryan Drewery há 22 anos atrás
pai
commit
7b2f04b1bf
2 ficheiros alterados com 22 adições e 12 exclusões
  1. 12 7
      src/dccutil.c
  2. 10 5
      src/misc.c

+ 12 - 7
src/dccutil.c

@@ -229,17 +229,23 @@ void dcc_chatter(int idx)
   strcpy(dcc[idx].u.chat->con_chan, "***");
   check_bind_chon(dcc[idx].nick, idx);
 
-  get_user_flagrec(dcc[idx].user, &fr, NULL);
   dprintf(idx, "Connected to %s, running %s\n", conf.bot->nick, version);
-  show_banner(idx);
-  show_motd(idx);
-  if (glob_master(fr)) {
+  show_banner(idx);		/* check STAT_BANNER inside function */
+
+  if (1 || dcc[idx].status & STAT_WHOM)
+    answer_local_whom(idx, -1);
+
+  get_user_flagrec(dcc[idx].user, &fr, NULL);
+  if ((dcc[idx].status & STAT_BOTS) && glob_master(fr)) {
     if ((tands+1) > 1)
       dprintf(idx, "There are %s-%d- bots%s currently linked.\n", BOLD(idx), tands + 1, BOLD_END(idx));
     else
       dprintf(idx, "There is %s-%d- bot%s currently linked.\n", BOLD(idx), tands + 1, BOLD_END(idx));
   }
-  show_channels(idx, NULL);
+  if (dcc[idx].status & STAT_CHANNELS)
+    show_channels(idx, NULL);
+
+  show_motd(idx);
 
   if (glob_party(fr)) {
      i = dcc[idx].u.chat->channel;
@@ -279,8 +285,7 @@ void dcc_chatter(int idx)
     if (!dcc[idx].u.chat->channel) {
       chanout_but(-1, 0, "*** %s joined the party line.\n", dcc[idx].nick);
     } else if (dcc[idx].u.chat->channel > 0) {
-      chanout_but(-1, dcc[idx].u.chat->channel,
-		  "*** %s joined the channel.\n", dcc[idx].nick);
+      chanout_but(-1, dcc[idx].u.chat->channel, "*** %s joined the channel.\n", dcc[idx].nick);
     }
   }
 }

+ 10 - 5
src/misc.c

@@ -434,16 +434,21 @@ char *wbanner() {
 
 void show_banner(int idx)
 {
-  dumplots(-dcc[idx].sock, "", wbanner()); /* we use sock so that colors aren't applied to banner */
-  dprintf(idx, "\n \n");
-  dprintf(idx, STR("%sConributions welcomed by paypal: bryan@shatow.net%s\n"), BOLD(idx), BOLD_END(idx));
-  dprintf(idx, STR("info, bugs, suggestions, comments:\n- http://wraith.shatow.net/ -\n \n"));
+  /* we use sock so that colors aren't applied to banner */
+  if (dcc[idx].status & STAT_BANNER)
+    dumplots(-dcc[idx].sock, "", wbanner()); 
+  dprintf(idx, " \n");
+  dprintf(-dcc[idx].sock,     " ------------------------------------------------------- \n");
+  dprintf(-dcc[idx].sock, STR("| Contributions welcomed by paypal: bryan@shatow.net |\n"));
+  dprintf(-dcc[idx].sock, STR("|             - http://wraith.shatow.net/ -             |\n"));
+  dprintf(-dcc[idx].sock,     " ------------------------------------------------------- \n");
+  dprintf(idx, " \n");
+
 }
 
 /* show motd to dcc chatter */
 void show_motd(int idx)
 {
-  
   if (CFG_MOTD.gdata && *(char *) CFG_MOTD.gdata) {
     char *who = NULL, *buf = NULL, *buf_ptr = NULL, date[50] = "";
     time_t when;