소스 검색

* Only check expected nick if provided

Bryan Drewery 17 년 전
부모
커밋
0753bdc95a
1개의 변경된 파일9개의 추가작업 그리고 7개의 파일을 삭제
  1. 9 7
      src/dcc.c

+ 9 - 7
src/dcc.c

@@ -983,13 +983,15 @@ dcc_chat_pass(int idx, char *buf, int atr)
           return;
         }
 
-        const char *expected_nick = newsplit(&buf);
-
-        if (egg_strcasecmp(expected_nick, conf.bot->nick)) {
-          putlog(LOG_WARN, "*", STR("%s failed encrypted link handshake (was expecting '%s' instead of me)"), dcc[idx].nick, expected_nick);
-          killsock(dcc[idx].sock);
-          lostdcc(idx);
-          return;
+        if (buf[0]) {
+          const char *expected_nick = newsplit(&buf);
+
+          if (egg_strcasecmp(expected_nick, conf.bot->nick)) {
+            putlog(LOG_WARN, "*", STR("%s failed encrypted link handshake (was expecting '%s' instead of me)"), dcc[idx].nick, expected_nick);
+            killsock(dcc[idx].sock);
+            lostdcc(idx);
+            return;
+          }
         }
 
         socklist[snum].enclink = i;