mIRC Homepage
Posted By: Deep3D Display $2- as * in Popup menu. - 29/05/06 09:13 PM
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.
Posted By: KingTomato Re: Display $2- as * in Popup menu. - 29/05/06 09:49 PM
$mid($gettok($chan(#).mode,1,32),2) perhaps? Not sure if I understood the question or not, but I think that's it.
Posted By: Deep3D Re: Display $2- as * in Popup menu. - 29/05/06 10:07 PM
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.
Posted By: KingTomato Re: Display $2- as * in Popup menu. - 29/05/06 11:48 PM
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?
Posted By: Deep3D Re: Display $2- as * in Popup menu. - 30/05/06 10:33 AM
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
Posted By: DaveC Re: Display $2- as * in Popup menu. - 30/05/06 10:47 AM
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 *
Posted By: Deep3D Re: Display $2- as * in Popup menu. - 30/05/06 11:11 AM
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.
Posted By: Mpdreamz Re: Display $2- as * in Popup menu. - 30/05/06 11:34 AM
Code:
Modes $iif($chan(#).mode,$+($chr(40),$regsubex($remove($chan(#).mode,+),/^(\w+)?\s\w+/,\t *),$chr(41))):channel 


Totally untested smile
Posted By: Deep3D Re: Display $2- as * in Popup menu. - 30/05/06 11:49 AM
Dosen't work here.
Posted By: Mpdreamz Re: Display $2- as * in Popup menu. - 30/05/06 01:11 PM
Make sure you have 6.17 due to $regsubex, i just tested it myself and it works. smile
Posted By: Deep3D Re: Display $2- as * in Popup menu. - 30/05/06 01:30 PM
Oh, I have'n updatet. blush

Thanks!
Posted By: Deep3D Re: Display $2- as * in Popup menu. - 30/05/06 01:36 PM
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.
Posted By: Mpdreamz Re: Display $2- as * in Popup menu. - 30/05/06 02:21 PM
Code:
Modes $iif($chan(#).mode,$+($chr(40),$regsubex($remove($chan(#).mode,+),/^(\w+)?\s.*/,\t *),$chr(41))):channel 


Sorry about that smile
Posted By: Deep3D Re: Display $2- as * in Popup menu. - 30/05/06 05:59 PM
Nice!

Thank you.
© mIRC Discussion Forums