ASECO/RASP v0.91 released!

Discuss everything about Xymph's Aseco flavoured server control scripts for TM Forever / classic TMN and for TM² Canyon.

Moderators: Xymph, TM-Patrol

dragu
wheelbarrow operator
wheelbarrow operator
Posts: 19
Joined: 24 Nov 2006 21:44
Owned TM-games: TMN
Location: Sweden
Contact:

Re: ASECO/RASP v0.91 released!

Post by dragu » 30 Dec 2007 20:30

After having changed to that line and used the unicode for the required letters that was needed to be replaced.
We got it up and running at full effect once again.

So thank you f*ckfish for that information which you gave for the possibility to get it as wanted.

Maybe with some hope this might also be buildt into future versions.
Image
Image

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: ASECO/RASP v0.91 released!

Post by lgrfbs-sweden » 30 Dec 2007 20:44

thanks for all help f*ckfish, Xymph & Assembler Maniac
dragu is hardware admin on lgrfbs server and I are course & player admin on the same server
if someone wonder.

So THANKS for the help. :1010
Admin On:Image
My server:lgrfbs server / XASECO plugins
Image

User avatar
Slig
Pit Crew
Pit Crew
Posts: 2124
Joined: 05 Sep 2005 17:51
Owned TM-games: ALL
Location: TraxicoLand (Fr)
Contact:

Re: ASECO/RASP v0.91 released!

Post by Slig » 30 Dec 2007 21:03

soehest wrote:Even though i only have been running this for 10 minutes at not many people are online at this moment i must say it feels like my server is on steroids. Commands are instant now. Only question remaining will this run on a true 64 bit server :-)
On 2 new dual xeon servers i received at work I installed 2 linux amd64 distributions just to test amd64 issues, so it should work ;)

Note also than the original GbxRemote.inc.php file should work correctly on 32 bits linux with php5 < 5.1, with newer php versions and amd64 there are some problems or changed features that are not compatible with the old GbxRemote.inc.php (can make long timeouts or even worse). The changes are listed in the beginning of the modified file.

I updated the file with Xymph changes now, so this version should work with both Fast and Aseco, and probably any script which use the original file without custom change : GbxRemote.inc.zip or GbxRemote.inc.php.txt
The file in aseco/rasp 0.92b is the same as this one, so no need to update it except if you still have an old script release.

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: ASECO/RASP v0.91 released!

Post by f*ckfish » 30 Dec 2007 23:02

dragu wrote:After having changed to that line and used the unicode for the required letters that was needed to be replaced.
We got it up and running at full effect once again.

So thank you f*ckfish for that information which you gave for the possibility to get it as wanted.

Maybe with some hope this might also be buildt into future versions.
Always glad to help ;-)
inactive, sorry

User avatar
sbone
happy cruiser
happy cruiser
Posts: 181
Joined: 13 Sep 2007 18:11
Owned TM-games: TMUF, TM2
Location: In the sky...
Contact:

Re: re: ChatBot for xymph's aseco

Post by sbone » 16 Oct 2011 12:14

Assembler Maniac wrote:
Assembler Maniac wrote:It won't be very hard to port chatbot to tmn, I think that's where it started anyway. I'll work on it in the next few days.

Tony_Bad_Mann wrote:I tried the chatbot that Assembler Maniac was talking about from RASP 2.x but it seems it won't work with tmn or your 0.91 aseco anyway so I guess i'll wait for someone to do a final working release of a chatbot or go without one, thanks anyway tho.

And here it is:

plugin.chatbot.php

Code: Select all

<?php

/* plugin.rasp_chatbot.php

 Original idea (and some text) from XXX.Max, many other contributors have had hands in this.

 Provides for ban/kick/msgs from the bot
 edit chatbot.xml to change words/phrases/general settings

 // this re-write done from the ASECO TMU version - 2007-12-17 Assembler Maniac

 */

require_once('includes/xmlparser.inc.php');  // provides an xml parser

Aseco::registerEvent('onStartup', 'chatbot_startup');
Aseco::registerEvent('onChat', 'chatbot_chat');

