Tom Insam > Bot-BasicBot-Pluggable > Bot::BasicBot::Pluggable::Module::Auth

Download:
Bot-BasicBot-Pluggable-0.60.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  7
Open  1
View/Report Bugs
Source   Latest Release: Bot-BasicBot-Pluggable-0.98

NAME ^

Bot::BasicBot::Pluggable::Module::Auth - authentication for Bot::BasicBot::Pluggable modules

SYNOPSIS ^

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.

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.

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")) { ... }

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.

AUTHOR ^

Tom Insam <tom@jerakeen.org>

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: