mIRC Homepage
Posted By: kitsaras little help please - 21/11/07 07:22 PM
Hello i need some help in this.
I have a command named: :noticeserver | return %::text
I wanna dissable - enable this command when i am ircop and enable it again when i am a normal user

if (o isin $usermode)
theme.text noticeserver <----to turn this off ex: :noticeserver | return (nothing)

if $me == normaluser
theme.text noticeserver <----to turn this on ex: :noticeserver | return %::text

I hope u understand what i need.
Thanks a lot.
Posted By: Bekar Re: little help please - 21/11/07 09:14 PM
I'm thinking you're wanting an inline-if, but the example code you have there is a bit vauge..

so.. this is a guess:

Code:
:noticeserver | return $iif(o !isincs $usermode, %::text)
Posted By: kitsaras Re: little help please - 21/11/07 09:41 PM
with a bit of modification but i dont know how.

default: :noticeserver | return %::text

that i need is: to return nothing when $usermode

Code:
 :noticeserver | return $iif(o !isincs $usermode, %::%text) 


is that right ?

Code:
 :noticeserver | return $iif(o !isincs $usermode,) | else :noticeserver | return %::text 



thanks for the reply and the help.
Posted By: kitsaras Re: little help please - 23/11/07 12:01 PM
solved replaced :noticeserver | return %::text with :

Code:
    if (o isin $usermode) { return }
    elseif ($target isin $me) echo -s $_timestamp (SNotice) %::text 
© mIRC Discussion Forums