class ChatBot
	{
	private $BotTag;
	private $kickwords;
	private $kicktext;
	private $banwords;
	private $bantext;
	private $blacklistwords;
	private $blacklisttext;
	private $textmsgs;
	public $Aseco;

	function loadSettings()
		{
		$xml_parser = new Examsly();
		$settings = $xml_parser->parseXML('chatbot.xml');
		$settings = $settings['SETTINGS'];

		foreach ($settings as $key => $value)
			{
			if ( $key == 'WATCHFOR' )
				{
				continue;
				}
			unset($settings[$key]);
			$settings[$key] = $value[0];
			}

		$this->textmsgs = array();

		foreach ($settings['WATCHFOR'][0]['TEXT'] as $val)
			{
			$t1 = split('\|', $val);
			$key = $t1[0];
			unset($t1[0]);
			$this->textmsgs[$key] = $t1;
			}

		$this->BotTag = $settings['BOTTAG'];
		$this->kicktext = $settings['KICKTEXT'];
		$this->bantext = $settings['BANTEXT'];
		$this->kickwords = split(',', $settings['KICKWORDS']);
		$this->banwords = split(',', $settings['BANWORDS']);
		$this->blacklistwords = split(',', $settings['BLACKLISTWORDS']);
		}

	function checkChatText(&$command)
		{
		// ignore text that comes from the server
		// also ignore anything that looks like it's a command
		if ( $command[0] == 0 || substr($command[2], 0, 1) == '/' )		// $command[0] is the player id, 0 = server
			{
			return;
			}

		foreach ($this->textmsgs as $key => $value)
			{
			if ( !(stripos($command[2], $key) === false) )
				{
				if ( count($value) == 1 )
					{
					$message = $this->BotTag . $value[1];
					}
				else
					{
					$key = array_rand($value);
					$message = $this->BotTag . $value[$key];
					}
				$this->Aseco->client->query("ChatSendServerMessage", $message);
				return;
				}
			}

		foreach ($this->kickwords as $value)
			{
			if ( !(stripos($command[2], $value) === false) )
				{
				$message = $this->BotTag . $this->kicktext;
				$this->Aseco->client->query("ChatSendServerMessageToLogin", $message, $command[1]);
				$this->Aseco->client->query("Kick", $command[1]);
				return;
				}
			}

		foreach ($this->banwords as $value)
			{
			if ( !(stripos($command[2], $value) === false) )
				{
				$message = $this->BotTag . $this->bantext;
				$this->Aseco->client->query("ChatSendServerMessageToLogin", $message, $command[1]);
				$this->Aseco->client->query("Ban", $command[1]);
				return;
				}
			}

		foreach ($this->blacklistwords as $value)
			{
			if ( !(stripos($command[2], $value) === false) )
				{
				$message = $this->BotTag . $this->blacklisttext;
				$this->Aseco->client->query("ChatSendServerMessageToLogin", $message, $command[1]);
				$this->Aseco->client->query("Blacklist", $command[1]);
				return;
				}
			}
		}  //  checkChatText
	}

function chatbot_startup()
	{
	global $aseco;
	global $chatbot;

	$chatbot = new ChatBot();

	$chatbot->Aseco = $aseco;
	$chatbot->loadSettings();
	}  //  chatbot_startup

function chatbot_chat(&$aseco, &$command)
	{
	global $chatbot;
	$chatbot->checkChatText($command);
	}  //  chatbot_onchat
This is chatbot.xml:

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<settings>
	<BotTag>$f00 [ChatBot] $z</BotTag>
	<kickwords></kickwords>
	<kicktext>You were warned when you entered the server...  Now autobooting...</kicktext>
	<banwords></banwords>
	<bantext>Now banning you for life...</bantext>
	<blacklistwords></blacklistwords>
	<blacklisttext>Now blacklisting you for life...</blacklisttext>
	<watchfor>
		<text>chatbot stars|$0a0 Start with a cold gas. This is attracted to the centre by gravity. The outside forms into a disk as the inside continues to heat up and contract eventually stabalizing the pressure. This is how you make a star.</text>
		<text>chatbot version|$0a0 RASP Chat bot version 1.0 by Assembler Maniac. Total re-write from scratch.</text>
		<text>chatbot rank|$0a0 Typing $0ff/rank $0a0shows your position in relation to unique players that have visited this server. Depends on your highest placings in the maps on rotation</text>
		<text>chatbot karma|$0a0Typing $0ff/karma $0a0 allows you to see how good a track is. To give a karma point type ++ or -- if you dislike it. 1 vote per person per track, you can change at any time</text>
		<text>chatbot jukebox|$0a0 To use $0aaJUKEBOX $0a0first type $0ff/list $0a0to get map i.d. number, then type $0ff/jukebox $0a0and the  number of your map. eg.$0ff/jukebox 23</text>
		<text>chatbot help|$0a0/HELP $0ff(shows command list)$0a0 /RECS $0ff(shows top 5 server records) $0a0
