[ABD] mChat Bot

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
cdodds
Registered User
Posts: 228
Joined: Sat Jul 10, 2010 2:19 am
Name: Don Cdoddsy
Contact:

Re: [RC] mChat Bot

Post by cdodds »

Pico88 wrote:Something is wrong with your mChat not with mChat Bot.
This line

Code: Select all

$user->data['user_id'] != $config_mchat['bot_id']
prevents bot to reply on its own text.
It is placing my post between the bot's two posts. So, I post, but instead of displaying my post...it displays the bot's reply. Then it displays my post. Then it displays the bot's reply a second time; sandwiching my post between two copies of the bot's reply.

The bot is not replying to its self. It is replying to me before my post is displayed and then it replies to me a second time.

Is there any way to change the order in which my post / the bot's reply are displayed in? I think the problem is in the bot displaying its own post before mine instead of after mine.
User avatar
Pico88
Registered User
Posts: 878
Joined: Sat Mar 07, 2009 10:24 pm
Location: Poland
Name: Lukasz

Re: [RC] mChat Bot

Post by Pico88 »

In mchat.php you add code

Code: Select all

//mChat Bot

code from instruction
before or after

Code: Select all

$sql = 'INSERT INTO ' . MCHAT_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
		$db->sql_query($sql);
?
Please do not PM me for support.
cdodds
Registered User
Posts: 228
Joined: Sat Jul 10, 2010 2:19 am
Name: Don Cdoddsy
Contact:

Re: [RC] mChat Bot

Post by cdodds »

Pico88 wrote:In mchat.php you add code

Code: Select all

//mChat Bot

code from instruction
before or after

Code: Select all

$sql = 'INSERT INTO ' . MCHAT_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
		$db->sql_query($sql);
?
Thanks!

I use to have the Mchat Bot code after:

Code: Select all

$sql = 'INSERT INTO ' . MCHAT_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
		$db->sql_query($sql);
Now I have the mchat code before:

Code: Select all

$sql_ary = array(
			'forum_id' 			=> 0,
			'post_id'			=> 0,		
			'user_id'			=> $user->data['user_id'],
			'user_ip'			=> $user->data['session_ip'],
			'message' 			=> $message,
			'bbcode_bitfield'	=> $bitfield,
			'bbcode_uid'		=> $uid,
			'bbcode_options'	=> $options,
			'message_time'		=> time()
		);
That fixed half of it. The bot is now posting in the right order: My post then its reply.
It is now doubling my post though. (only when the bot recognizes text that it needs to reply to does mchat double post my post.)
User avatar
Pico88
Registered User
Posts: 878
Joined: Sat Mar 07, 2009 10:24 pm
Location: Poland
Name: Lukasz

Re: [RC] mChat Bot

Post by Pico88 »

It has to be after line. (as in instruction)

Have you try to re-edit mchat.php ? I mean - uninstall and install it.

Show me it.

BTW, in my view you have to much addons installed (espacially which need java).
Please do not PM me for support.
Gino
Registered User
Posts: 124
Joined: Sun Mar 21, 2010 2:39 pm
Contact:

Re: [RC] mChat Bot

Post by Gino »

great MOD
plasmadan
Registered User
Posts: 6
Joined: Wed Aug 24, 2011 5:19 pm

Re: [RC] mChat Bot

Post by plasmadan »

Awesome MOD, I'm just editing the response tables for my site, and I'm wondering if it's possible to enter variations, or alternative versions of the same "User say" without having to create a new text entry each time?

eg, "hello mchatbot" could be written in so many possible ways, it's almost impossible to predict what members might try to use, but if could separate possible entries with a comma, or a "|" (like used to disallow BBcodes in mChat) it would make everything so much easier :roll:

Is it possible to make this alteration? and how would I go about it? Thanks :)
User avatar
Pico88
Registered User
Posts: 878
Joined: Sat Mar 07, 2009 10:24 pm
Location: Poland
Name: Lukasz

Re: [RC] mChat Bot

Post by Pico88 »

use categories
Please do not PM me for support.
plasmadan
Registered User
Posts: 6
Joined: Wed Aug 24, 2011 5:19 pm

Re: [RC] mChat Bot

Post by plasmadan »

Categories work the other way round too? :?
I though that was just to select a random response?
I'm already using categories for everything.

So If i wanted to create a response to... "hello mchatbot" but also include "hi mchatbot", "hey mchatbot", or any other variations i decide later?

I've tried a few methods, but it will only respond if the text matches exactly, including commas ect... so in the end the only way I've managed to get it respond to multiple versions, is to create a new text entry for each one, and select the same category as the response. Is there no way to just put them all in one text entry? :?
User avatar
Pico88
Registered User
Posts: 878
Joined: Sat Mar 07, 2009 10:24 pm
Location: Poland
Name: Lukasz

Re: [RC] mChat Bot

Post by Pico88 »

There is no option to make variations or sth like that - as you want to have. (I misundestood you).
You can only set, as you mentioned, random response.
Please do not PM me for support.
plasmadan
Registered User
Posts: 6
Joined: Wed Aug 24, 2011 5:19 pm

Re: [RC] mChat Bot

Post by plasmadan »

That's what I thought. Would it be a simple job to make this change? ...for an experienced php coder I mean :lol:

Just out of curiosity, is there a limit to size of the text/response tables? mine are getting pretty huge already :shock: (hence why I was asking about combining them) ...So-far I haven't noticed any increased loading times for the response(s) anyway.

Thanks for the help :)
User avatar
Pico88
Registered User
Posts: 878
Joined: Sat Mar 07, 2009 10:24 pm
Location: Poland
Name: Lukasz

Re: [RC] mChat Bot

Post by Pico88 »

That need some experinced php code changes.
There is no limit for those tables.
Please do not PM me for support.
plasmadan
Registered User
Posts: 6
Joined: Wed Aug 24, 2011 5:19 pm

Re: [RC] mChat Bot

Post by plasmadan »

Ok, was just a thought ;)
Well I guess I'll have to make do, now I know there is no limit I feel a little better :lol:

Thanks Pico88. :D
Tarantino
Registered User
Posts: 800
Joined: Sat Feb 18, 2012 1:51 pm
Contact:

Re: [RC] mChat Bot

Post by Tarantino »

Hi there, I've mChat with this Bot. And it's all fine. Im just asking how can I do, for the welcome message to be just for when someone register. And not when someone Login.

Kudos! :D
User avatar
Pico88
Registered User
Posts: 878
Joined: Sat Mar 07, 2009 10:24 pm
Location: Poland
Name: Lukasz

Re: [RC] mChat Bot

Post by Pico88 »

That would be possible.
Have a look on WPM (Welcome Private Message). You can base on it - copy the code responsible for welcome message, to same part where WPM mod puts it code, to send WPM :)

Sorry, but I haven't time to do that and test it.
Please do not PM me for support.
Tarantino
Registered User
Posts: 800
Joined: Sat Feb 18, 2012 1:51 pm
Contact:

Re: [RC] mChat Bot

Post by Tarantino »

Hmm, I see. I've that mod too. I'll check it. And try to make it! Thks! :D
Locked

Return to “[3.0.x] Abandoned MODs”