Fix SourceForge bug #1529487.
authorMichael Poole <mdpoole@troilus.org>
Sat, 5 Jul 2008 12:14:04 +0000 (08:14 -0400)
committerMichael Poole <mdpoole@troilus.org>
Sat, 5 Jul 2008 12:14:04 +0000 (08:14 -0400)
src/chanserv.c (CSMSG_LOW_CHANNEL_ACCESS): Be more specific.
  (user_opt_autoinvite): Tell the user if his access is too low for the
    option to have an effect.

src/chanserv.c

index 971fbd8c66ac188b78ed72a421446b8a36096a94..d9fb9b876012947c2f149cf9222f04fa2b4db04c 100644 (file)
@@ -310,7 +310,7 @@ static const struct message_entry msgtab[] = {
     { "CSMSG_INVITING_YOU", "$b%s$b invites you to join %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." },
+    { "CSMSG_LOW_CHANNEL_ACCESS", "You lack sufficient access in %s for $S to invite you." },
     { "CSMSG_INFOLINE_TOO_LONG", "Your infoline may not exceed %u characters." },
     { "CSMSG_BAD_INFOLINE", "You may not use the character \\%03o in your infoline." },
 
@@ -5881,6 +5881,10 @@ static MODCMD_FUNC(user_opt_noautoop)
 
 static MODCMD_FUNC(user_opt_autoinvite)
 {
+    if(check_user_level(channel, user, lvlInviteMe, 1, 0))
+    {
+        reply("CSMSG_LOW_CHANNEL_ACCESS", channel->name);
+    }
     return user_binary_option("CSMSG_USET_AUTOINVITE", USER_AUTO_INVITE, CSFUNC_ARGS);
 }