Bot::B...::Auth(3pm)
π Bot::B...::Auth β authentication for Bot::BasicBot::Pluggable modules π
okay bestie, so this is Bot::B...::Auth(3pm), part of the User Contributed Perl Documentation situation, and it's genuinely one of those little modules that's doing the most important job in the whole group chat. it's the bouncer. the vibe check. the "you're not on the list, babe" at the door. πͺβ¨
β¨ VERSION β¨
version 1.30 β iconic, as always π
πΈ SYNOPSIS πΈ
so here's the tea: this module catches messages at priority 1 and straight-up stops anything starting with ! unless the user is authed. periodt. π
the way that works is gorgeous actually: most admin modules, like Loader, can just chill at priority 2 and assume the user is authed if the !command even reaches them, because Auth already filtered out all the randos. no cap.
so like, if you want to use modules that can change bot state β Loader or Vars, iykyk β you almost certainly want this module. don't skip it. she's necessary. π
π¦ IRC USAGE π¦
β οΈ the default user isadminwith passwordjulia. Change this. fr fr, immediately. π¨
!auth <username> <password>β authenticate as an administrators π« (yes, the grammar is a little off, we don't gatekeep). heads up tho: logins timeout after an hour. β°!adduser <username> <password>β adds a user with the given password. welcome to the club, bestie π«Ά!deluser <username>β deletes a user. don't delete yourself tho, that's probably not a good idea π (we've all been there)!password <old password> <new password>β change your current password. you must be logged in first, no exceptions π!usersβ list all the users the bot knows about. like a little roster. a guest list. π
π VARIABLES π
password_adminβ this variable specifies the admin password. it's normally set via the!passworddirective and defaults to'julia'. Please change this as soon as possible. i am begging you. πallow_anonymousβ if this variable is true, the implicit authentication handling is disabled. every module will have to check for authentication via theauthedmethod, 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 tofalseand should probably never be changed. You've been warned. π
lowkey allow_anonymous is giving "chaos mode" and highkey you should leave it alone. just saying. π
β METHODS β
the only useful method is authed():
authed($username)β Returns1if the given username is logged in,0otherwise:
if ($bot->module("Auth")->authed("jerakeen")) { ... }
look at that. clean. slay. β¨
π BUGS π
okay so, the honest moment:
- 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. the author doesn't consider this a bug, because he assumes you trust the modules you're loading. (main character trust exercise energy ngl π« )
- If
Authis 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.
π the whole "everyone is admin, passwords are plaintext" thing is genuinely cursed but it is what it is. know what you're loading, bestie.
π AUTHOR π
Mario Domgoergen <mdom@cpan.org> π
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
and that's the whole page, bestie! π this one's Bot::B...::Auth(3pm), living under perl v5.40.0, dated 2024-08-24. go change that default password, mwah π
π
π¦ where this page comes from
- ubuntu resolute: libbot-basicbot-pluggable-perl 1.30+ds1-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libbot-basicbot-pluggable-perl 1.30+ds1-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms