mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2008
Posts: 3
N
Self-satisified door
OP Offline
Self-satisified door
N
Joined: Aug 2008
Posts: 3
Hello, I've been learning mIRC scripting since last night, and I've LOVED it. It's sooooo fun. smile

I have a script and have been trying to tweak it.

The user uses "google [what to search]" and the bot kicks back a link.

I've been trying to tweak it so that I can make it so users use @google [what to search] instead, and instead of just providing a link, providing the title of the page, along with the description as well.

Here is the code so far:

http://files.outerhaven.org/google.txt


Can somebody help me out here in doing this, or perhaps point me to a script that already allows this? Or point me in the right direction of doing it myself?

Last edited by NateBenton; 07/08/08 10:09 AM.
Joined: Jul 2008
Posts: 24
W
Ameglian cow
Offline
Ameglian cow
W
Joined: Jul 2008
Posts: 24
The trigger bit is easy:
Change
Code:
on *:text:*google*:#: {

to
Code:
on *:text:*@google*:#: {


It isnt impossible to get the script to send you back the title and description, But, bear in mind this is a full page of information as you'd see in google... Often people only read the title of the page anyway, so why not get it to parse the title of the page, followed by the link?

Code:

<a href="http://www.pyzam.com/funnypictures" class=l onmousedown="return clk(this.href,'','','res','4','')">Pyzam - <em>Funny Pictures</em></a>



You'd most likely want to use that sort of thing from the source. I gotta run now though, so havent tried to parse the info you want yet.


=======================
Count WhipLash
Services Administrator
KnightNet
=======================
Joined: Aug 2008
Posts: 3
N
Self-satisified door
OP Offline
Self-satisified door
N
Joined: Aug 2008
Posts: 3
I appreciate you helping me smile

Joined: Aug 2008
Posts: 3
N
Self-satisified door
OP Offline
Self-satisified door
N
Joined: Aug 2008
Posts: 3
Okay, it appears changing it to what you said breaks the bot. I didn't touch anything else, I just wanted it to use the @ command instead.

It just doesn't respond to the Google function anymore.


Link Copied to Clipboard