/LIST $0ff(shows map no.)$0a0 /JUKEBOX 00? $0ff(Queue map up)</text>
		<text>chatbot thx| Anytime.</text>
	</watchfor>
</settings>
You can set as many "watchfor" texts as you want. Format for a watchfor is this:
<text>look for this|reply with this|or this|or this|or whatever # of possible responses you want, they'll randomly be chosen</text>
Hi,
is this plugin works on TM2 ?
Thanks
-- SbOne --
Public CSb1 portal : http://csb1.sbone.fr -/- Team CSb1 : http://sbone.fr

gorn_z34
tricycle manager
tricycle manager
Posts: 27
Joined: 25 Feb 2019 17:32
Owned TM-games: TMUF

Re: ASECO/RASP v0.91 released!

Post by gorn_z34 » 27 Jan 2020 02:29

Ant wrote:
17 Dec 2007 12:17
Well I tried it out, and I get this error, what should I do ??

Code: Select all

# initialize ASECO ############################################################
[Aseco] PHP Version is 5.1.6
[Aseco] Load settings [config.xml]
[Aseco] Load admin/ops lists [adminops.xml]
[Aseco] Load plugin [plugin.localdatabase.php]
[Aseco] Load plugin [plugin.rounds.php]
[Aseco] Load plugin [chat.admin.php]
[Aseco] Load plugin [chat.help.php]
[Aseco] Load plugin [chat.records.php]
[Aseco] Load plugin [chat.records2.php]
[Aseco] Load plugin [chat.recrels.php]
[Aseco] Load plugin [chat.players.php]
[Aseco] Load plugin [chat.players2.php]
[Aseco] Load plugin [chat.wins.php]
[Aseco] Load plugin [chat.laston.php]
[Aseco] Load plugin [chat.stats.php]
[Aseco] Load plugin [chat.server.php]
[Aseco] Load plugin [chat.me.php]
[Aseco] Load plugin [plugin.track.php]
[Aseco] Load plugin [plugin.rasp.php]
[Aseco] Load plugin [plugin.rasp_jukebox.php]
[Aseco] Load plugin [plugin.rasp_chat.php]
[Aseco] Load plugin [plugin.rasp_karma.php]
[Aseco] Load plugin [plugin.rasp_nextmap.php]
[Aseco] Load plugin [plugin.rasp_nextrank.php]
[Aseco] Load plugin [plugin.rasp_votes.php]
[Aseco] Load plugin [plugin.chatlog.php]
[Aseco] Load plugin [plugin.uptodate.php]
[Aseco] Load plugin [jfreu.plugin.php]
[Aseco] Load plugin [mistral.idlekick.php]
[Aseco] Load plugin [plugin.chatbot.php]
    [Aseco] Try to connect to server on 127.0.0.1:5003
[Aseco] Try to authenticate with username '*****' and password '*****'
[Aseco] Connection established successfully!
[Local DB] Load settings file
[Local DB] Try to connect to MySQL server
[Local DB] MySQL Server Version is 5.0.24a-community-nt
[RASP] Cleaning up unused data
*-*-*-*-*-* RASP is running! *-*-*-*-*-*
|...Loading Settings
|...Loaded!
|...Checking database structure
|...Structure OK!
|...Calculating ranks
|...Done!
[ASECO Warning] [XML Error 64] Reserved XML Name on line 1
[PHP Warning] Invalid argument supplied for foreach() on line 37 in file C:\TmDe
dicatedServer_2006-05-30\TmDedicatedServer\aseco_rasp_091\aseco_rasp_091\plugins
\plugin.chatbot.php
[PHP Warning] Invalid argument supplied for foreach() on line 49 in file C:\TmDe
dicatedServer_2006-05-30\TmDedicatedServer\aseco_rasp_091\aseco_rasp_091\plugins
\plugin.chatbot.php
###############################################################################
  Aseco v0.91 Xymph running on 127.0.0.1:5003
  Game  : TmNationsESWC - TimeAttack
  Author: Florian Schnell
  Re-Authored: Assembler Maniac & Xymph
