{ "CSMSG_CONFIRM_DEFAULTS", "To reset %s's settings to the defaults, you muse use 'set defaults %s'." },
{ "CSMSG_SETTINGS_DEFAULTED", "All settings for %s have been reset to default values." },
{ "CSMSG_BAD_SETLEVEL", "You cannot change any setting to above your level." },
+ { "CSMSG_BAD_SETTERS", "You cannot change Setters to above your level." },
{ "CSMSG_INVALID_MODE_LOCK", "$b%s$b is an invalid mode lock." },
{ "CSMSG_INVALID_NUMERIC", "$b%d$b is not a valid choice. Choose one:" },
{ "CSMSG_SET_DEFAULT_TOPIC", "$bDefaultTopic$b %s" },
}
}
+ if(!max_access)
+ {
+ min_access = 1;
+ max_access = UL_OWNER;
+ }
send_message(user, chanserv, "CSMSG_TRIMMED_USERS", count, min_access, max_access, channel->name, intervalString(interval, duration));
return 1;
}
return 0;
}
value = user_level_from_name(argv[1], UL_OWNER+1);
- if(!value && !isdigit(argv[1][0]))
+ if(!value && strcmp(argv[1], "0"))
{
reply("CSMSG_INVALID_ACCESS", argv[1]);
return 0;
}
uData = GetChannelUser(cData, user->handle_info);
- if(!uData)
+ if(!uData || ((uData->access < UL_OWNER) && (value > uData->access)))
{
reply("CSMSG_BAD_SETLEVEL");
return 0;
}
+ if((option == lvlSetters) && (value > uData->access))
+ {
+ reply("CSMSG_BAD_SETTERS");
+ return 0;
+ }
cData->lvlOpts[option] = value;
}
reply(levelOptions[option].format_name, cData->lvlOpts[option]);
const char *fmt;
REQUIRE_PARAMS(2);
- if((count = strtoul(argv[1], &sep, 10)) <= 1)
+ if((count = strtoul(argv[1], &sep, 10)) < 1)
goto no_dice;
if(sep[0] == 0)
{
+ if(count == 1)
+ goto no_dice;
sides = count;
count = 1;
modifier = 0;
sprintf(response, fmt, total, sides);
}
if(channel)
- send_target_message(5, channel->name, cmd->parent->bot, "$b%s$b: %s", user->nick, response);
+ send_channel_message(channel, cmd->parent->bot, "$b%s$b: %s", user->nick, response);
else
send_message_type(4, user, cmd->parent->bot, "%s", response);
return 1;
}
if(uData->access >= UL_PRESENT)
cData->visited = now;
-
- uData->seen = now;
- uData->present = 1;
-
if(cData->user_greeting)
greeting = cData->user_greeting;
if(uData->info
&& ((now - uData->seen) >= chanserv_conf.info_delay)
&& !uData->present)
info = 1;
+ uData->seen = now;
+ uData->present = 1;
}
}
if(!user->uplink->burst)
if(greeting && !user->uplink->burst)
send_message_type(4, user, chanserv, "(%s) %s", channel->name, greeting);
if(uData && info)
- send_target_message(4, channel->name, chanserv, "[%s] %s", user->nick, uData->info);
+ send_target_message(5, channel->name, chanserv, "[%s] %s", user->nick, uData->info);
}
return 0;
}
static void
handle_kick(struct userNode *kicker, struct userNode *victim, struct chanNode *channel)
{
- char *reason = "CSMSG_USER_PROTECTED";
+ const char *reason = user_find_message(kicker, "CSMSG_USER_PROTECTED");
if(!channel->channel_info || !kicker || IsService(kicker)
|| (kicker == victim) || IsSuspended(channel->channel_info)
}
if(bounce)
{
- if((bounce->argc = bnc))
+ if((bounce->argc = bnc) || bounce->modes_set || bounce->modes_clear)
mod_chanmode_announce(chanserv, channel, bounce);
mod_chanmode_free(bounce);
}
"UNBANME" ("/msg $C UNBANME <#channel>",
"Unbans your hostmask from the specified channel.",
"$bSee Also:$b ban, unban");
-"UNREGISTER" ("/msg $C UNREGISTER <#channel>",
+"UNREGISTER" ("/msg $C UNREGISTER <#channel> [<confirmation>]",
"Unregisters a channel that is registered with $b$C$b. $bIMPORTANT$b: Once the channel is unregistered, the userlist $bcannot$b be recovered.",
- "If you are not network staff, you must add $bCONFIRM$b to the end of your line to confirm channel unregistration.",
+ "If you are not network staff, you must add a confimation string to the end of your line to confirm the unregistration. If you leave it out, $C will show the proper confirmation string.",
"$bSee Also:$b register");
"UNSUSPEND" ("/msg $C UNSUSPEND <#channel> <nick|*account>",
"This restores the target's access to the channel (after it has been suspended).",