From bf896dfe4e89ca1ed668a52590715a30fcdd4cbf Mon Sep 17 00:00:00 2001 From: iou1name Date: Mon, 4 Jun 2018 18:47:27 -0400 Subject: [PATCH] check your privilege --- modules/privilege.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 modules/privilege.py diff --git a/modules/privilege.py b/modules/privilege.py new file mode 100644 index 0000000..dbeb9a6 --- /dev/null +++ b/modules/privilege.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python3 +""" +Checks a given user's privilege. +""" +import random + +from module import commands + + +@commands("check") +def check_privilege(bot, trigger): + """ + Checks the user's privilege. + """ + if trigger.group(2): + nick = trigger.group(2) + else: + nick = trigger.nick + + random.seed(nick) + bot.msg("Privilege: " + str(random.randint(1,9001))) + random.seed()