vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   TomBot v1.1 vB AI User Bot (https://vborg.vbsupport.ru/showthread.php?t=48053)

scsa20 01-28-2003 05:25 AM

I keep getting the following error when I post a reply or a new thread:

Quote:

Warning: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/scsa20/public_html/forums/tomstalkerbot.php on line 46

Warning: fopen("http://www.simon-soft/forums/alice/src/talk.php?input=tombot+is+kwel", "r") - Bad file descriptor in /home/scsa20/public_html/forums/tomstalkerbot.php on line 46

Warning: fread(): supplied argument is not a valid File-Handle resource in /home/scsa20/public_html/forums/tomstalkerbot.php on line 47

Warning: fclose(): supplied argument is not a valid File-Handle resource in /home/scsa20/public_html/forums/tomstalkerbot.php on line 48
how do I fix this??

Brad 01-28-2003 07:44 AM

http://www.kousetsu.net/forums/showt...0856#post30856

LOL!! ;)

bandersen 01-28-2003 07:54 AM

:p

So cool Anime-loo! I must get "mine" to work asap!

Radgam 01-28-2003 08:34 AM

Quote:

Originally posted by JBMoney
Radgam - It's working a lot better for me without these last two lines:

$response = preg_replace("/(\?|\.|!)(\w)/" , " $1", $response );
$response = preg_replace("/(\w)\s+(\w|\?|\.|!)/","$1 $2",$response);

They seem to be causing all the punctuation related problems I mentioned.

that's weird :( It's just a basic find/replace, it shouldn't be cutting off any characters... I tested it throughly on my localhost before posting as well :dead:

Could be the different OS i guess. The problem i found (just for example) is when you say "my favourite movie is lord of the rings" and you get a ton of white space.

I'll test the code a bit more and let you know what i find.

edit: oooo, i very much appologise for my mistake in the original post. I forgot to include the $2 variable which contains the word in the find/replace :eek:

Here is the updated version, please let me know if it works :nervous: (and yes, i know it's quite a few searches, but they need to be seperate to function properly :/ - but it has cleaned the output very well on my board (and is based on heavy testing!!)

Code:

Find:
$ttb_time = time() + rand(1,5);

After that line add:
       
// Clean Output
$response = str_replace('<br>' , '', $response );
$response = str_replace('</br>' , '', $response );
$response = str_replace(', .' , '.', $response );
$response = preg_replace("/(\?|\.|!)(\w)/","$1 $2",$response);
$response = preg_replace("/(\w|,)\s+(\w|\?|\.|!)/","$1 $2",$response);
$response = preg_replace("/\n\s+/","\n",$response);


Mickie D 01-28-2003 01:33 PM

yeah this hack looks very good :)

just wondering if i can only have a forum where he can answer in ???

like a forum called "ask the bot"

Radgam 01-28-2003 01:34 PM

that's how the hack currently works :) You can have the bot enabled in one selected forum.

Banana 01-28-2003 02:48 PM

OK, just did the install - all appeared OK. Read 24 pages of this thread (phew!). Everything appears fine BUT I have no entries in the "bots" table. The install says "Login to phpmyadmin and check in the 'bots' table that the bot id is 0 you find that the table 'bot's the id number in there needs editing to 0 from 1 in some cases" - so what is the row that's missing? thanks!

fury 01-28-2003 03:35 PM

Hmm, it deletes all current rows resulting from the aiml imports? That would probably explain why it only has 3000 some categories.

Radgam 01-28-2003 03:37 PM

could someone who seems to be understanding all this AIML stuff better than i am explain what i should do with this? :D

<category>
<pattern>I LIVE IN *</pattern>
<template>What is <set name="it"><set name="topic">living in <person/></set></set> like living in
<set name="location"><person/></set>?
<think><set name="it"><set name="topic"><person/></set></set></think>
</template></category>

Now, that's the cause of the AI problem on my forum where i say "I live in placename" it responds "what is living in placename like living in placename?"

Martin64 01-28-2003 03:41 PM

Quote:

Originally posted by fury
Hmm, it deletes all current rows resulting from the aiml imports? That would probably explain why it only has 3000 some categories.
Indeed it does, but if you remove the line in botloader.php I posted about above it will not delete old rows, it will only import new aiml if there is.


All times are GMT. The time now is 09:37 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01635 seconds
  • Memory Usage 1,745KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete