Anti Swear Plugin

This is the place where you can find everything related to the dedicated server, control scripts and community tools.

Moderators: Pit Crew, TM-Patrol

Post Reply
UNP-Gadget
cyclist
cyclist
Posts: 43
Joined: 15 Jan 2007 20:41

Anti Swear Plugin

Post by UNP-Gadget » 22 Apr 2008 23:54

Hi all,
Is there anybody out there who can write an anti Swear plugin for Aseco. We have a 60 man server but there seems to be lots of idiots out there who are determined to spoil it for others by swearing on screen etc.

Thanks in advance!

Assembler Maniac
Pit Crew
Pit Crew
Posts: 1493
Joined: 03 Jun 2006 13:24
Owned TM-games: TMU
Contact:

Re: Anti Swear Plugin

Post by Assembler Maniac » 23 Apr 2008 01:45

Which version of aseco are you running?

If it's 2.0, then chatbot has a way to define kick/ban words.

Archmage
tricycle manager
tricycle manager
Posts: 26
Joined: 21 Apr 2008 09:52
Owned TM-games: TMNF

Re: Anti Swear Plugin

Post by Archmage » 23 Apr 2008 06:58

Hmm... Example:

[Newbie] Hello Sirs, cann someone please be so kind and assist me with a short question that I want to ask you. Any help would be highly appricated and I would be very thankfull.
[Swearer] FUCCK U azzlicking pik!

User Newbie kicked, because of using the swear-word "ass". User Swearer isn't using any swear-word and therefore he remains on the server. Is this really what you want?

Xymph
Pit Crew
Pit Crew
Posts: 5710
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: Anti Swear Plugin

Post by Xymph » 23 Apr 2008 09:09

Then don't enter a short string like "ass" that can occur within many other words in the list. :wink:
But still, any badwords filter will get circumvented by players that really want to, and can inadvertently catch phrases by players who didn't mean to curse. I don't think it's really possible to avoid that.

Btw, XASECO also has a filter, in the main Jfreu plugin.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
lgrfbs-sweden
smooth traffic navigator
smooth traffic navigator
Posts: 200
Joined: 15 Apr 2007 15:48
Owned TM-games: TMN
Location: Sweden
Contact:

Re: Anti Swear Plugin

Post by lgrfbs-sweden » 23 Apr 2008 10:05

as not working so fine :?
have same "error" as Archmage writed about ....
Admin On:Image
My server:lgrfbs server / XASECO plugins
Image

User avatar
Basti504
cyclist
cyclist
Posts: 47
Joined: 29 Aug 2006 17:09
Owned TM-games: TMN,TMU, TMF
Location: Netherlands
Contact:

Re: Anti Swear Plugin

Post by Basti504 » 23 Apr 2008 19:08

I use the following script on my server (aseco tmf). I only put very dirty words in the list, all other is up to the admin in the game. It also explanes to the user why he got kicked.

Code: Select all

<?php
class Bad extends Plugin {
  
   function CheckForBadWords($command) {
	
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//array with dirty words :O
$badwords = array( "---"
            ,"---"
	,"---"
	,"---"
	,"---"
	,"---"
            ,"---"
            ,"---"
            ,"----"
            );

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

	if ( $command[0] == 0 || substr($command[2], 0, 1) == '/' )
	{
		return;
	}
    
	
	$loginid = $command[0]; 
	$login = $command[1]; 
	$message = $command[2]; 
	$player = $command['author']->nickname; 
	
	echo $message;
	
		foreach ($badwords as $word){
		
			if (stristr($message, $word)){
				
				//explain
				$this->Aseco->client->query("ChatSendServerMessageToLogin", '$ff0>> $i$w$f00          ! ATTENTION !', $login);
				$this->Aseco->client->query("ChatSendServerMessageToLogin", '$ff0>> $i$w$f00          ! ATTENTION !', $login);
				$this->Aseco->client->query("ChatSendServerMessageToLogin", '$ff0>> $i$0f3You broke the server rules, by swearing with bad words. You will be automatically kicked from the server!', $login);
				
				//kick
				$this->kickPlayer($aseco, $login, $player);
				
			}
		}
	
  }
  
 function kickPlayer($aseco, $login, $player){
	//sleep(3);
	$this->Aseco->client->query("ChatSendServerMessage", '$ff0>> Server kicked cursing player $fff' . $player . ' $z$ff0!');
    $this->Aseco->client->query('Kick', $login);
}
  
 }

$_PLUGIN = new Bad();
$_PLUGIN->setAuthor('-');
$_PLUGIN->setVersion(1.0);
$_PLUGIN->addEvent('onChat', 'CheckForBadWords');
$_PLUGIN->setDescription('Bad Words.');
?>
Visit my dev server, All Nadeo Tracks - TimeAttack in The Netherlands

User avatar
f*ckfish
Pit Crew
Pit Crew
Posts: 1302
Joined: 15 Jun 2007 07:59
Owned TM-games: TMNF, TMUF
Location: Dresden, Germany
Contact:

Re: Anti Swear Plugin

Post by f*ckfish » 23 Apr 2008 19:12

With the new chatstream functions you get new possibilities in handling swear words, you can for example just replace the swear word and send the modified line to the chat. So there may be no need for instant kicking anymore. We'll see when a plugin like this is available.
inactive, sorry

Zengrath
wheelbarrow operator
wheelbarrow operator
Posts: 19
Joined: 24 Jun 2007 16:25

Re: Anti Swear Plugin

Post by Zengrath » 23 Apr 2008 20:05

I had a similiar problem other day.. One guy out of the blue said this really awfull thing on my server, immediately after 2 or 3 others did the same thing. of course chatbot kicked them but the fact that it still went through is what bothered me.

I normaly do not care about cussing at all, but being the admin/owner on a server it bothers me more becuase i feel i'm responsible.

Is there a way to have chatbot kick them without the text reaching the server?

User avatar
Retodon8
swift roadking
swift roadking
Posts: 751
Joined: 12 Jul 2006 14:57
Owned TM-games: TMSX, TMU(F), TM2:C
Manialink(s): Retodon8
Location: Netherlands
Contact:

Re: Anti Swear Plugin

Post by Retodon8 » 23 Apr 2008 20:20

Xymph wrote:Then don't enter a short string like "ass" that can occur within many other words in the list. :wink:
I remember playing a tiny bit of Ultima Online and keep seeing the word "gl@$ß", or something like that.
I really didn't get what that did in a Fantasy game, until I suddenly realised the word "glass" includes the word "ass".
Not sure what's wrong with donkeys, but oh well.
Яєזσםση8
ImageImage

Post Reply