Bot::BasicBot::Pluggable::Module::Auth3pm
Authentication for bot::basicbot::pluggable modules
Usage
This module catches messages at priority 1 and stops anything starting with '!' unless the user is authed. Most admin modules, e.g. Loader, can merely sit at priority 2 and assume the user is authed if the !command reaches them. If you want to use modules that can change bot state, like Loader or Vars, you almost certainly want this module.
Version
version 1.30
Irc usage
The default user is 'admin' with password 'julia'. Change this.
!auth <username> <password>
|
Authenticate as an administrators. Logins timeout after an hour. |
|---|---|
!adduser <username> <password>
|
Adds a user with the given password. |
!deluser <username>
|
Deletes a user. Don't delete yourself, that's probably not a good idea. |
!password <old password> <new password>
|
Change your current password (must be logged in first). |
!users
|
List all the users the bot knows about. |
Variables
- password_admin
-
This variable specifies the admin password. Its normally set via the !password directive and defaults to 'julia'. Please change this as soon as possible.
- allow_anonymous
-
If this variable is true, the implicit authentication handling is disabled. Every module will have to check for authentication via the authed method, otherwise access is just granted. This is only useful to allow modules to handle directives starting with an exclamation mark without needing any authentication. And to make things even more interesting, you won't be warned that you haven't authenticated, so modules needing authentication will fail without any warning. It defaults to false and should probably never be changed. You've been warned.
Methods
The only useful method is authed():
- authed($username)
-
Returns 1 if the given username is logged in, 0 otherwise:
if ($bot->module("Auth")->authed("jerakeen")) { ... }
Releases
6 releases since Debian 8 (Jessie); the text changed 4 times.