@verb #12:"@registerme @register-me" any any any rdo #55 @program #12:"@registerme @register-me" any any any "@registerme as -- enter a new email address for player" " will change the database entry, assign a new password, and mail the new password to the player at the given email address." if (player != this) return player:tell(E_PERM) elseif (this:isa($guest)) return player:tell("Sorry, guests should request characters from the Moo's title screen. Type '@quit', then reconnect to the Moo. Don't log in as a guest, use the 'request' command.") endif connection = $string_utils:connection_hostname(connection_name(player)) if (!argstr) if (player.email_address) player:tell("You are currently registered as: ", player.email_address) else player:tell("You are not currently registered.") endif return player:tell("Use @registerme as <address> to change this.") elseif (prepstr != "as" || !iobjstr || dobjstr) return player:tell("Usage: @registerme as <address>") endif email = iobjstr if (reason = $wiz_utils:check_reregistration(this.name, email, connection)) if (reason[1] == "-") if (!$command_utils:yes_or_no(reason[2..$] + ". Automatic registration not allowed. Ask to be registered at this address anyway?")) return player:notify("Okay.") endif else return player:tell(reason, " Please try again.") endif endif if ($network.active && !reason) if (!$command_utils:yes_or_no(tostr("If you continue, your password will be changed, the new password mailed to `", email, "'. Do you want to continue?"))) return player:notify("Registration terminated.") endif password = $wiz_utils:random_password(5) old = player.email_address || "[ unregistered ]" player:tell("Registering you, and changing your password and mailing new one to ", email, ".") result = $network:sendmail(email, tostr("Your ", $name, " character, ", player.name), "Reply-to: " + $login.registration_address, @$editor:fill_string(tostr("Your ", $name, " character, ", $string_utils:nn(player), " has been registered to this email address (", email, "), and a new password assigned. The new password is `", password, "'. Please keep your password secure. You can change your password with the @password command."), 75)) if (result != 0) player:tell("Mail sending did not work: ", reason, ". Reregistration terminated.") return endif player:tell("Mail with your new password forwarded. If you do not get it, send regular email to ", $login.registration_address, " with your character name.") $mail_agent:send_message($slacker, $pcl, "reg " + $string_utils:nn(this), {email, tostr("formerly ", old)}) this:set_email_address(email, "Reregistered at " + ctime()) player.password = string_hash(password) else player:notify("No automatic reregistration: your request will be forwarded.") if (typeof(curreg = $registration_db:find_exact(email)) == $LIST) additional_info = {"Current registration information for this email address:", @$registration_db:describe_registration(curreg)} else additional_info = {} endif $mail_agent:send_message(this, $slacker, "Registration request", {"Reregistration request from " + $string_utils:nn(player) + " connected via " + connection + ":", "", "@register " + player.name + " " + email, "@new-password " + player.name + " is ", "", "Reason this request was forwarded:", reason, @additional_info}) endif "Last modified by Dax (#789) on Sat May 21 03:51:16 2005 MDT." .