Compare commits

...

10 commits

Author SHA1 Message Date
3bf47d9ded
Bitbot Python3.11 Inital Commit 2024-05-20 22:23:16 -05:00
dependabot[bot]
b9ffe7b027
Bump requests from 2.22.0 to 2.31.0 (#365)
Bumps [requests](https://github.com/psf/requests) from 2.22.0 to 2.31.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.22.0...v2.31.0)

---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-22 17:29:10 -05:00
David Schultz
5321cef954
Merge pull request #346 from bitbot-irc/dependabot/pip/lxml-4.9.1
Bump lxml from 4.6.3 to 4.9.1
2022-07-11 17:51:02 -05:00
David Schultz
b4c4960578
Merge pull request #344 from bitbot-irc/jess/channel-context
support +draft/channel-context in modules/greeting.py
2022-07-11 17:48:49 -05:00
dependabot[bot]
db0fae9869
Bump lxml from 4.6.3 to 4.9.1
Bumps [lxml](https://github.com/lxml/lxml) from 4.6.3 to 4.9.1.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-4.6.3...lxml-4.9.1)

---
updated-dependencies:
- dependency-name: lxml
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-06 20:10:21 +00:00
jesopo
bb0eadbbea support +draft/channel-context in modules/greeting.py 2022-04-22 10:14:47 +00:00
David Schultz
4a6037c774
ignore.py: fix permissions 2021-07-22 13:15:53 -05:00
David Schultz
b46314af69
bump feedparser to 6.0.2 2021-06-24 20:27:54 -05:00
dependabot[bot]
498c1ea193 Bump lxml from 4.6.2 to 4.6.3 (#309)
* update lxml

* update py cryptography lib to 3.3.2

* Bump lxml from 4.6.2 to 4.6.3

Bumps [lxml](https://github.com/lxml/lxml) from 4.6.2 to 4.6.3.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-4.6.2...lxml-4.6.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: jesopo <github@lolnerd.net>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-31 15:31:18 +00:00
jesopo
5f895544a8 freenode is dead long live libera.chat 2021-05-25 17:43:57 +00:00
7 changed files with 19 additions and 14 deletions

View file

@ -16,7 +16,7 @@ If you wish to create backups of your BitBot instance (which you should, [borgba
I run BitBot as-a-service on most popular networks (willing to add more networks!) and offer github/gitea/gitlab webhook to IRC notifications for free to FOSS projects. Contact me for more information!
## Contact/Support
Come say hi at [#bitbot on freenode](https://webchat.freenode.net/?channels=#bitbot)
Come say hi at `#bitbot` on irc.libera.chat
## License
This project is licensed under GNU General Public License v2.0 - see [LICENSE](LICENSE) for details.

View file

@ -15,8 +15,8 @@ class Module(ModuleManager.BaseModule):
today = datetime.datetime.utcnow().date()
week = datetime.timedelta(days=7)
not_valid_until = (today-certificate.not_valid_before.date()).days
not_valid_after = (certificate.not_valid_after.date()-today).days
not_valid_until = (today-certificate.not_valid_before_utc.date()).days
not_valid_after = (certificate.not_valid_after_utc.date()-today).days
if not_valid_until < 0:
self.log.warn(

View file

@ -2,6 +2,8 @@
from src import ModuleManager, utils
CAP = utils.irc.Capability("message-tags", "draft/message-tags-0.2")
@utils.export("channelset", utils.Setting("greeting",
"Set a greeting to send to users when they join",
example="welcome to the channel!"))
@ -10,5 +12,9 @@ class Module(ModuleManager.BaseModule):
def join(self, event):
greeting = event["channel"].get_setting("greeting", None)
if greeting:
tags = {}
if event["server"].has_capability(CAP):
tags["+draft/channel-context"] = event["channel"].name
event["user"].send_notice("[%s] %s" % (event["channel"].name,
greeting))
greeting), tags)

View file

@ -1,16 +1,16 @@
beautifulsoup4 ==4.8.0
cryptography >=3.3.2
dataclasses ==0.6;python_version<'3.7'
dnspython ==1.16.0
feedparser ==5.2.1
dnspython ==2.0.0
feedparser ==6.0.2
html5lib ==1.0.1
isodate ==0.6.0
lxml ==4.6.2
lxml ==4.9.1
netifaces ==0.10.9
PySocks ==1.7.1
python-dateutil ==2.8.1
pytz ==2019.2
requests ==2.22.0
requests ==2.31.0
scrypt ==0.8.13
suds-jurko ==0.6
tornado ==6.0.3

View file

@ -235,7 +235,7 @@ class ModuleManager(object):
definition.filename)
module = importlib.util.module_from_spec(import_spec)
sys.modules[import_name] = module
loader = typing.cast(importlib.abc.Loader, import_spec.loader)
loader = typing.cast(importlib._abc.Loader, import_spec.loader)
loader.exec_module(module)
module_object_pointer = getattr(module, "Module", None)

View file

@ -125,7 +125,7 @@ class Module(ModuleManager.BaseModule):
@utils.hook("received.command.serverignore")
@utils.kwarg("help", "Ignore a command on the current server")
@utils.kwarg("permissions", "serverignore")
@utils.kwarg("permission", "serverignore")
@utils.spec("!<command>wordlower")
def server_ignore(self, event):
command = event["spec"][0]
@ -141,7 +141,7 @@ class Module(ModuleManager.BaseModule):
@utils.hook("received.command.serverunignore")
@utils.kwarg("help", "Unignore a command on the current server")
@utils.kwarg("permissions", "serverunignore")
@utils.kwarg("permission", "serverunignore")
@utils.spec("!<command>wordlower")
def server_unignore(self, event):
command = event["spec"][0]
@ -154,4 +154,3 @@ class Module(ModuleManager.BaseModule):
event["server"].del_setting(setting)
event["stdout"].write("No longer ignoring '%s' for %s" %
(command, str(event["server"])))

View file

@ -304,8 +304,8 @@ def request_many(requests: typing.List[Request]) -> typing.Dict[str, Response]:
loop = asyncio.new_event_loop()
awaits = []
for request in requests:
awaits.append(_request(request))
task = asyncio.wait(awaits, loop=loop, timeout=5)
awaits.append(loop.create_task(_request(request)))
task = asyncio.wait(awaits, timeout=5)
loop.run_until_complete(task)
loop.close()