Skip to content
Snippets Groups Projects
Commit 6f49101e authored by Sven Mäder's avatar Sven Mäder :speech_balloon:
Browse files

Rename project

parent 8d46b9a8
No related branches found
No related tags found
No related merge requests found
LICENSE 0 → 100644
MIT License
Copyright (c) 2020 Sven Mäder
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
...@@ -4,9 +4,9 @@ prefix: 'rt' ...@@ -4,9 +4,9 @@ prefix: 'rt'
# RT base URL # RT base URL
url: https://example.com/rt url: https://example.com/rt
# RT Username # RT Username
user: rtlinks user: maubot
# RT Password # RT Password
pass: secret pass: secret
# The list of user IDs who are allowed to modify stuff. # The list of user IDs who are allowed to use commands
whitelist: whitelist:
- '@user:example.com' - '@user:example.com'
...@@ -2,27 +2,27 @@ ...@@ -2,27 +2,27 @@
maubot: 0.1.0 maubot: 0.1.0
# The unique ID for the plugin. Java package naming style. (i.e. use your own domain, not xyz.maubot) # The unique ID for the plugin. Java package naming style. (i.e. use your own domain, not xyz.maubot)
id: isg.rda.rtlinks id: ch.ethz.phys.rt
# A PEP 440 compliant version string. # A PEP 440 compliant version string.
version: 0.2.7 version: 0.2.8
# The SPDX license identifier for the plugin. https://spdx.org/licenses/ # The SPDX license identifier for the plugin. https://spdx.org/licenses/
# Optional, assumes all rights reserved if omitted. # Optional, assumes all rights reserved if omitted.
license: GPL3 license: MIT
# The list of modules to load from the plugin archive. # The list of modules to load from the plugin archive.
# Modules can be directories with an __init__.py file or simply python files. # Modules can be directories with an __init__.py file or simply python files.
# Submodules that are imported by modules listed here don't need to be listed separately. # Submodules that are imported by modules listed here don't need to be listed separately.
# However, top-level modules must always be listed even if they're imported by other modules. # However, top-level modules must always be listed even if they're imported by other modules.
modules: modules:
- rtlinks - rt
# The main class of the plugin. Format: module/Class # The main class of the plugin. Format: module/Class
# If `module` is omitted, will default to last module specified in the module list. # If `module` is omitted, will default to last module specified in the module list.
# Even if `module` is not omitted here, it must be included in the modules list. # Even if `module` is not omitted here, it must be included in the modules list.
# The main class must extend maubot.Plugin # The main class must extend maubot.Plugin
main_class: RTLinksPlugin main_class: RT
# Whether or not instances need a database # Whether or not instances need a database
database: false database: false
...@@ -30,7 +30,7 @@ database: false ...@@ -30,7 +30,7 @@ database: false
# Extra files that the upcoming build tool should include in the mbp file. # Extra files that the upcoming build tool should include in the mbp file.
extra_files: extra_files:
- base-config.yaml - base-config.yaml
#- LICENSE - LICENSE
# List of dependencies # List of dependencies
#dependencies: #dependencies:
......
...@@ -15,10 +15,10 @@ class Config(BaseProxyConfig): ...@@ -15,10 +15,10 @@ class Config(BaseProxyConfig):
helper.copy("whitelist") helper.copy("whitelist")
class RTLinksPlugin(Plugin): class RT(Plugin):
prefix: str prefix: str
whitelist: Set[UserID] whitelist: Set[UserID]
headers = {"User-agent": "rtlinksmaubot"} headers = {"User-agent": "maubot-rt"}
regex_number = re.compile(r'[0-9]{6}') regex_number = re.compile(r'[0-9]{6}')
regex_properties = re.compile(r'([a-zA-z]+): (.+)') regex_properties = re.compile(r'([a-zA-z]+): (.+)')
regex_history = re.compile(r'([0-9]+): (.+)') regex_history = re.compile(r'([0-9]+): (.+)')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment