]> jfr.im git - irc/evilnet/x3.git/commitdiff
invite now checks silence/invite lists
authorsirvulcan <redacted>
Sun, 9 Jul 2006 16:59:10 +0000 (16:59 +0000)
committersirvulcan <redacted>
Sun, 9 Jul 2006 16:59:10 +0000 (16:59 +0000)
ChangeLog
src/chanserv.c

index 96040e15ea2764681031caa669a02bb5ed6c9e31..e85edf9a667207948efce09e61668df53c36cae8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
 /***********************************************************************
  X3 ChangeLog
 
+2006-07-10  Neil Spierling <sirvulcan@gmail.com>
+
+       * src/chanserv.c: INVITE now checks the targets ignore/silence list.
+       If the target is ignoring the person inviting them then the invite
+       is denied.
+
 2006-07-07  Alex Schumann  <rubin@afternet.org>
 
        * src/mod-memoserv.c: pLaYa reported a crash/corruption bug in
index da9298e81ba216a51056da5b2df3af8022acaec0..4a593bf4145b5120478699cf1d2833da24fe9a0b 100644 (file)
@@ -353,6 +353,7 @@ static const struct message_entry msgtab[] = {
     { "CSMSG_INVITED_USER", "Invited $b%s$b to join %s." },
     { "CSMSG_INVITING_YOU_REASON", "$b%s$b invites you to join %s: %s" },
     { "CSMSG_INVITING_YOU", "$b%s$b invites you to join %s." },
+    { "CSMSG_CANNOT_INVITE", "You cannot invite %s to %s." },
     { "CSMSG_ALREADY_PRESENT", "%s is already in $b%s$b." },
     { "CSMSG_YOU_ALREADY_PRESENT", "You are already in $b%s$b." },
     { "CSMSG_LOW_CHANNEL_ACCESS", "You lack sufficient access in %s to use this command." },
@@ -4515,6 +4516,17 @@ static CHANSERV_FUNC(cmd_invite)
         else
             send_message(invite, chanserv, "CSMSG_INVITING_YOU", user->nick, channel->name);
     }
+
+    if (invite->handle_info->ignores->used && (argc > 1)) {
+        unsigned int i;
+        for (i=0; i < invite->handle_info->ignores->used; i++) {
+            if (user_matches_glob(user, invite->handle_info->ignores->list[i], MATCH_USENICK)) {
+              reply("CSMSG_CANNOT_INVITE", argv[1], channel->name);
+              return 0;
+            }
+        }
+    }
+
     irc_invite(chanserv, invite, channel);
     if(argc > 1)
        reply("CSMSG_INVITED_USER", argv[1], channel->name);