###############################################################################
Begin Race
[12/17,12:21:31] track changed [none] >> [XXX Firebrand]
[12/17,12:21:31] current record on XXX Firebrand is 0:47.07 and held by DFAJazzy
I found the same issue can someone help me?

User avatar
L3cKy
smooth traffic navigator
smooth traffic navigator
Posts: 222
Joined: 05 Sep 2007 13:55
Owned TM-games: TMUF
Location: Berlin
Contact:

Re: ASECO/RASP v0.91 released!

Post by L3cKy » 30 Jan 2020 17:22

gorn_z34 wrote:
27 Jan 2020 02:29
Well I tried it out, and I get this error, what should I do ??
Post your xaseco logfile and pls also the chatbot.xml
Seems like there is some utf8 problem.

gorn_z34
tricycle manager
tricycle manager
Posts: 27
Joined: 25 Feb 2019 17:32
Owned TM-games: TMUF

Re: ASECO/RASP v0.91 released!

Post by gorn_z34 » 31 Jan 2020 23:15

The only thing i found is:
[PHP Warning] Invalid argument supplied for foreach() on line 37 in file E:\TMServer\xaseco\plugins\plugin.chatbot.php
[PHP Warning] Invalid argument supplied for foreach() on line 49 in file E:\TMServer\xaseco\plugins\plugin.chatbot.php
and:
[PHP Warning] Parameter 1 to chatbot_chat() expected to be a reference, value given on line 1248 in file E:\TMServer\xaseco\aseco.php
[PHP Warning] Parameter 1 to chatbot_chat() expected to be a reference, value given on line 1248 in file E:\TMServer\xaseco\aseco.php
[PHP Warning] Parameter 1 to chatbot_chat() expected to be a reference, value given on line 1248 in file E:\TMServer\xaseco\aseco.php
[PHP Warning] Parameter 1 to chatbot_chat() expected to be a reference, value given on line 1248 in file E:\TMServer\xaseco\aseco.php
[PHP Warning] Parameter 1 to chatbot_chat() expected to be a reference, value given on line 1248 in file E:\TMServer\xaseco\aseco.php
[PHP Warning] Parameter 1 to chatbot_chat() expected to be a reference, value given on line 1248 in file E:\TMServer\xaseco\aseco.php
[PHP Warning] Parameter 1 to chatbot_chat() expected to be a reference, value given on line 1248 in file E:\TMServer\xaseco\aseco.php

User avatar
L3cKy
smooth traffic navigator
smooth traffic navigator
Posts: 222
Joined: 05 Sep 2007 13:55
Owned TM-games: TMUF
Location: Berlin
Contact:

Re: ASECO/RASP v0.91 released!

Post by L3cKy » 01 Feb 2020 07:28

Please post the chatbot.xml here and use the code tag.
The symbol is that one </>

gorn_z34
tricycle manager
tricycle manager
Posts: 27
Joined: 25 Feb 2019 17:32
Owned TM-games: TMUF

Re: ASECO/RASP v0.91 released!

Post by gorn_z34 » 01 Feb 2020 16:58

Last edited by gorn_z34 on 03 Feb 2020 02:37, edited 1 time in total.

gorn_z34
tricycle manager
tricycle manager
Posts: 27
Joined: 25 Feb 2019 17:32
Owned TM-games: TMUF

Re: ASECO/RASP v0.91 released!

Post by gorn_z34 » 07 Feb 2020 04:25

And? Do you have some ideas how to resolve this problem?

User avatar
L3cKy
smooth traffic navigator
smooth traffic navigator
Posts: 222
Joined: 05 Sep 2007 13:55
Owned TM-games: TMUF
Location: Berlin
Contact:

Re: ASECO/RASP v0.91 released!

Post by L3cKy » 08 Feb 2020 20:30

Look at your private messages :wink:

Post Reply