mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2005
Posts: 1
R
Mostly harmless
OP Offline
Mostly harmless
R
Joined: Oct 2005
Posts: 1
Code:
on 1:TEXT:!imdb *:# {
  set %search $remove($1-,!imdb )
  set %url http://www.imdb.com/find?s=tt;q= $+ %search
  %url = $remove(%url, ,)
...


when trying eg !imdb test
returns: http://www.imdb.com/find?s=tt;q= test

any ideas of removing that damn space?

Joined: Apr 2005
Posts: 17
D
Pikka bird
Offline
Pikka bird
D
Joined: Apr 2005
Posts: 17
It would be easier just to...

set %url http://www.imdb.com/find?s=tt;q= $+ $2-

its best to then replace the other spaces with %20

set %url http://www.imdb.com/find?s=tt;q= $+ $replace($2-,$chr(32),$+(%,20))

Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
Code:
on 1:TEXT:!imdb *:# {
  set %url http://www.imdb.com/find?s=tt;q= $+ $$2-

and/or 

on 1:TEXT:!imdb *:# {
  set %url http://www.imdb.com/find?s=tt;q= $+ $replace($$2-,$chr(32),+)


though I dont know why you are setting the variable, unless it is going to be sent to an alias or something

var %var = data (local variable)
is often better than
set %var data (global variable)

Joined: Jan 2005
Posts: 192
Vogon poet
Offline
Vogon poet
Joined: Jan 2005
Posts: 192
First what is %url = $remove(%url, ,)
Did you mean var %url = $remove(%url, ,) ?

Why not to try with:
set %url http://www.imdb.com/find?s=tt;q= $+ $2-

-edit-
MikeChat you are too quick for me

Last edited by Brax; 02/10/05 02:30 AM.

echo -a $signature
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
not overly important but you dont need to use $$2- in there, $2- well do.

Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
true, but its an easy way to keep someone from hitting you with the trigger but no data request.


Link Copied to Clipboard