/[cvs]/eggdrop1.8/src/dcc.c
ViewVC logotype

Diff of /eggdrop1.8/src/dcc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.7 by pseudo, Tue Nov 23 16:36:23 2010 UTC revision 1.8 by pseudo, Fri Nov 26 13:20:29 2010 UTC
# Line 604  static void dcc_chat_pass(int idx, char Line 604  static void dcc_chat_pass(int idx, char
604      buf += 3; /* 'IAC','DO(DONT)','STATUS' */      buf += 3; /* 'IAC','DO(DONT)','STATUS' */
605    atr = dcc[idx].user ? dcc[idx].user->flags : 0;    atr = dcc[idx].user ? dcc[idx].user->flags : 0;
606    
   /* Check for MD5 digest from remote _bot_. <cybah> */  
607  #ifdef TLS  #ifdef TLS
608    if ((atr & USER_BOT) && !egg_strncasecmp(buf, "starttls ", 9)) {    if (atr & USER_BOT) {
609        if (!egg_strncasecmp(buf, "starttls ", 9)) {
610      dcc[idx].ssl = 1;      dcc[idx].ssl = 1;
611      if (ssl_handshake(dcc[idx].sock, TLS_LISTEN, tls_vfybots, LOG_BOTS,      if (ssl_handshake(dcc[idx].sock, TLS_LISTEN, tls_vfybots, LOG_BOTS,
612                        dcc[idx].host, NULL)) {                        dcc[idx].host, NULL)) {
# Line 615  static void dcc_chat_pass(int idx, char Line 615  static void dcc_chat_pass(int idx, char
615      }      }
616      return;      return;
617    }    }
618        /* No password set? */
619        if (u_pass_match(dcc[idx].user, "-")) {
620          char ps[20];
621    
622          makepass(ps);
623          set_user(&USERENTRY_PASS, dcc[idx].user, ps);
624          changeover_dcc(idx, &DCC_BOT_NEW, sizeof(struct bot_info));
625    
626          dcc[idx].status = STAT_CALLED;
627          dprintf(idx, "*hello!\n");
628          greet_new_bot(idx);
629    #ifdef NO_OLD_BOTNET
630          dprintf(idx, "h %s\n", ps);
631    #else
632          dprintf(idx, "handshake %s\n", ps);
633    #endif
634          return;
635        }
636      }
637  #endif  #endif
638      /* Check for MD5 digest from remote _bot_. <cybah> */
639    if ((atr & USER_BOT) && !egg_strncasecmp(buf, "digest ", 7)) {    if ((atr & USER_BOT) && !egg_strncasecmp(buf, "digest ", 7)) {
640      if (dcc_bot_check_digest(idx, buf + 7)) {      if (dcc_bot_check_digest(idx, buf + 7)) {
641        nfree(dcc[idx].u.chat);        nfree(dcc[idx].u.chat);
# Line 1584  static void dcc_telnet_pass(int idx, int Line 1604  static void dcc_telnet_pass(int idx, int
1604    }    }
1605  #endif  #endif
1606    /* No password set? */    /* No password set? */
1607    if (u_pass_match(dcc[idx].user, "-")) {    if (!glob_bot(fr) && u_pass_match(dcc[idx].user, "-")) {
     if (glob_bot(fr)) {  
       char ps[20];  
   
       makepass(ps);  
       set_user(&USERENTRY_PASS, dcc[idx].user, ps);  
       changeover_dcc(idx, &DCC_BOT_NEW, sizeof(struct bot_info));  
   
       dcc[idx].status = STAT_CALLED;  
       dprintf(idx, "*hello!\n");  
       greet_new_bot(idx);  
 #ifdef NO_OLD_BOTNET  
       dprintf(idx, "h %s\n", ps);  
 #else  
       dprintf(idx, "handshake %s\n", ps);  
 #endif  
       return;  
     }  
1608      dprintf(idx, "Can't telnet until you have a password set.\n");      dprintf(idx, "Can't telnet until you have a password set.\n");
1609      putlog(LOG_MISC, "*", DCC_NOPASS, dcc[idx].nick, dcc[idx].host);      putlog(LOG_MISC, "*", DCC_NOPASS, dcc[idx].nick, dcc[idx].host);
1610      killsock(dcc[idx].sock);      killsock(dcc[idx].sock);

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23