b464d07340
Added a semi-sane logging system across the board. See merge request !1 |
||
---|---|---|
boots | ||
config | ||
LICENSE | ||
README.md | ||
requirements.txt |
boots
Description
This project is an attempt to write a fully featured IRC bot. I am learning to write code in python and get better at it. If you are reading this then you are welcome to contribute code, reviews are a part of learning programming =)
Requirements
This code only requires the following dependencies:
8ball
The Eightball
class gives the bot the ability to support the iconic 8Ball game.
It will only answer to the keyword
provided to the Eightball
object.
Admin
The Admin
module provides the ability to add bot administrators who can request some destructive actions that might put the bot itself being abused like join
, part
and quit
.
Commands
So far, the Admin
module by default creates a new pickle
database if one does not exist yet, otherwise it will attempt to import it.
The Admin
module supports multiple commands to manage administrators. Currently, it supports login
, logout
, passwd
, add
, rm
and list
.
A rudimentary help
system was written, this system needs to be replaced in the future with a system wide event driven help compiler of sorts.
Behaviours
A few default behaviours to note about the Admin
module.
- If no database exists, it will create one with a default username and password as
Admin
andPa$$w0rd
, respectively.- The default
Admin
user is not a special user and can be deleted by a user of the samelevel
only. - An admin with
level
1000 is owner and can add or remove any user of the same or lower accesslevel
.
- The default
- If a database exists, it will attempt to import it. If it fails, it will create a new database talked about in the previous point.
- Default behaviour is that an admin can add another admin with an access
level
lower than their own. - Default behaviour is that an admin cannot remove another admin with equal or higher access
level
than their own. - Default behaviour when an admin uses the
passwd
command to change their password, they will be immediately logged out on successful password change and will require to log back in to test that they set the right password.
- Default behaviour is that an admin can add another admin with an access
TODO
- A better way to handle help pages