mIRC Home    About    Download    Register    News    Help

Print Thread
#190506 21/11/07 07:22 PM
Joined: Jan 2007
Posts: 18
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Jan 2007
Posts: 18
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.

Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
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)

Last edited by Bekar; 21/11/07 10:15 PM.
Joined: Jan 2007
Posts: 18
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Jan 2007
Posts: 18
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.

Joined: Jan 2007
Posts: 18
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Jan 2007
Posts: 18
solved replaced :noticeserver | return %::text with :

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


Link Copied to Clipboard