ソースを参照

* Port [3414] to 1.2.14
* Remove quiet_reject



svn: 3415

Bryan Drewery 19 年 前
コミット
ce78705764

+ 3 - 14
src/mod/irc.mod/msgcmds.c

@@ -180,25 +180,14 @@ static int msg_ident(char *nick, char *host, struct userrec *u, char *par)
     who[NICKMAX] = 0;
   }
   u2 = get_user_by_handle(userlist, who);
-  if (!u2) {
-    if (u && !quiet_reject)
-      dprintf(DP_HELP, "NOTICE %s :You're not %s, you're %s.\n", nick, nick, u->handle);
-  } else if (rfc_casecmp(who, origbotname) && !u2->bot) {
+  if (u2 && rfc_casecmp(who, origbotname) && !u2->bot) {
     /* This could be used as detection... */
     if (u_pass_match(u2, "-")) {
       putlog(LOG_CMDS, "*", "(%s!%s) !*! IDENT %s", nick, host, who);
-      if (!quiet_reject)
-        dprintf(DP_HELP, "NOTICE %s :You don't have a password set.\n", nick);
     } else if (!u_pass_match(u2, pass)) {
-      if (!quiet_reject)
-        dprintf(DP_HELP, "NOTICE %s :Access denied.\n", nick);
+      putlog(LOG_CMDS, "*", "(%s!%s) !*! failed IDENT %s", nick, host, who);
+      return BIND_RET_BREAK;
     } else if (u == u2) {
-      /*
-       * NOTE: Checking quiet_reject *after* u_pass_match()
-       * verifies the password makes NO sense!
-       * (Broken since 1.3.0+bel17)  Bad Beldin! No Cookie!
-       *   -Toth  [July 30, 2003]
-       */
       dprintf(DP_HELP, "NOTICE %s :I recognize you there.\n", nick);
       return BIND_RET_BREAK;
     } else if (u) {

+ 0 - 12
src/mod/server.mod/server.c

@@ -49,8 +49,6 @@ char botuserip[UHOSTLEN] = "";		/* bot's user@host with the ip. */
 static bool keepnick = 1;		/* keep trying to regain my intended
 				   nickname? */
 static bool nick_juped = 0;	/* True if origbotname is juped(RPL437) (dw) */
-bool quiet_reject = 1;	/* Quietly reject dcc chat or sends from
-				   users without access? */
 static time_t waiting_for_awake;	/* set when i unidle myself, cleared when
 				   i get the response */
 time_t server_online;	/* server connection time */
@@ -846,21 +844,13 @@ static int ctcp_DCC_CHAT(char *nick, char *from, struct userrec *u, char *object
   if (ischanhub() && !glob_chuba(fr))
    ok = 0;
   if (dcc_total == max_dcc) {
-    if (!quiet_reject)
-      dprintf(DP_HELP, "NOTICE %s :%s\n", nick, DCC_TOOMANYDCCS1);
     putlog(LOG_MISC, "*", DCC_TOOMANYDCCS2, "CHAT", param, nick, from);
   } else if (!ok) {
-    if (!quiet_reject)
-      dprintf(DP_HELP, "NOTICE %s :%s\n", nick, DCC_REFUSED2);
     putlog(LOG_MISC, "*", "%s: %s!%s", ischanhub() ? DCC_REFUSED : DCC_REFUSEDNC, nick, from);
   } else if (u_pass_match(u, "-")) {
-    if (!quiet_reject)
-      dprintf(DP_HELP, "NOTICE %s :%s\n", nick, DCC_REFUSED3);
     putlog(LOG_MISC, "*", "%s: %s!%s", DCC_REFUSED4, nick, from);
   } else if (atoi(prt) < 1024 || atoi(prt) > 65535) {
     /* Invalid port */
-    if (!quiet_reject)
-      dprintf(DP_HELP, "NOTICE %s :%s (invalid port)\n", nick, DCC_CONNECTFAILED1);
     putlog(LOG_MISC, "*", "%s: CHAT (%s!%s)", DCC_CONNECTFAILED3, nick, from);
   } else {
     if (!sanitycheck_dcc(nick, from, ip, prt))
@@ -904,8 +894,6 @@ static void dcc_chat_hostresolved(int i)
 #endif /* USE_IPV6 */
   if (dcc[i].sock < 0 || open_telnet_dcc(dcc[i].sock, ip, buf) < 0) {
     strcpy(buf, strerror(errno));
-    if (!quiet_reject)
-      dprintf(DP_HELP, "NOTICE %s :%s (%s)\n", dcc[i].nick, DCC_CONNECTFAILED1, buf);
     putlog(LOG_MISC, "*", "%s: CHAT (%s!%s)", DCC_CONNECTFAILED2, dcc[i].nick, dcc[i].host);
     putlog(LOG_MISC, "*", "    (%s)", buf);
     killsock(dcc[i].sock);

+ 1 - 1
src/mod/server.mod/server.h

@@ -46,7 +46,7 @@ enum {
 
 extern bind_table_t	*BT_ctcp, *BT_ctcr, *BT_msgc;
 extern size_t		nick_len;
-extern bool		quiet_reject, trigger_on_ignore, floodless;
+extern bool		trigger_on_ignore, floodless;
 extern int 		servidx, ctcp_mode, answer_ctcp, serv, curserv;
 extern port_t		default_port, newserverport, curservport;
 extern time_t		server_online, cycle_time;

+ 0 - 12
src/mod/server.mod/servmsg.c

@@ -508,12 +508,6 @@ static int gotmsg(char *from, char *msg)
                    */
                   code = newsplit(&ctcp);
                   if (!strcmp(code, "CHAT")) {
-                    if (!quiet_reject) {
-                      if (u)
-                        dprintf(DP_HELP, "NOTICE %s :%s\n", nick, "I'm not accepting call at the moment.");
-                       else
-                        dprintf(DP_HELP, "NOTICE %s :%s\n", nick, DCC_NOSTRANGERS);
-                    }
                     if (!ischanhub())
                       putlog(LOG_MISC, "*", "%s: %s", DCC_REFUSEDNC, from);
                     else
@@ -522,12 +516,6 @@ static int gotmsg(char *from, char *msg)
                     putlog(LOG_MISC, "*", "Refused DCC %s: %s", code, from);
                   }
                 } else if (!strcmp(code, "CHAT")) {
-                  if (!quiet_reject) {
-                    if (u)
-                      dprintf(DP_HELP, "NOTICE %s :%s\n", nick, "I'm not accepting call at the moment.");
-                    else
-                      dprintf(DP_HELP, "NOTICE %s :%s\n", nick, DCC_NOSTRANGERS);
-                  }
                   if (!ischanhub())
                     putlog(LOG_MISC, "*", "%s: %s", DCC_REFUSEDNC, from);
                   else