summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2020-05-28 22:55:06 +0000
committergumi <git@gumi.ca>2020-05-28 22:55:06 +0000
commit378c608539d542df27c5fea00ea9b633f202ea7a (patch)
tree7e85f292caf0acdcc2caf6eafae13e5a9ae59fff
downloadpolicies-378c608539d542df27c5fea00ea9b633f202ea7a.tar.gz
policies-378c608539d542df27c5fea00ea9b633f202ea7a.tar.bz2
policies-378c608539d542df27c5fea00ea9b633f202ea7a.tar.xz
policies-378c608539d542df27c5fea00ea9b633f202ea7a.zip
first draft
-rw-r--r--.gitignore1
-rw-r--r--LICENSE12
-rw-r--r--Makefile12
-rw-r--r--README.md10
-rw-r--r--policies/constitution.md66
-rw-r--r--policies/forum-rules.md25
-rw-r--r--policies/game-rules.md31
-rw-r--r--policies/list.yml31
-rw-r--r--policies/privacy-policy.md1
-rw-r--r--policies/social-convention.md14
-rw-r--r--src/build.ts117
-rw-r--r--src/static/style.css3
12 files changed, 323 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..567609b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+build/
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..62683cf
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,12 @@
+Copyright (c) 2020 The Mana World
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..16884f5
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,12 @@
+DENO_INSTALL ?= ${HOME}/.deno
+
+default: build
+
+.PHONY: build
+build:
+ rm -rf build && mkdir -p build
+ ${DENO_INSTALL}/bin/deno run --allow-read=. --allow-write=build src/build.ts
+
+.PHONY: deno # installs deno (only use this in CI)
+deno:
+ curl -fsSL https://deno.land/x/install/install.sh | sh \ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..c864528
--- /dev/null
+++ b/README.md
@@ -0,0 +1,10 @@
+# The Mana World Policies
+Contains the legal documents and policies observed by The Mana World.
+
+## Dependencies
+- [Deno](https://deno.land) 1.x (can be installed with `make deno`)
+
+## Generating the static site
+```sh
+make build
+```
diff --git a/policies/constitution.md b/policies/constitution.md
new file mode 100644
index 0000000..440bf62
--- /dev/null
+++ b/policies/constitution.md
@@ -0,0 +1,66 @@
+# The Mana World Collective (TMWC)
+
+## Abstract
+### Duties
+- The purpose of the TMWC is to make or delegate decisions regarding the running of The Mana World (TMW).
+- There are different scopes under TMWC's authority in order to balance and separate the projects responsibility and management.
+- TMWC understands that all members are h8ere to help each other fulfill the common vision of making a Open Source 2D MMORPG.
+- Someone can hold part or all of a role and not be a TMWC member, but they need to have the required knowledge or experience to fulfill that role.
+- To become a TMWC member, you need to gain in membership in the one of the following categories of contributors; Game Master,Server Admin, or Developer and must be approved by a majority of TMWC.
+- In the event that no TMWC remain, but roles are fulfilled by non-TMWC members. Those members may assume TMWC title to fulfill TMWC's duties to their best ability.
+- The board will be the SPI Liaison or appoint one.
+
+### Issues which require a TMWC vote
+- Changes to TMWC governance and/or Organization
+- Changes to Game, Forum, Etiquette and Wiki rule changes. (not guidelines)
+- Voting a member into TMWC or to adviser status or to revoke membership or ban a member.
+
+### Membership
+- If a member becomes inactive (stops) in their contributions for a period longer than 1 year, they will be moved to adviser status.
+- Prior members only have to show activity again to regain status.
+- Any member can call a vote to revoke someone's membership or ban a member.
+- At any time, any member may revoke their own membership or opt for adviser status.
+
+## Contributors
+### General Duties
+- Maintain guidelines for contributors to follow on the wiki.
+- Maintain documentation on changes made.
+- Provide tutorials, training and/or time to newer contributors.
+- Leadership among the contributors will be done without coercion.
+- Addressing community Forums posts / polls / suggestions.
+
+### Game Masters
+- Responsible for moderating and enforcing the rules of the game, wiki and forums.
+- All Game Masters are members of The Mana World Collective.
+- To become a Game Master, a person must be voted in by the player community
+
+### Server Admins
+- Are those that have ssh access to the server and are responsible for server restarts, maintenance, and the general health of the server overall.
+- Are those that are Forum Admins and/or Wiki Admins.
+- Are those that deal with Account resets/info and aid in GM investigations.
+- To become a member of this group, a person must first show the appropriate knowledge and willingness to devote time.
+
+### Developers
+- Programmers are responsible for making changes to the code base.
+- Content Creators are responsible for adding quests, items and monsters either via scripting, mapping, sound, client theme or pixel art.
+- Web developers are responsible for the website's front and/or back-end work.
+- Translators work on client,server and wiki data to provide them in as many languages as we can.
+- Developer group maintains a visible project plan.
+- To become a member of this group, a person must show appropriate knowledge, contribute to the project and learn and gain 'git' access.
+
+### Advisers
+- To become a member of this group, a person needs to be a prior contributor and TMWC member.
+- No longer actively contribute.
+- Allowed to vote/post as TMWC.
+
+
+<!-- The section below only contains links to relevant user groups and is not part of the constitution -->
+<br><hr>
+
+## Members
+- [The Mana World Team](https://forums.themanaworld.org/memberlist.php?mode=group&g=981)
+ - [Administrators](https://forums.themanaworld.org/memberlist.php?mode=group&g=962)
+ - [Developers](https://forums.themanaworld.org/memberlist.php?mode=group&g=979)
+ - [Game Masters](https://forums.themanaworld.org/memberlist.php?mode=group&g=973)
+- [The Mana World Advisers](https://forums.themanaworld.org/memberlist.php?mode=group&g=984)
+ - [Advisers](https://forums.themanaworld.org/memberlist.php?mode=group&g=984) \ No newline at end of file
diff --git a/policies/forum-rules.md b/policies/forum-rules.md
new file mode 100644
index 0000000..607c6ae
--- /dev/null
+++ b/policies/forum-rules.md
@@ -0,0 +1,25 @@
+# Forum Rules
+
+## Do not use offensive/rude language
+In your posts or in your character(s) name(s).
+
+## Do not spam/flood
+With posts.
+
+## Speak only English
+This rule does not apply to private messages.
+
+## Do not beg others
+For money, items or favours in-game or in “real life”.
+
+## Follow the TMW Social Convention (TSC)
+Available at https://policies.themanaworld.org/tsc
+
+
+---
+
+### Disclaimer
+
+- Please do not share your password with anyone. We are not responsible for account theft or similar types of scam. And try to use unique passwords for each account you create.
+- The rules are subject to change, a notice in game, on the forums and on IRC will be given every time there is a modification.
+- The Mana World is an entity of [SOFTWARE IN THE PUBLIC INTEREST, INC](https://www.spi-inc.org/corporate/certificate-of-incorporation/). and is subject to United States law. Anything illegal under the [U.S. Code](https://www.law.cornell.edu/uscode/text) is *de facto* illegal on The Mana World. \ No newline at end of file
diff --git a/policies/game-rules.md b/policies/game-rules.md
new file mode 100644
index 0000000..1da4c01
--- /dev/null
+++ b/policies/game-rules.md
@@ -0,0 +1,31 @@
+# Game Rules
+
+## Do not AFK bot
+This means you are not allowed to perform any AFK (away from keyboard) activity, apart from standing idle.
+
+## Do not use offensive/rude language
+In the chats or in your character(s) name(s).
+
+## Do not spam/flood other players
+This includes chat spam and spam by trade requests.
+
+## Speak only English in public areas.
+You can speak whatever language you want through whispers or whenever everyone in the area can speak said language.
+
+## Do not beg others
+For money, items or favours of any kind. If you want to ask for something, do it politely and only once. Try not to annoy other players.
+
+## Do not multibox
+You are not allowed to engage in combat while controlling more than one character at a time.
+
+## Follow the TMW Social Convention (TSC)
+Available at https://policies.themanaworld.org/tsc
+
+
+---
+
+### Disclaimer
+
+- Please do not share your password with anyone. We are not responsible for account theft or similar types of scam. And try to use unique passwords for each account you create.
+- The rules are subject to change, a notice in game, on the forums and on IRC will be given every time there is a modification.
+- The Mana World is an entity of [SOFTWARE IN THE PUBLIC INTEREST, INC](https://www.spi-inc.org/corporate/certificate-of-incorporation/). and is subject to United States law. Anything illegal under the [U.S. Code](https://www.law.cornell.edu/uscode/text) is *de facto* illegal on The Mana World.
diff --git a/policies/list.yml b/policies/list.yml
new file mode 100644
index 0000000..eb31f4c
--- /dev/null
+++ b/policies/list.yml
@@ -0,0 +1,31 @@
+# List of policies
+
+constitution:
+ name: The Mana World Collective (TMWC)
+ description: Constitution of The Mana World
+ aliases:
+ - TMWC
+ - TMWT
+
+game-rules:
+ name: Game Rules
+ description: Rules observed in-game
+ aliases:
+ - rules
+
+forum-rules:
+ name: Forum Rules
+ description: Rules observed in-game
+
+social-convention:
+ name: TMW Social Convention (TSC)
+ description: Guidelines for social interaction
+ aliases:
+ - TSC
+ - ESC
+
+.privacy-policy:
+ name: Privacy Policy
+ description: How we handle your data
+ aliases:
+ - privacy
diff --git a/policies/privacy-policy.md b/policies/privacy-policy.md
new file mode 100644
index 0000000..91b1e04
--- /dev/null
+++ b/policies/privacy-policy.md
@@ -0,0 +1 @@
+TO-DO
diff --git a/policies/social-convention.md b/policies/social-convention.md
new file mode 100644
index 0000000..c1d79f6
--- /dev/null
+++ b/policies/social-convention.md
@@ -0,0 +1,14 @@
+# TMW Social Convention (TSC)
+This page lists a minimum set of guidelines for social interaction on The Mana World and other MMOs.
+These guidelines can be used by any MMO game.
+
+## Basic Communication
+- Whether a person is sending you an email, chatting in-game or speaking in a forum, it is important to be respectful and polite. Maintain rules of common real-life courtesy.
+- Do not use ALL CAPITAL LETTERS to communicate, as it is perceived as SHOUTING, try instead to use mixed case, where letters are capitalized only when it is appropriate, like in a proper noun or at the beginning of a sentence.
+- Try to speak English when around other people who do not speak your same language, if English is your first language, try to get others to speak English around you.
+- Pay attention to language barriers, keep in mind that English is not everyone’s first language and some people may have trouble communicating with you, be patient and, if all else fails, maybe someone around you can help by translating for you.
+- Try to use proper grammar as it makes it easier for others to understand you, even when speaking foreign languages, as translating what you are saying can be extremely difficult otherwise.
+- Be respectful when talking about delicate subjects like sex, race, religion, politics, etc.
+- Try to talk to someone before you send them a trade request, they may not be interested.
+- Keep potentially dangerous personal information private. Posting private and personal information in the wrong location can have serious consequences. Divulging too much information could give people with bad intentions valuable knowledge.
+- Always try to report game bugs and cases of abuse from other players, in most cases you are doing a favour to the community.
diff --git a/src/build.ts b/src/build.ts
new file mode 100644
index 0000000..b1d3bd8
--- /dev/null
+++ b/src/build.ts
@@ -0,0 +1,117 @@
+import { Marked } from "https://deno.land/x/markdown/mod.ts"
+import * as yaml from "https://deno.land/x/js_yaml_port/js-yaml.js"
+
+// the structure of policies/list.yml
+interface policyList {
+ [file: string]: {
+ name: string;
+ description: string;
+ aliases?: string[];
+ };
+}
+
+const decoder = new TextDecoder("utf-8");
+const encoder = new TextEncoder();
+const policyFile = "policies/list.yml";
+const rawPolicies = decoder.decode(await Deno.readFile(policyFile));
+const policies: policyList = yaml.load(rawPolicies);
+
+const index = {
+ prefix: `
+<!doctype html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>The Mana World Policies</title>
+ <meta name="description" content="Active policies on The Mana World">
+ <link rel="stylesheet" href="/style.css">
+ <link rel="canonical" href="https://policies.themanaworld.org/">
+</head>
+<body>
+<nav>
+<h1>TMW Policies</h1>
+<ul>
+`.trim(), list: "", suffix: "</ul></nav>\n</body>\n</html>"
+};
+
+// the _redirects file used by netlify
+let redirects = "";
+
+console.info(">> Building the static site...");
+
+// empty the build directory
+await Deno.remove("build", { recursive: true });
+
+// loop through every policy markdown file
+for (const [file, props] of Object.entries(policies)) {
+ if (file.startsWith(".")) {
+ console.log(`Ignoring disabled policy file: ${file}.md`);
+ continue;
+ }
+
+ // add to the index page
+ index.list += `<li><a href="/${file}" title="${props.description}" aria-label="${props.description}">${props.name}</a></li>\n`;
+
+ // add to the netlify redirect file
+ redirects += `/${file} /${file}/index.html 200!\n`;
+
+ // built-in aliases
+ if (file != file.replace("-", "_")) {
+ redirects += `/${file.replace("-", "_")} /${file} 302\n`;
+ } if (file != file.replace("-", "")) {
+ redirects += `/${file.replace("-", "")} /${file} 302\n`;
+ }
+
+ // process path aliases
+ if (Reflect.has(props, "aliases")) {
+ for (const alias of props.aliases as string[]) {
+ redirects += `/${alias} /${file} 302\n`;
+
+ if (alias != alias.toLowerCase()) {
+ redirects += `/${alias.toLocaleLowerCase()} /${file} 302\n`;
+ }
+ }
+ }
+
+ // convert from markdown to html
+ const markdown = decoder.decode(await Deno.readFile(`policies/${file}.md`));
+ const html: string = Marked.parse(markdown);
+ // wrap the generated html with our template
+ const policyPage = encoder.encode(`
+<!doctype html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>The Mana World – ${props.name}</title>
+ <meta name="description" content="${props.description}">
+ <link rel="stylesheet" href="/style.css">
+ <link rel="canonical" href="https://policies.themanaworld.org/${file}">
+</head>
+<body>
+<article>
+${html}
+</article>
+</body>
+</html>
+`.trim());
+
+ // create a subdirectory for it
+ await Deno.mkdir(`build/${file}`, {recursive: true});
+ await Deno.writeFile(`build/${file}/index.html`, policyPage, {create: true});
+}
+
+// write the index page
+const indexPage = encoder.encode(index.prefix + index.list + index.suffix);
+await Deno.writeFile("build/index.html", indexPage, {create: true});
+
+// write the _redirects file (netlify)
+await Deno.writeFile("build/_redirects", encoder.encode(redirects), {create: true});
+
+// copy static assets
+for await (const dirEntry of Deno.readDir("src/static")) {
+ await Deno.copyFile(`src/static/${dirEntry.name}`, `build/${dirEntry.name}`,);
+}
+
+console.info(">> Build success ✅"); \ No newline at end of file
diff --git a/src/static/style.css b/src/static/style.css
new file mode 100644
index 0000000..c0f1b2d
--- /dev/null
+++ b/src/static/style.css
@@ -0,0 +1,3 @@
+body {
+ background: #eee;
+} \ No newline at end of file