# arch-tag: automatic-ChangeLog--srvx@srvx.net--2005-srvx/srvx--devo--1.3
#
+2005-12-23 03:11:09 GMT Michael Poole <mdpoole@troilus.org> patch-35
+
+ Summary:
+ Default to not trimming users on vacation.
+ Revision:
+ srvx--devo--1.3--patch-35
+
+ chanserv.c (cmd_trim_users): New argument to indicate whether users on
+ vacation should be included.
+ (cmd_trim): Parse an extra option to control that argument.
+
+ chanserv.help: Document this change.
+
+ modified files:
+ ChangeLog src/chanserv.c src/chanserv.help
+
+
2005-12-23 03:06:55 GMT Michael Poole <mdpoole@troilus.org> patch-34
Summary:
}
static int
-cmd_trim_users(struct userNode *user, struct chanNode *channel, unsigned short min_access, unsigned short max_access, unsigned long duration)
+cmd_trim_users(struct userNode *user, struct chanNode *channel, unsigned short min_access, unsigned short max_access, unsigned long duration, int vacation)
{
struct userData *actor, *uData, *next;
char interval[INTERVALLEN];
{
next = uData->next;
- if((uData->seen > limit) || uData->present)
+ if((uData->seen > limit)
+ || uData->present
+ || (HANDLE_FLAGGED(uData->handle, FROZEN) && !vacation))
continue;
if(((uData->access >= min_access) && (uData->access <= max_access))
{
unsigned long duration;
unsigned short min_level, max_level;
+ int vacation;
REQUIRE_PARAMS(3);
+ vacation = argc > 3 && !strcmp(argv[3], "vacation");
duration = ParseInterval(argv[2]);
if(duration < 60)
{
}
else if(!irccasecmp(argv[1], "users"))
{
- cmd_trim_users(user, channel, 0, 0, duration);
+ cmd_trim_users(user, channel, 0, 0, duration, vacation);
return 1;
}
else if(parse_level_range(&min_level, &max_level, argv[1]))
{
- cmd_trim_users(user, channel, min_level, max_level, duration);
+ cmd_trim_users(user, channel, min_level, max_level, duration, vacation);
return 1;
}
else if((min_level = user_level_from_name(argv[1], UL_OWNER)))
{
- cmd_trim_users(user, channel, min_level, min_level, duration);
+ cmd_trim_users(user, channel, min_level, min_level, duration, vacation);
return 1;
}
else
"$uSee Also:$u unsuspend, deluser");
"TOPIC" ("/msg $C TOPIC <#channel> [topic]",
"Sets the current topic for the specified channel. If no topic is specified, then set the current topic to the default topic.");
-"TRIM" ("/msg $C TRIM <#channel> <target> <duration>",
+"TRIM" ("/msg $C TRIM <#channel> <target> <duration> [vacation]",
"The trim command removes target objects inactive for more than a certain duration from a channel. The target must be a channel access level, a range of access levels (for example, \"300-399\"), \"users\" or \"bans\". The duration argument specifies the amount of time the target has been inactive for to be removed.",
+ "If the vacation argument is given for the users target, users who are on vacation will be trimmed. By default they are skipped.",
"$uSee Also:$u durations");
"UNBAN" ("/msg $C UNBAN <#channel> <mask|nick>",
"Unbans the specified nick or hostmask. If a nick is given, $b$C$b determines what hostmask(s) to unban.",