{ "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_OWNERSHIP_GIVEN", "Ownership of $b%s$b has been transferred to account $b%s$b." },
/* Ban management */
struct userData *new_owner, *curr_user;
struct chanData *cData = channel->channel_info;
struct do_not_register *dnr;
+ const char *confirm;
unsigned int force;
unsigned short co_access;
char reason[MAXLEN];
}
curr_user = owner;
}
- else if (!force && (now < (time_t)(cData->ownerTransfer + chanserv_conf.giveownership_period)))
+ else if(!force && (now < (time_t)(cData->ownerTransfer + chanserv_conf.giveownership_period)))
{
char delay[INTERVALLEN];
intervalString(delay, cData->ownerTransfer + chanserv_conf.giveownership_period - now, user->handle_info);
chanserv_show_dnrs(user, cmd, NULL, new_owner_hi->handle);
return 0;
}
+ if(curr_user && !force && curr_user->access <= UL_OWNER)
+ {
+ confirm = make_confirmation_string(curr_user);
+ if(!force && ((argc < 3) || strcmp(argv[2], confirm)))
+ {
+ reply("CSMSG_CONFIRM_GIVEOWNERSHIP", new_owner_hi->handle, confirm);
+ return 0;
+ }
+ }
if(new_owner->access >= UL_COOWNER)
co_access = new_owner->access;
else
{
scan_user_presence(uData, mn->user);
uData->seen = now;
+ if (uData->access >= UL_PRESENT)
+ cData->visited = now;
}
if(IsHelping(mn->user) && IsSupportHelper(mn->user))
CS_LOG = log_register_type("ChanServ", "file:chanserv.log");
conf_register_reload(chanserv_conf_read);
- reg_server_link_func(handle_server_link);
-
- reg_new_channel_func(handle_new_channel);
- reg_join_func(handle_join);
- reg_part_func(handle_part);
- reg_kick_func(handle_kick);
- reg_topic_func(handle_topic);
- reg_mode_change_func(handle_mode);
- reg_nick_change_func(handle_nick_change);
+ if(nick)
+ {
+ reg_server_link_func(handle_server_link);
+ reg_new_channel_func(handle_new_channel);
+ reg_join_func(handle_join);
+ reg_part_func(handle_part);
+ reg_kick_func(handle_kick);
+ reg_topic_func(handle_topic);
+ reg_mode_change_func(handle_mode);
+ reg_nick_change_func(handle_nick_change);
+ reg_auth_func(handle_auth);
+ }
- reg_auth_func(handle_auth);
reg_handle_rename_func(handle_rename);
reg_unreg_func(handle_unreg);