aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jesopo2019-02-17 14:26:18 +0000
committerGravatar jesopo2019-02-17 14:26:18 +0000
commitec49140a7093cc7aebacf9eb5b6cd88c131a7e84 (patch)
treec85f0d8695165502ddb636cc380458f4fbfe0c9f
parentPut a helper function in utils to do iso8601 formatting. change IRCServer's (diff)
signature
Move permissions.py in to a directory and add a README.md for it
-rw-r--r--modules/permissions/README.md32
-rw-r--r--modules/permissions/__init__.py (renamed from modules/permissions.py)0
2 files changed, 32 insertions, 0 deletions
diff --git a/modules/permissions/README.md b/modules/permissions/README.md
new file mode 100644
index 00000000..18f049d6
--- /dev/null
+++ b/modules/permissions/README.md
@@ -0,0 +1,32 @@
+# Permissions
+
+## Adding an admin user
+
+This is a little complex at the moment but it will get easier some time soon.
+
+### Registering user
+
+Join a channel that BitBo is in (he'll automatically join #bitbot with default
+configuration) and then type
+
+> /msg &lt;botnick> register <password>
+
+### Give * permission
+
+The `*` permission is a special permission that gives you completely unfettered
+access to all of BitBot's functions.
+
+On IRC, send this to BitBot and take note of the ID response
+
+> /msg &lt;botnick> myid
+
+Then take that ID and open the database in sqlite3 (default database location is
+`databases/bot.db`
+
+> $ sqlite3 databases/bot.db
+
+And then insert your `*` permission
+
+> INSERT INTO user_settings VALUES (&lt;id>, 'permissions', '["*"]');
+
+(where `<id>` is the response from the `myid` command)
diff --git a/modules/permissions.py b/modules/permissions/__init__.py
index e620f46f..e620f46f 100644
--- a/modules/permissions.py
+++ b/modules/permissions/__init__.py