# arch-tag: automatic-ChangeLog--srvx@srvx.net--2004-srvx/srvx--devo--1.3
#
+2004-04-29 01:41:37 GMT Michael Poole <mdpoole@troilus.org> patch-54
+
+ Summary:
+ Fix !up for users below GiveVoice level; implement RFE#933634
+ Revision:
+ srvx--devo--1.3--patch-54
+
+ * If users have access belowGiveVoice, do not let them use UP.
+
+ * Show channel flags (suspended, autoop, etc) in MYACCESS.
+
+ modified files:
+ ChangeLog src/chanserv.c src/chanserv.help
+
+
2004-04-29 00:31:22 GMT Michael Poole <mdpoole@troilus.org> patch-53
Summary:
change.args[0].mode = MODE_CHANOP;
errmsg = "CSMSG_ALREADY_OPPED";
}
- else
+ else if(uData->access >= channel->channel_info->lvlOpts[lvlGiveVoice])
{
change.args[0].mode = MODE_VOICE;
errmsg = "CSMSG_ALREADY_VOICED";
}
+ else
+ {
+ if(argc)
+ reply("CSMSG_NO_ACCESS");
+ return 0;
+ }
change.args[0].mode &= ~change.args[0].member->modes;
if(!change.args[0].mode)
{
static CHANSERV_FUNC(cmd_myaccess)
{
+ static struct string_buffer sbuf;
struct handle_info *target_handle;
struct userData *uData;
- const char *chanName;
if(argc < 2)
target_handle = user->handle_info;
&& (target_handle != user->handle_info)
&& !GetTrueChannelAccess(cData, user->handle_info))
continue;
- chanName = cData->channel->name;
+ sbuf.used = 0;
+ string_buffer_append_printf(&sbuf, "[%s (%d", cData->channel->name, uData->access);
+ if(uData->flags != USER_AUTO_OP)
+ string_buffer_append(&sbuf, ',');
+ if(IsUserSuspended(uData))
+ string_buffer_append(&sbuf, 's');
+ if(IsUserAutoOp(uData))
+ {
+ if(uData->access >= cData->lvlOpts[lvlGiveOps])
+ string_buffer_append(&sbuf, 'o');
+ else if(uData->access >= cData->lvlOpts[lvlGiveVoice])
+ string_buffer_append(&sbuf, 'v');
+ }
+ if(IsUserAutoInvite(uData) && (uData->access >= cData->lvlOpts[lvlInviteMe]))
+ string_buffer_append(&sbuf, 'i');
if(uData->info)
- send_message_type(4, user, cmd->parent->bot, "[%s (%d)] %s", chanName, uData->access, uData->info);
+ string_buffer_append_printf(&sbuf, ")] %s", uData->info);
else
- send_message_type(4, user, cmd->parent->bot, "[%s (%d)]", chanName, uData->access);
+ string_buffer_append_string(&sbuf, ")]");
+ string_buffer_append(&sbuf, '\0');
+ send_message_type(4, user, cmd->parent->bot, sbuf.list);
}
return 1;
"MYACCESS" ("/msg $S MYACCESS [<nick|*account>]",
"Lists channels where you have access and infolines in each.",
"Network staff may specify a nickname or *account to view the list for another user.",
+ "Your access level in the channel may be followed by a comma and one of the following characters:",
+ " s Your access in the channel has been suspended.",
+ " o AutoOp is active.",
+ " v AutoVoice is active.",
+ " i AutoInvite is active.",
"$uSee Also:$u access, users");
"ACCESS" ("/msg $S ACCESS <#channel> [<nick|*account>]",
"Reports various pieces of information about a channel user, including channel and network access level, and the user's info line. If no nick or account is provided, $S returns your own information.",