/[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.9 by pseudo, Thu Jan 27 11:20:16 2011 UTC revision 1.10 by thommey, Sat Feb 26 19:22:37 2011 UTC
# Line 1247  static void dcc_telnet_hostresolved(int Line 1247  static void dcc_telnet_hostresolved(int
1247  {  {
1248    int idx;    int idx;
1249    int j = 0, sock;    int j = 0, sock;
1250    char s[UHOSTLEN + 20];    char s[UHOSTLEN + 20], *userhost;
1251    
1252    strncpyz(dcc[i].host, dcc[i].u.dns->host, UHOSTLEN);    strncpyz(dcc[i].host, dcc[i].u.dns->host, UHOSTLEN);
1253    
# Line 1273  static void dcc_telnet_hostresolved(int Line 1273  static void dcc_telnet_hostresolved(int
1273      }      }
1274    }    }
1275    sprintf(s, "-telnet!telnet@%s", dcc[i].host);    sprintf(s, "-telnet!telnet@%s", dcc[i].host);
1276      userhost = s + strlen("-telnet!");
1277    if (match_ignore(s) || detect_telnet_flood(s)) {    if (match_ignore(s) || detect_telnet_flood(s)) {
1278      killsock(dcc[i].sock);      killsock(dcc[i].sock);
1279      lostdcc(i);      lostdcc(i);
# Line 1280  static void dcc_telnet_hostresolved(int Line 1281  static void dcc_telnet_hostresolved(int
1281    }    }
1282    
1283    putlog(LOG_MISC, "*", DCC_TELCONN, dcc[i].host, dcc[i].port);    putlog(LOG_MISC, "*", DCC_TELCONN, dcc[i].host, dcc[i].port);
1284    
1285      /* Skip ident lookup for public script listeners */
1286      if ((dcc[idx].status & LSTN_PUBLIC) && !strcmp(dcc[idx].nick, "(script)")) {
1287        changeover_dcc(i, &DCC_SOCKET, 0);
1288        dcc[i].u.other = NULL;
1289        strcpy(dcc[i].nick, "*");
1290        strncpyz(dcc[i].host, userhost, UHOSTLEN);
1291        check_tcl_listen(dcc[idx].host, dcc[i].sock);
1292        return;
1293      }
1294    
1295    changeover_dcc(i, &DCC_IDENTWAIT, 0);    changeover_dcc(i, &DCC_IDENTWAIT, 0);
1296    dcc[i].timeval = now;    dcc[i].timeval = now;
1297    dcc[i].u.ident_sock = dcc[idx].sock;    dcc[i].u.ident_sock = dcc[idx].sock;
# Line 1307  static void dcc_telnet_hostresolved(int Line 1319  static void dcc_telnet_hostresolved(int
1319      }      }
1320    }    }
1321    if (j < 0) {    if (j < 0) {
1322      sprintf(s, "telnet@%s", dcc[i].host);      dcc_telnet_got_ident(i, userhost);
     dcc_telnet_got_ident(i, s);  
1323      return;      return;
1324    }    }
1325    dcc[j].sock = sock;    dcc[j].sock = sock;

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23