DamnRegister
DamnRegister 是一个用于从 Minecraft 内部注册网站用户的插件。它包含一个用于 Drupal 的 RPC 模块作为第二部分,但根据你的网站系统,即使不使用 Drupal 部分,你可能也能使用此插件。
用户可以输入 /register some@email.com,该插件将连接到 Drupal 并使用其 Minecraft 用户名和提供的电子邮件创建用户。然后 Drupal 会向用户发送一封包含链接的电子邮件,他们可以使用该链接确认电子邮件并重置密码。
配置允许使用任何 URL 和任何 POST 主体模板。
来自服务器的响应也可以映射到不同的游戏内消息。
如果你需要 GET 或其他功能,请在这个 Minecraft 服务器 damnation.eu(或者 simply join the server for awesomeness/fun)上找到我 (Faua)
安装
- 在 Drupal 安装中安装 Drupal 模块(DamnRegisterDrupal.zip 在文件部分)
- 以管理员用户身份登录 Drupal 并启用该模块。
- 之后你可以点击模块上的配置并设置一些随机共享密钥
- 安装 Minecraft 模块并执行 /reload 以启动插件
- 编辑 plugins/DamnRegister/config.yml 并将 URL 更改为包含之前创建的密钥
- 给用户授予
damnregister.register 权限以允许他们使用该命令
配置
默认配置安装应该非常容易适应 Drupal 模块,你只需要更改 "<string>secret</string>" 部分以符合你在 Drupal 中配置的密钥即可。
但如果需要为其他 Web 系统使用,以下是如何将其适应为一个假设的 PHP 脚本,该脚本接收用户名和电子邮件,并以换行符作为分隔符,并以简单状态文本返回。
#当用户运行 /register 时要调用的 url
url: http://localhost/myowncallback.php
#body 是发送到 url 的 url
# %1$s 将被替换为 minecraft 用户名
# %2$s 将被替换为传递给 /register 方法的第一个参数
body: "%1$s\n%2$s"
answers:
- response: "OK"
answer: A mail has been sent to you with further information
- response: "INVALIDEMAIL"
answer: Your email is not valid
#未在此处定义的任何响应都将导致将响应输出到日志,并显示一条错误消息,要求用户联系管理员。
开发者信息
源代码可以在 github 上找到
DamnRegister
DamnRegister is a plugin to register website users from inside minecraft. It includes a RPC module for drupal that work as the second part, but depending on you website system you might be able to use this even without the drupal part.
A user can type /register some@email.com and this plugin will connect to drupal and create user with his minecraft username and email given. Drupal will then send an email to the user with a link they can use to confirm the email with and reset the password.
The configuration makes it possible to usr any url and any POST body template.
Responses from the server can also be mapped to different in-game messages.
if you need GET or something else find me (Faua) on this minecraft server damnation.eu (or simply join the server for awesomeness/fun)
Installation
- Install the drupal module (DamnRegisterDrupal.zip in the files section) in your drupal installation
- Login as admin user in drupal and enable the module.
- After that you can click configure on the module and setup some random shared secret
- Install the minecraft module and /reload to start the plugin
- edit the plugins/DamnRegister/config.yml and change the url to include the previously made secret
- give users access to the
damnregister.register to allow them to use the command
Configuration
The default config install should be very easy to adapt to drupal module where you just need to change the "<string>secret</string>" part to fit the secret you have configured in drupal.
But in case you need it for some other websystem this is how you could adapt it for an imaginary php script that takes in the username and email with a newline as a separator, and returns with and simple status text.
#url to call when a user run /register
url: http://localhost/myowncallback.php
#body is the url which is sent to the url
# %1$s will be replaced with the minecraft username
# %2$s will be replaced with with the first argument passed to the /register method
body: "%1$s\n%2$s"
answers:
- response: "OK"
answer: A mail has been sent to you with further information
- response: "INVALIDEMAIL"
answer: Your email is not valid
#Any responses not defined here will result in outputting the response to the log and displaying an error message asking the user to contact an admin.
Developer Information
Source can be found on github
评论 0
登录后参与评分
还没有评论,来抢沙发吧