mIRC Home    About    Download    Register    News    Help

Print Thread
#145857 28/03/06 11:14 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
how do you get mirc to read countries(domains)
when raw 311 gives:

$1 razor
$2 user_1
$3 user_id
$4 host.domain
$5 some_info

and i cant use gettok coz you never know how
long host will be...


IceCapped
#145858 28/03/06 11:16 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
//echo -a $gettok(this.is.a.long.host,-1,46) <--

host <--

//echo -a $gettok(this.is.a.long.host,-2-,46) <--

long.host <--

Last edited by mIRCManiac; 28/03/06 11:17 PM.
#145859 28/03/06 11:28 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
thanks laugh

i always sucked at tokens =)


IceCapped
#145860 28/03/06 11:33 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
so it should be something like this?:
Code:
  
raw 311:*:{ 
haltdef 
.set %country $gettok($4,-1,46)
.set %domain $readini(country.ini, country, %country)
echo -a Adress: $3 $+ @ $+ $4 [ %domain ]
}
 


yes ?

Last edited by raZOR; 28/03/06 11:34 PM.

IceCapped
#145861 28/03/06 11:50 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
ok, made it to work :P

1 thing puzzles me

Code:
 
raw 311:*:{
  haltdef 
  .set %country $gettok($4,-1,46)
  .set %domain $readini(country.ini, country, %country)
  /msg %cwhois Whois  $+ $2 $+  
  /msg %cwhois IRCname: $5- 
  /msg %cwhois Adress: $3 $+ @ $+ $4 [ %domain ]
  halt 
}

 


%cwhois is channel where output goes
but it never says:

[email]id@host.domain[/email] [country]
but just
[email]id@host.domain[/email] country

(so no [] brackets are present in msg output)

why if i may ask ?


IceCapped
#145862 29/03/06 12:11 AM
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
Replace
[ %domain ]

with
$+([,%domain,])

Otherwise mIRC thinks you're trying to evaluate %domain, which you are not. Er, that's probably a bad way to explain it, but hopefully you get it.

#145863 29/03/06 09:34 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
hey, thanks alot !
it works laugh


IceCapped

Link Copied to Clipboard