/***********************************************************************
X3 ChangeLog
+2006-08-08 Neil Spierling <sirvulcan@gmail.com>
+
+ * src/chanserv.c: Fixed a crash with giveownership. X3 would crash
+ if a giveownership command was issued in a channel with no owners.
+
2006-08-07 Neil Spierling <sirvulcan@gmail.com>
* configure: Regenerated.
{ "CSMSG_NO_SELF_CLVL", "You cannot change your own access." },
{ "CSMSG_NO_BUMP_ACCESS", "You cannot give users access greater than or equal to your own." },
{ "CSMSG_MULTIPLE_OWNERS", "There is more than one owner in %s; please use $bCLVL$b, $bDELOWNER$b and/or $bADDOWNER$b instead." },
+ { "CSMSG_NO_OWNER", "There is no owner for %s; please use $bCLVL$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_OWNERSHIP_GIVEN", "Ownership of $b%s$b has been transferred to account $b%s$b." },
reply("CSMSG_TRANSFER_WAIT", delay, channel->name);
return 0;
}
+ if (!curr_user) {
+ reply("CSMSG_NO_OWNER", channel->name);
+ return 0;
+ }
if(!(new_owner_hi = modcmd_get_handle_info(user, argv[1])))
return 0;
if(new_owner_hi == user->handle_info)