{ "CSMSG_REG_SUCCESS", "You now have ownership of $b%s$b." },
{ "CSMSG_PROXY_SUCCESS", "%s now has ownership of $b%s$b." },
{ "CSMSG_ALREADY_REGGED", "$b%s$b is registered to someone else." },
- { "CSMSG_MUST_BE_OPPED", "You must be a channel operator in $b%s$b to register it." },
+ { "CSMSG_MUST_BE_OPPED", "You must be a channel operator (+o) in $b%s$b to register it." },
{ "CSMSG_PROXY_FORBIDDEN", "You may not register a channel for someone else." },
- { "CSMSG_OWN_TOO_MANY", "%s already owns enough channels (at least %d); use FORCE to override." },
+ { "CSMSG_OWN_TOO_MANY", "%s already owns more than the limit of %d channels. Use FORCE to override." },
+ { "CSMSG_YOU_OWN_TOO_MANY", "You already own more than the limit of %d channels. Ask a staff member for help." },
+ { "CSMSG_ANOTHER_SERVICE", "Another service bot is in that channel already. Ask a staff member for help." },
/* Do-not-register channels */
{ "CSMSG_NOT_DNR", "$b%s$b is not a valid channel name or *account." },
char *chan_name;
unsigned int new_channel, force=0;
struct do_not_register *dnr;
+ unsigned int n;
+
if(channel)
{
return 0;
}
- if(!IsHelping(user)
- && (!(mn = GetUserMode(channel, user)) || !(mn->modes & MODE_CHANOP)))
+ if(!IsHelping(user) && (!(mn = GetUserMode(channel, user)) || !(mn->modes & MODE_CHANOP)))
{
reply("CSMSG_MUST_BE_OPPED", channel->name);
return 0;
return 0;
force = (argc > (new_channel+2)) && !irccasecmp(argv[new_channel+2], "force");
dnr = chanserv_is_dnr(chan_name, handle);
+
+ /* Check if they are over the limit.. */
+ if((chanserv_get_owned_count(handle) >= chanserv_conf.max_owned) && !force)
+ {
+ reply("CSMSG_OWN_TOO_MANY", handle->handle, chanserv_conf.max_owned);
+ return 0;
+ }
+
}
else
{
- handle = user->handle_info;
+ handle = user->handle_info;
dnr = chanserv_is_dnr(chan_name, handle);
+ /* Check if they are over the limit.. */
+ if((chanserv_get_owned_count(handle) >= chanserv_conf.max_owned) && !force)
+ {
+ reply("CSMSG_YOU_OWN_TOO_MANY", chanserv_conf.max_owned);
+ return 0;
+ }
+ /* Check if another service is in the channel */
+ if(channel)
+ for(n = 0; n < channel->members.used; n++)
+ {
+ mn = channel->members.list[n];
+ if((mn && mn->user && (mn->user->modes & FLAGS_SERVICE)) || IsLocal(mn->user))
+ {
+ reply("CSMSG_ANOTHER_SERVICE");
+ return 0;
+ }
+ }
}
if(dnr && !force)
{
return 0;
}
+ /* now handled above for message specilization *
if((chanserv_get_owned_count(handle) >= chanserv_conf.max_owned) && !force)
{
reply("CSMSG_OWN_TOO_MANY", handle->handle, chanserv_conf.max_owned);
return 0;
}
+ */
if(new_channel)
channel = AddChannel(argv[1], now, NULL, NULL, NULL);
"PLIST" ("/msg $C PLIST <#channel>",
"This command lists all users of level $bPeon$b on a channel's userlist. If a mask is supplied, only peons matching the mask will be shown.",
"$uSee Also:$u addpeon, delpeon, mdelpeon, users");
-"REGISTER" ("/msg $C REGISTER <#channel> [user|*account] [force]",
- "Registers a channel with $b$C$b, automatically granting owner access to the specified user. If no user is provided, $b$C$b gives owner access to the user executing the command.",
- "If the registrar is on the network staff and provides the third argument, $bforce$b, it will allow a do-not-register channel to be registered anyway.",
- "In addition, $bregister$b will only allow one user to own a certain number of channels without the $bforce$b argument.",
- "$uSee Also:$u addowner, noregister, unregister");
+
+"REGISTER" (
+ "/msg $C REGISTER <#channel>",
+ "Registers a channel to you with $b$C$b. X3 will protect your channel, preserve your ownership of the channel, and provide handy features such as userlists and stats.",
+ "If the channel exists, you must have ops (+o) and there is a limit to the number of channels you may have at once.",
+ "Network staff see /MSG $C HELP STAFF REGISTER",
+ "$uSee Also:$u unregister, giveownership");
+
+"STAFF REGISTER" (
+ "/msg $C REGISTER <#channel> [user|*account] [force]",
+ "Registers a channel to the givin user with $b$C$b.",
+ "If staff provides the third argument, $bforce$b, it will allow the registration even if it is a do-not-register channel or ther register limit will be exceded.",
+ "$uSee Also:$u addowner, noregister, register, unregister");
+
"REMOVENOTE" ("/msg $S REMOVENOTE <typename> [FORCE]",
"Permanently deletes a note type. Without the argument $bFORCE$b, it will only delete an unused note type. With the argument $bFORCE$b, it will delete the note from all channels and then delete the note type.",
"$uSee Also:$u createnote");