boots/README.md

44 lines
2.2 KiB
Markdown
Raw Normal View History

# 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:
* [bottom](https://github.com/numberoverzero/bottom)
* [aiofiles](https://github.com/Tinche/aiofiles)
## 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
2017-09-11 03:53:28 +00:00
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 `msg`, `action`, `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` and `Pa$$w0rd`, respectively.
* The default `Admin` user is not a special user and can be deleted by a user of the same `level` only.
* An admin with `level` 1000 is owner and can add or remove any user of the same or lower access `level`.
* 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.
# TODO
- A better way to handle help pages