NAME
Bot::BasicBot::Pluggable::Module::Auth
SYNOPSIS
Authentication for Bot::BasicBot::Pluggable modules
This module catches messages at priority '1' and stops anything starting with '!' unless the user is authed, so most admin modules, eg Loader, can merely sit at priority 2, and assume that 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.
IRC INTERFACE
Commands:
- !auth <username> <password>
-
Authenticate to the bot with a username and password. Logins timeout after an hour, so you'll have to re-auth if you've been away.
- !adduser <username> <password>
-
Adds a user with the given password
- !password <oldpassword> <new password>
-
Change your current password (must be logged in)
- !users
-
List all the users the bot knows about.
- deluser <username>
-
Deletes a user. Don't delete yourself, that's probably not a good idea.
The default user is 'admin', password 'julia'. Change this.
MODULE INTERFACE
The only useful command is 'authed':
if ($bot->module("Auth")->authed("jerakeen")) {
..
returns 1 if the given nick is logged in, 0 otherwise.
BUGS
All users are admins. This is fine at the moment, as the only things that need you to be logged in are admin functions.
Passwords are stored in plaintext, and are trivial to extract for any module on the system. I don't consider this a bug, because I assume you trust the modules you're loading.
If Auth is /not/ loaded, all users effectively have admin permissions. This may not be a good idea, but is also not an Auth bug, it's an architecture bug.