mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
Code:
 Modes $iif($chan(#).mode, $+($chr(40),$remove($chan(#).mode, +),$chr(41))):channel 


E.x:

Modes (nst 20)

What I need is only display the mods, and not the 20 number and ect like passwords.

I wold like the "$2-" to be displayed like this

Modes (nst *)

if there is more than nst just display them with the *

Thanks.

Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
$mid($gettok($chan(#).mode,1,32),2) perhaps? Not sure if I understood the question or not, but I think that's it.


-KingTomato
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
Yes now the old display (nstl 90)
and the new (nstl)

need the new to look like (nstl *)

"Replace" * with $2- in a way..

if there is something more than just nstl then display
(nstl *) otherwise (nstl)

Thank you for the help and quick reply.

Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Maybe just $mid($chan(#).mode,2) ?

Still don't get what you mean. Is the channel hiding the attributes to the mode, and you want them shown in the menu regardless? Or just the contents of the modes value without the + prefix?


-KingTomato
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
I'm useless for explain..

Well..

If a channel mode is set to e.x: ntl 22

Then show: (ntl *)

But if channel mode is just nt then only show (nt)

So all other then the letters(mods) must be shown as a *

* = e.x password/userlimit ect.

if ntl = 1
and 22 = 2

then show (1 *)

If there is more than just the mode letters, show $2- as a *

Hope you understand me now. Thanks

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Its as simple as $1 $iif($0 > 1,*)

examples
//tokenize 32 a | echo -a $1 $iif($0 > 1,*)
a
//tokenize 32 a b c | echo -a $1 $iif($0 > 1,*)
a *

Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
How do I add it in:

Code:
 Modes $iif($chan(#).mode, $+($chr(40),$remove($chan(#).mode, +),$chr(41))):channel 


I've tryed a little, but diden't figure it out.

Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
Code:
Modes $iif($chan(#).mode,$+($chr(40),$regsubex($remove($chan(#).mode,+),/^(\w+)?\s\w+/,\t *),$chr(41))):channel 


Totally untested smile

Last edited by Mpdreamz; 30/05/06 11:41 AM.
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
Dosen't work here.

Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
Make sure you have 6.17 due to $regsubex, i just tested it myself and it works. smile


$maybe
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
Oh, I have'n updatet. blush

Thanks!

Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
One more thing..

If I have mode +lk 20 pass

It shows (lk * pass)

Like, it shows: $1 (and the $2 as *) and then $3

How to get all others than $1 to be *?

Like $2- = *

get me? thanks, I must be a pain in the ass. he he.

Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
Code:
Modes $iif($chan(#).mode,$+($chr(40),$regsubex($remove($chan(#).mode,+),/^(\w+)?\s.*/,\t *),$chr(41))):channel 


Sorry about that smile


$maybe
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
Nice!

Thank you.


Link Copied to Clipboard