{ "CSMSG_MULTIPLE_OWNERS", "There is more than one owner in %s; please use $bCLVL$b, $bDELOWNER$b and/or $bADDOWNER$b instead." },
{ "CSMSG_TRANSFER_WAIT", "You must wait %s before you can give ownership of $b%s$b to someone else." },
{ "CSMSG_NO_TRANSFER_SELF", "You cannot give ownership to your own account." },
- { "CSMSG_CONFIRM_GIVEOWNERSHIP", "To really give ownership to $b%1$s$b, you must use 'giveownership %1$s %2$s'." },
+ { "CSMSG_CONFIRM_GIVEOWNERSHIP", "To really give ownership to $b%1$s$b, you must use 'giveownership *%1$s %2$s'." },
{ "CSMSG_OWNERSHIP_GIVEN", "Ownership of $b%s$b has been transferred to account $b%s$b." },
/* Ban management */
static CHANSERV_FUNC(cmd_giveownership)
{
struct handle_info *new_owner_hi;
- struct userData *new_owner, *curr_user;
+ struct userData *new_owner;
+ struct userData *curr_user;
+ struct userData *invoker;
struct chanData *cData = channel->channel_info;
struct do_not_register *dnr;
const char *confirm;
chanserv_show_dnrs(user, cmd, NULL, new_owner_hi->handle);
return 0;
}
- if(curr_user && !force && curr_user->access <= UL_OWNER)
+ invoker = GetChannelUser(cData, user->handle_info);
+ if(invoker->access <= UL_OWNER)
{
confirm = make_confirmation_string(curr_user);
- if(!force && ((argc < 3) || strcmp(argv[2], confirm)))
+ if((argc < 3) || strcmp(argv[2], confirm))
{
reply("CSMSG_CONFIRM_GIVEOWNERSHIP", new_owner_hi->handle, confirm);
return 0;
if(nick)
{
const char *modes = conf_get_data("services/chanserv/modes", RECDB_QSTRING);
- chanserv = AddService(nick, modes ? modes : NULL, "Channel Services", NULL);
+ chanserv = AddLocalUser(nick, nick, NULL, "Channel Services", modes);
service_register(chanserv)->trigger = '!';
reg_chanmsg_func('\001', chanserv, chanserv_ctcp_check);
}