From 6f49101e97ad552abcb99346f06aa09a0d523746 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sven=20M=C3=A4der?= <maeder@phys.ethz.ch>
Date: Tue, 11 Feb 2020 19:19:25 +0100
Subject: [PATCH] Rename project

---
 LICENSE             | 21 +++++++++++++++++++++
 base-config.yaml    |  4 ++--
 maubot.yaml         | 12 ++++++------
 rtlinks.py => rt.py |  4 ++--
 4 files changed, 31 insertions(+), 10 deletions(-)
 create mode 100644 LICENSE
 rename rtlinks.py => rt.py (99%)

diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..4ac6cdd
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+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.
diff --git a/base-config.yaml b/base-config.yaml
index 539e568..319b6f1 100644
--- a/base-config.yaml
+++ b/base-config.yaml
@@ -4,9 +4,9 @@ prefix: 'rt'
 # RT base URL
 url: https://example.com/rt
 # RT Username
-user: rtlinks
+user: maubot
 # RT Password
 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:
 - '@user:example.com'
diff --git a/maubot.yaml b/maubot.yaml
index c9eff4b..2fdedcc 100644
--- a/maubot.yaml
+++ b/maubot.yaml
@@ -2,27 +2,27 @@
 maubot: 0.1.0
 
 # 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.
-version: 0.2.7
+version: 0.2.8
 
 # The SPDX license identifier for the plugin. https://spdx.org/licenses/
 # Optional, assumes all rights reserved if omitted.
-license: GPL3
+license: MIT
 
 # The list of modules to load from the plugin archive.
 # 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.
 # However, top-level modules must always be listed even if they're imported by other modules.
 modules:
-- rtlinks
+- rt
 
 # The main class of the plugin. Format: module/Class
 # 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.
 # The main class must extend maubot.Plugin
-main_class: RTLinksPlugin
+main_class: RT
 
 # Whether or not instances need a database
 database: false
@@ -30,7 +30,7 @@ database: false
 #  Extra files that the upcoming build tool should include in the mbp file.
 extra_files:
 - base-config.yaml
-#- LICENSE
+- LICENSE
 
 # List of dependencies
 #dependencies:
diff --git a/rtlinks.py b/rt.py
similarity index 99%
rename from rtlinks.py
rename to rt.py
index 127e143..f1ba31c 100755
--- a/rtlinks.py
+++ b/rt.py
@@ -15,10 +15,10 @@ class Config(BaseProxyConfig):
         helper.copy("whitelist")
 
 
-class RTLinksPlugin(Plugin):
+class RT(Plugin):
     prefix: str
     whitelist: Set[UserID]
-    headers = {"User-agent": "rtlinksmaubot"}
+    headers = {"User-agent": "maubot-rt"}
     regex_number = re.compile(r'[0-9]{6}')
     regex_properties = re.compile(r'([a-zA-z]+): (.+)')
     regex_history = re.compile(r'([0-9]+): (.+)')
-- 
GitLab