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

* Default .color on
* Removed some unused code


svn: 943

Bryan Drewery 22 лет назад
Родитель
Сommit
356fc64af6
3 измененных файлов с 11 добавлено и 30 удалено
  1. 1 0
      doc/UPDATES
  2. 4 22
      src/dcc.c
  3. 6 8
      src/dcc.h

+ 1 - 0
doc/UPDATES

@@ -14,6 +14,7 @@ This is a summary of ChangeLog basically.
 10.Fixed msgc_voice, was checking for +v instead of +q.
 11.Fixed cmd_botcmd not matching '?' correctly again!
 12.Added console settings for what to show on login: banner, channels, bots, whom.
+13.Changed default .color to on, and all of the new settings are default on as well.
 
 1.1.5
 

+ 4 - 22
src/dcc.c

@@ -1511,22 +1511,7 @@ static void dcc_telnet_id(int idx, char *buf, int atr)
   }
   dcc[idx].user = get_user_by_handle(userlist, buf);
   get_user_flagrec(dcc[idx].user, &fr, NULL);
-  /* Make sure users-only/bots-only connects are honored */
-  if ((dcc[idx].status & STAT_BOTONLY) && !glob_bot(fr)) {
-    dprintf(idx, "This telnet port is for bots only.\n");
-    putlog(LOG_BOTS, "*", DCC_NONBOT, dcc[idx].host);
-    killsock(dcc[idx].sock);
-    lostdcc(idx);
-    return;
-  }
-  if ((dcc[idx].status & STAT_USRONLY) && glob_bot(fr)) {
-    dprintf(idx, "error Only users may connect at this port.\n");
-    putlog(LOG_BOTS, "*", DCC_NONUSER, dcc[idx].host);
-    killsock(dcc[idx].sock);
-    lostdcc(idx);
-    return;
-  }
-  dcc[idx].status &= ~(STAT_BOTONLY | STAT_USRONLY);
+
 /*  if (!ok && glob_party(fr))
     ok = 1;*/
    ok = 1;
@@ -1552,7 +1537,7 @@ static void dcc_telnet_id(int idx, char *buf, int atr)
   strcpy(dcc[idx].nick, buf);
   if (glob_bot(fr)) {
     if (!egg_strcasecmp(conf.bot->nick, dcc[idx].nick)) {
-      dprintf(idx, "error You cannot link using my conf.bot->nick.\n");
+      dprintf(idx, "error You cannot link using my nick.\n");
       putlog(LOG_BOTS, "*", DCC_MYBOTNETNICK, dcc[idx].host);
       killsock(dcc[idx].sock);
       lostdcc(idx);
@@ -1912,11 +1897,8 @@ static void dcc_telnet_got_ident(int i, char *host)
   egg_bzero(dcc[i].u.chat, sizeof(struct chat_info));
 
   /* Copy acceptable-nick/host mask */
-  dcc[i].status = STAT_TELNET | STAT_ECHO;
-  if (!strcmp(dcc[idx].nick, "(bots)"))
-    dcc[i].status |= STAT_BOTONLY;
-  if (!strcmp(dcc[idx].nick, "(users)"))
-    dcc[i].status |= STAT_USRONLY;
+  dcc[i].status = (STAT_TELNET | STAT_ECHO | STAT_COLOR | STAT_BANNER | STAT_CHANNELS | STAT_BOTS | STAT_WHOM);
+
   /* Copy acceptable-nick/host mask */
   strncpyz(dcc[i].nick, dcc[idx].host, HANDLEN);
   dcc[i].timeval = now;

+ 6 - 8
src/dcc.h

@@ -151,14 +151,12 @@ struct dupwait_info {
 #define STAT_CHAT    BIT2    /* in file-system but may return        */
 #define STAT_TELNET  BIT3    /* connected via telnet                 */
 #define STAT_PARTY   BIT4    /* only on party line via 'p' flag      */
-#define STAT_BOTONLY BIT5    /* telnet on bots-only connect          */
-#define STAT_USRONLY BIT6    /* telnet on users-only connect         */
-#define STAT_PAGE    BIT7    /* page output to the user              */
-#define STAT_COLOR   BIT8    /* Color enabled for user */
-#define STAT_BANNER  BIT9    /* show banner on login? */
-#define STAT_CHANNELS BIT10  /* show channels on login? */
-#define STAT_BOTS    BIT11   /* Show bots linked on login? */
-#define STAT_WHOM    BIT12   /* show .whom on login? */
+#define STAT_PAGE    BIT5    /* page output to the user              */
+#define STAT_COLOR   BIT6    /* Color enabled for user */
+#define STAT_BANNER  BIT7    /* show banner on login? */
+#define STAT_CHANNELS BIT8  /* show channels on login? */
+#define STAT_BOTS    BIT9   /* Show bots linked on login? */
+#define STAT_WHOM    BIT10   /* show .whom on login? */
 
 /* For stripping out mIRC codes
  */