diff --git a/lib/web/webserver.js b/lib/web/webserver.js
index fcaa2bbc..b2752336 100644
--- a/lib/web/webserver.js
+++ b/lib/web/webserver.js
@@ -174,7 +174,18 @@ function handleSocketConfig(req, res) {
"',ALLOW_SSL="+Config.get("https.enabled")+";" +
(Config.get("https.enabled") ?
"if(location.protocol=='https:'||USEROPTS.secure_connection){" +
- "IO_URL=WEB_URL=SSL_URL;}" : "")); }
+ "IO_URL=WEB_URL=SSL_URL;}" : ""));
+}
+
+/**
+ * Handles a request for the user agreement
+ */
+function handleUserAgreement(req, res) {
+ logRequest(req);
+ sendJade(res, "tos", {
+ domain: Config.get("http.domain")
+ });
+}
module.exports = {
/**
@@ -198,6 +209,7 @@ module.exports = {
app.get("/r/:channel", handleChannel);
app.get("/", handleIndex);
app.get("/sioconfig", handleSocketConfig);
+ app.get("/useragreement", handleUserAgreement);
require("./auth").init(app);
require("./account").init(app);
require("./acp").init(app);
diff --git a/templates/footer.jade b/templates/footer.jade
index 856e1bba..9fe33d1f 100644
--- a/templates/footer.jade
+++ b/templates/footer.jade
@@ -2,7 +2,7 @@ mixin footer
footer#footer
.container
p.text-muted.credit.
- Copyright © 2013 Calvin Montgomery
+ Copyright © 2013 Calvin Montgomery · Fork me on GitHub · User Agreement
script(src="/js/jquery.js")
// Must be included before jQuery-UI since jQuery-UI overrides jQuery.fn.button
// I should really abandon this crap one day
diff --git a/templates/tos.jade b/templates/tos.jade
new file mode 100644
index 00000000..c1108abc
--- /dev/null
+++ b/templates/tos.jade
@@ -0,0 +1,40 @@
+doctype html
+html(lang="en")
+ head
+ include head
+ mixin head()
+ body
+ #wrap
+ nav.navbar.navbar-inverse.navbar-fixed-top(role="navigation")
+ include nav
+ mixin navheader()
+ #nav-collapsible.collapse.navbar-collapse
+ ul.nav.navbar-nav
+ mixin navdefaultlinks("/useragreement")
+ mixin navloginlogout("/useragreement")
+ section#mainpage
+ .container
+ .col-md-12
+ h1 User Agreement
+ p.
+ By visiting #{siteTitle} (#{domain}), you agree to the following user agreement.
+ h3 Legal Stuff
+ ul
+ li All content and activity this website must comply with United States law, and where applicable, local laws. Prohibited content and activities include, but are not limited to:
+ ul
+ li Child pornography
+ li Warez
+ li Copyright infringement
+ li Blackmail, slander, or other defamatory statements
+ li Phishing
+ li Content on #{siteTitle} is provided "as-is". #{siteTitle} makes no warranties, express or implied, and hereby disclaims and negates all other warranties, including, without limitation, implied warranties or conditions of merchantability, fitness for a particular purpose, or non-infringement of intellectual property or other violation of rights. Furthermore, #{siteTitle} does not make any representations concerning the accuracy or reliability of content present on #{siteTitle}.
+ li #{siteTitle} permits users to share links, embedded content, or other content insofar as the shared content complies with this user agreement, United States law, and where applicable, local laws. #{siteTitle} is not responsible for the content shared, or any consequences of sharing such content. #{siteTitle} does not endorse any user-provided content. Viewing shared content is done at the user's own risk.
+ h3 General Rules
+ p.
+ While moderation is largely left to the discretion of channel moderators and administrators, the following rules apply globally and must be observed at all times on the site. Failure to comply with these rules may result in temporary or permanent removal of your user account from the website.
+ ul
+ li Trolling, spamming, or otherwise intentionally disrupting any channel is not allowed
+ li Bullying or otherwise intending to hurt other users is not allowed
+ li Attempting to exploit the site in order to gain unauthorized access or interrupt service is not allowed. If you believe you have found an exploit, please responsibly disclose it to an administrator.
+ include footer
+ mixin footer()