|
@@ -1434,7 +1434,6 @@ static void timeout_dupwait(int idx)
|
|
|
/* Still duplicate? */
|
|
/* Still duplicate? */
|
|
|
if (in_chain(dcc[idx].nick)) {
|
|
if (in_chain(dcc[idx].nick)) {
|
|
|
egg_snprintf(x, sizeof x, "%s!%s", dcc[idx].nick, dcc[idx].host);
|
|
egg_snprintf(x, sizeof x, "%s!%s", dcc[idx].nick, dcc[idx].host);
|
|
|
- dprintf(idx, "error Already connected.\n");
|
|
|
|
|
putlog(LOG_BOTS, "*", DCC_DUPLICATE, x);
|
|
putlog(LOG_BOTS, "*", DCC_DUPLICATE, x);
|
|
|
killsock(dcc[idx].sock);
|
|
killsock(dcc[idx].sock);
|
|
|
lostdcc(idx);
|
|
lostdcc(idx);
|
|
@@ -1500,6 +1499,7 @@ static void dcc_telnet_id(int idx, char *buf, int atr)
|
|
|
buf[HANDLEN] = 0;
|
|
buf[HANDLEN] = 0;
|
|
|
/* Toss out bad nicknames */
|
|
/* Toss out bad nicknames */
|
|
|
if ((dcc[idx].nick[0] != '@') && (!wild_match(dcc[idx].nick, buf))) {
|
|
if ((dcc[idx].nick[0] != '@') && (!wild_match(dcc[idx].nick, buf))) {
|
|
|
|
|
+/* FIXME: if a bot gets this, they will try to decrypt it ;/ */
|
|
|
dprintf(idx, "Sorry, that nickname format is invalid.\n");
|
|
dprintf(idx, "Sorry, that nickname format is invalid.\n");
|
|
|
putlog(LOG_BOTS, "*", DCC_BADNICK, dcc[idx].host);
|
|
putlog(LOG_BOTS, "*", DCC_BADNICK, dcc[idx].host);
|
|
|
killsock(dcc[idx].sock);
|
|
killsock(dcc[idx].sock);
|
|
@@ -1533,12 +1533,7 @@ static void dcc_telnet_id(int idx, char *buf, int atr)
|
|
|
correct_handle(buf);
|
|
correct_handle(buf);
|
|
|
strcpy(dcc[idx].nick, buf);
|
|
strcpy(dcc[idx].nick, buf);
|
|
|
if (glob_bot(fr)) {
|
|
if (glob_bot(fr)) {
|
|
|
- /* the leaf bot set encstatus right after it sent it's nick, so the hub must now as well. */
|
|
|
|
|
- socklist[dcc[idx].sock].encstatus = 1;
|
|
|
|
|
- socklist[dcc[idx].sock].gz = 1;
|
|
|
|
|
-
|
|
|
|
|
if (!egg_strcasecmp(conf.bot->nick, dcc[idx].nick)) {
|
|
if (!egg_strcasecmp(conf.bot->nick, dcc[idx].nick)) {
|
|
|
- dprintf(idx, "error You cannot link using my nick.\n");
|
|
|
|
|
putlog(LOG_BOTS, "*", DCC_MYBOTNETNICK, dcc[idx].host);
|
|
putlog(LOG_BOTS, "*", DCC_MYBOTNETNICK, dcc[idx].host);
|
|
|
killsock(dcc[idx].sock);
|
|
killsock(dcc[idx].sock);
|
|
|
lostdcc(idx);
|
|
lostdcc(idx);
|
|
@@ -1634,6 +1629,10 @@ static void dcc_telnet_pass(int idx, int atr)
|
|
|
tmp2 = encrypt_string(SALT2, initkey);
|
|
tmp2 = encrypt_string(SALT2, initkey);
|
|
|
putlog(LOG_BOTS, "*", "Sending encrypted link handshake to %s...", dcc[idx].nick);
|
|
putlog(LOG_BOTS, "*", "Sending encrypted link handshake to %s...", dcc[idx].nick);
|
|
|
|
|
|
|
|
|
|
+ /* the leaf bot set encstatus right after it sent it's nick, but we just set the key.... */
|
|
|
|
|
+ socklist[snum].encstatus = 1;
|
|
|
|
|
+ socklist[snum].gz = 1;
|
|
|
|
|
+
|
|
|
dprintf(idx, "elink %s %d\n", tmp2, socklist[snum].oseed);
|
|
dprintf(idx, "elink %s %d\n", tmp2, socklist[snum].oseed);
|
|
|
free(tmp2);
|
|
free(tmp2);
|
|
|
strcpy(socklist[snum].okey, initkey);
|
|
strcpy(socklist[snum].okey, initkey);
|