PtokaX forum

Archive => Archived 5.1 boards => Finished Scripts => Topic started by: bastya_elvtars on 19 February, 2007, 17:37:50

Title: Google Bot
Post by: bastya_elvtars on 19 February, 2007, 17:37:50
http://forum.ptokax.org/index.php?action=tpmod;dl=item47

This little bitch generates google links for you.

--| googlebot.lua version 0.3 07-12-2005 |--
--| |--
--| GoogleBot |--
--| Author: ZeroSleep |--
--| e-mail: more (dot) caffiene (at) gmail (dot) com |--
--| |--
--| PtokaX version by ATAG 19.02.2007
--| Translated to English by bastya_elvtars  19.02.2007
--| |--
Title: Re: Google Bot
Post by: zvamp on 20 February, 2007, 13:57:44
I tried "+google movie" < scripts\googlebot.lua:40: attempt to concatenate local 'searchstring' (a nil value)

And I also tried "+google mp3 megadeth" < No warnings here, but still no links generated

And it would be nice if the bot didn?t show in userlist, and with rightclick :P
Title: Re: Google Bot
Post by: bastya_elvtars on 20 February, 2007, 14:58:59
ATAG will probably take a look.
Title: Re: Google Bot
Post by: ATAG on 20 February, 2007, 21:50:54
It's normal :) Syntax is:
+google <file_extension> <searchstring(s)>     - check +ghelp ;)
In other case you may use /g command :D
If vou don't want to reg a bot, just set
Config.usebot = falseat the beginning of code..

But there is a fault in my original (hungarian version) script. You must correct it to:
function ChatArrival(user,data)
local _,_,cmd,filetype,searchstring = string.find(data,"%b<>%s%p(%S+)%s*(%S-)%s*(%S*)|")
Sorry for that :(
Title: Re: Google Bot
Post by: zvamp on 20 February, 2007, 22:34:18
thank you!! works fine now! nice work   :-* :-* :-*