Encyclopedia SpongeBobia
Advertisement
Encyclopedia SpongeBobia

Wiki
Proposal Archive

The following proposal has been discussed and is now marked as resolved. The page has been protected and now serves as an archive. Do not edit this page.
Date Resolved: August 8, 2016


Result: After 3 days, there is over 10 supports (including at least 5 admins) and no opposition. Passed with early closing.


Instructions

This page is the voting stage of this discussion: "Change Chat Filter."

With all concerns from the concern stage of this discussion having been resolved and taken into account, the proposal located in the "Proposal" section above has been created and moved to voting. To join the voting, you simply use buttons located in the "Voting" section of this page and fill the resulting page.

Have a happy voting!

Proposal

My original proposal is as follows:

Currently, our Chat Filter is just an emote in chat, there HOWEVER is a way where we do not even need emotes, it is .js coding that would go in Chat,js, and is the following.

/*
	the following script blocks certain words in certain conditions
	regex reduction suggested by Callofduty4 http://community.wikia.com/wiki/Thread:628738#7
*/
 
$(function() {
	var count = 0,
		limit = 2,
		filter = {};
 
	// simple phrases
	filter.plain = [
		"emample",
		"example2",
		"example3,
		
	];
// phrases as regular expressions
	filter.regex = [
		"test",
		"testing",
		"test123",
		
	];
 
	// the evaluated phrases
	filter.evaluated = [];
	for (var i in filter.plain) {
		filter.evaluated.push(filter.plain[i].replace(/[\\\/\{\}\,\[\-\]\(\|\)\.\,\?\!\=\*\+\^\$]/g, "\\$&"));
	}
	for (var i in filter.regex) {
		filter.evaluated.push(filter.regex[i]);
	}
 
	// regex object
	var regex = new RegExp(
		"(?:^| |\\.|\\,|\\\\|\\/|\\[|\\]|_|\\-|\\(|\\)|\\{|\\}|\'|\"|\\|?\\!)(?:" +
		filter.evaluated.join("|") +
		")(?: |\\.|\\,|\\\\|\\/|\\[|\\]|_|\\-|\\(|\\)|\\{|\\}|\'|\"|\\?|\\!|$)",
		"i" // case insensitive
	);
 
	// add digit suffix (e.g. "9001" -> "9001st"
	function parseTime(n) {
		var s = String(n),
			lastD = s.match(/[1-3]$/),
			suffixes = {
				"1": "st",
				"2": "nd",
				"3": "rd"
			};
		return s + (lastD ? suffixes[lastD[0]] : "th");
	}
	$('textarea[name="message"]').keydown(function(e) {
		if (e.keyCode == 13) {
			if ($(this).val().match(regex)) {
				$(this).val("");
				count++;
				if (count < limit) {
					alert("Warning! You have been caught using a restricted phrase and your message has been blocked.\nThis is the " + parseTime(count) + " time you have been caught doing so. If this number reaches " + limit + ", you will be kicked.");
				} else {
					location.href = "/";
					window.close();
				}
			}
		}
	});
});

With this code, their message would not even go through, and a message pops up warning the user of their language, and if attempted again, they'll be kicked.

This would help prevent raids, trolls, and make the wiki a lot more fun.


This voting stage will end on Monday, August 15, 2016 at 9:30 a.m., eastern time. AustinD-3 (Message Me Here!) Mario123

Voting

Choose your input: SupportNeutralOpposeComment

  • Support Support - While we're at it, can we keep the dolphin as its own emote? We can use with (dolphin).--TrevorOntario719 (talk) 15:44, August 5, 2016 (UTC)
  • Oppose Oppose -

Cans48 (Messages)

  • Support Support - Put republican and democrat as filter words.

Cans48 (Messages)

  • Neutral Neutral -
ChocolateBrownieBoy Talk Contribs Edits


  • Neutral Neutral - Coollogo com-173711546
Advertisement