From 7525d2c31504ab2b353edb97560f29822b88ea07 Mon Sep 17 00:00:00 2001 From: RhinosF1 Date: Tue, 6 Oct 2020 16:47:15 +0100 Subject: [PATCH] build: include adminlist (#316) * Update requirements.txt * Delete adminlist.py * Update setup.cfg * Update requirements.txt * bump * build: adjust extra reqs * Update .travis.yml * Update .travis.yml * Update .travis.yml * attempt fix * aah * Update .travis.yml * Update .travis.yml Co-authored-by: MacFan4000 --- .travis.yml | 2 +- MirahezeBots/plugins/adminlist.py | 29 ----------------------------- requirements.txt | 7 +++++-- setup.cfg | 1 - 4 files changed, 6 insertions(+), 33 deletions(-) delete mode 100644 MirahezeBots/plugins/adminlist.py diff --git a/.travis.yml b/.travis.yml index e77e27d0..6a7a4834 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ script: - pytest tests/test_rss.py - pytest tests/test_json.py - pip-missing-reqs --ignore-file=setup.py --ignore-module=pytest --ignore-module=MirahezeBots.* . - - pip-extra-reqs . + - pip-extra-reqs --ignore-requirement=sopel-plugins.adminlist . - pip check after_script: diff --git a/MirahezeBots/plugins/adminlist.py b/MirahezeBots/plugins/adminlist.py deleted file mode 100644 index 246455cf..00000000 --- a/MirahezeBots/plugins/adminlist.py +++ /dev/null @@ -1,29 +0,0 @@ -"""This plugin provides admin list and access level information.""" - -from sopel.module import commands - - -@commands('botadmins', 'admins') -def admin_list(bot, trigger): - """Provide the list of bot admins.""" - admins = bot.config.core.admin_accounts - if len(admins) == 0: - bot.reply('There are no bot admins') - return - - admins = ['You' if admin == trigger.account else admin for admin in admins] - admins_str = ', '.join(admins[:-1]) + ' and ' + admins[-1] - bot.reply('The bot\'s admins are: ' + admins_str) - - -@commands('accesslevel', 'access') -def access_level(bot, trigger): - """Tell user what access level they have for the bot.""" - if trigger.account == bot.config.core.owner_account: - level = 'Owner' - elif trigger.account in bot.config.core.admin_accounts: - level = 'Admin' - else: - level = 'User' - - bot.say('The access level for {} is {}.'.format(trigger.nick, level)) diff --git a/requirements.txt b/requirements.txt index 3bb81631..e2e72dcd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,9 @@ -# dependenices used in test MirahezeBot +# dependenices used in MirahezeBot feedparser==6.0.1 -MirahezeBots-jsonparser==1.0.0 requests==2.24.0 sopel>=7.0.5,<8 SQLAlchemy==1.3.19 +# shared util scripts +MirahezeBots-jsonparser==1.0.0 +# code migrated to own repo awaiting bundle switch +sopel-plugins.adminlist==1.0.2 diff --git a/setup.cfg b/setup.cfg index 82d45102..1ff532c3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,7 +15,6 @@ classifiers = python_requires = >=3.6 [options.entry_points] sopel.plugins = - adminlist = MirahezeBots.plugins.adminlist channelmgnt = MirahezeBots.plugins.channelmgnt joinall = MirahezeBots.plugins.joinall miraheze = MirahezeBots.plugins.miraheze