Kaynağa Gözat

Merge branch 'ducch-63-callerid-ignore' into maint

* ducch-63-callerid-ignore:
  Properly ignore actual host (#63)
  Update DOCS
  Ignore CALLERID requests from ignored users (#63)
Bryan Drewery 13 yıl önce
ebeveyn
işleme
70f51c0104
2 değiştirilmiş dosya ile 8 ekleme ve 2 silme
  1. 1 0
      doc/UPDATES
  2. 7 2
      src/mod/server.mod/servmsg.c

+ 1 - 0
doc/UPDATES

@@ -3,6 +3,7 @@ maint
   * Rename option -c to -m for 'manual' edit, and redirect -c to -C
   * Rename option -c to -m for 'manual' edit, and redirect -c to -C
   * Show a nicer compile error when BUILDTS unable to be determined / gmake is not used.
   * Show a nicer compile error when BUILDTS unable to be determined / gmake is not used.
   * Show 'Do!' in 'chaninfo' for 'Voice-moderate' to be consistent with other flags.
   * Show 'Do!' in 'chaninfo' for 'Voice-moderate' to be consistent with other flags.
+  * Fix CALLERID not respecting ignores (#63)
 
 
 1.4.1 - http://wraith.botpack.net/milestone/1.4.1
 1.4.1 - http://wraith.botpack.net/milestone/1.4.1
   * Update server list, 'set -yes servers -' and 'set -yes servers6 -' to get new list.
   * Update server list, 'set -yes servers -' and 'set -yes servers6 -' to get new list.

+ 7 - 2
src/mod/server.mod/servmsg.c

@@ -1918,6 +1918,7 @@ static int got465(char *from, char *msg)
 static int got718(char *from, char *msg)
 static int got718(char *from, char *msg)
 {
 {
   char *nick = NULL, *uhost = NULL;
   char *nick = NULL, *uhost = NULL;
+  char s[UHOSTLEN + 2] = "";
 
 
   newsplit(&msg);
   newsplit(&msg);
   nick = newsplit(&msg);
   nick = newsplit(&msg);
@@ -1938,11 +1939,15 @@ static int got718(char *from, char *msg)
     uhost = newsplit(&msg);
     uhost = newsplit(&msg);
   fixcolon(msg);
   fixcolon(msg);
 
 
+  simple_snprintf(s, sizeof(s), "%s!%s", nick, uhost);
+
+  if (match_ignore(s)) {
+    return 0;
+  }
+
   if (ischanhub()) {
   if (ischanhub()) {
-    char s[UHOSTLEN + 2] = "";
     struct userrec *u = NULL;
     struct userrec *u = NULL;
 
 
-    simple_snprintf(s, sizeof(s), "%s!%s", nick, uhost);
     u = get_user_by_host(s);
     u = get_user_by_host(s);
     if (u) {
     if (u) {
       struct flag_record fr = { FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0 };
       struct flag_record fr = { FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0 };