mIRC Home    About    Download    Register    News    Help

Print Thread
#65288 25/12/03 03:18 AM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
my script has this system:

Whois user
IRCname: somename
Address: ~user@host [ countryl ]
Channels: #chan1 +#chan2 @#chan3 %#chan4
Server: someserver
Idle: day hrs mins secs Sign on: time - date On-line: time
End of Whois


BUT on some script i saw something nicer like this:


Whois user
IRCname: somename
Address: ~user@host [ countryl ]
Channels:
o: #chan1 #chan2 #chan4
v: #somechan #anotherchan
h: #chn1
Server: someserver
Idle: day hrs mins secs Sign on: time - date On-line: time
End of Whois

etc... (think every1 got the point)
channel sorting !

how to do it?

my raws:


;------------------------------------------------
; /whois
;------------------------------------------------
;


raw 401:*: { if ($query($2)) { .infoecho  $+ $2 is not connected. } | .set %whois.Nick 0 | halt }
raw 307:*: echo -s $theme(raw307,$5-) | halt
raw 308:*: echo -s $theme(raw308,Yes) | halt
raw 309:*: echo -s $theme(raw309,Yes) | halt
raw 310:*: echo -s $theme(raw310,Yes) | halt
raw 301:*: if (%whois == On) { echo -s $theme(raw301,$2,$3-) | unset %whois | halt } | else { infoecho  $+ $2 is Away - $3- } | halt
raw 311:*: { set %whois On | linesep -s | set -u %country $ccode($4) | echo -s $theme(Wsl,$2) | echo -s $theme(raw311name,$2,$6-) | echo -s $theme(raw311add,$2,$3,$4,%country) | halt }
raw 312:*: { if (%whowas.requested == Yes) { echo -s $theme(raw312ww,$3,$4-) | unset %whowas.requested | halt } | else { echo -s $theme(raw312,$3,$4,%country) } | unset %whois.Nick | halt }
raw 313:*: echo -s $theme(raw313,Yes) | halt
raw 317:*: var %tempe = $time($4),rs,r,ins,in,ecs,ec | var %onl = $time($calc($ctime - $4)) | .echo -s $theme(raw317,%tempe,$date($4),%onl,$duration($3)) | halt
raw 319:*: echo -s $theme(raw319,$3-) | halt

if that helps ....
pls help me smirk


regards, merry x-mas, eat much, be lazy, get fat layers on your body & enjoy the party !

#65289 25/12/03 03:40 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Look at the prefix of the channel..

^ & * @ + %

They all mean something >:P

hint: $wildtok

$wildtok(ChannelList, @*, 1, 32) <-- First Op'd channel


-KingTomato
#65290 25/12/03 03:55 AM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
i am terrible on advanced coding for mirc smirk
you can give me what vars i need but i am too stupid to inplemt them into my script/raws smirk

ehm... any details ?

#65291 25/12/03 04:10 AM
Joined: Nov 2003
Posts: 227
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Nov 2003
Posts: 227
just parse them with something like this:
Code:
raw 319:*:{
  var %x = 3 , %op, %hop , %voice, %reg 
  while (%x &lt;= $0) {
    if (@* iswm $gettok($1-,%x,32)) { %op = %op $gettok($1-,%x,32) }
    elseif (% $+ * iswm $gettok($1-,%x,32)) { %hop = %hop $gettok($1-,%x,32) }
    elseif (+* iswm $gettok($1-,%x,32)) { %voice = %voice $gettok($1-,%x,32) }
    else { %reg = %reg $gettok($1-,%x,32) }
    inc %x
  }
  echo -a Opped on: %op
  echo -a Hopped on: %hop
  echo -a Voiced on: %voice
  echo -a Reg on: %reg
}

or use $wildtok like KingTomato said, but this way you only need to loop once, but remember that if they are on lots and lots of channels the server will send more than 1 raw 319, then you will need to change that and store things in global vars.

#65292 25/12/03 04:16 AM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
hmmm, i'll try your script, hope it will work then i'll see what next smile

thank you


Link Copied to Clipboard