This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

!isop

Old posts that have not been replied to for several years.
Locked
d
deebeeseven

!isop

Post by deebeeseven »

what is the mIRCscript statement !isop (is not op) version in tcl? anyone?

if {[!isop $nick $chan]} { }

i want it to halt if they are not opped,

oh, and while you are there...anyone know the one for not voiced, i wanna make one command ops only, and the other voice only. (i am editing the quote.tcl from the archive...having anyone and everyone being able to trigger/add quotes would be a mess)
t
tradergt

Post by tradergt »

if {[isop $nick $chan]} {return 0}

try that
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

That will trigger if the nickname is a op.

Just change it to

Code: Select all

if {![isop $nick $chan]} { return }
d
deebeeseven

Post by deebeeseven »

isop worked, but i am looking for return 0 when the person hitting the trigger is _not_ an op. i tried doing it like that and then using an else statement to tell the non ops that only ops were permitted to use it...but it didn't work.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

It looks like you are getting mixed up, as to what the command does.

If you see the exmple I gave, it will trigger the return when the person is not a OP (IE, they don't have a @ next to there nickname on IRC).

On top of this, it looks like you fail to grasp what scripting does/how it works.

If you are trying to send a message to non-ops, to say they can't use the command, then why are you using return. Return is used, to pass control back to the script that called the script in question, eventualy back to eggdrop itself.

On top of this, if you return when the user is a OP, then the script wont for the OP's either.

The "isop" command returns a number. 1 represents true, 0 respresents false.

The if command, triggers code, based on the conditions. IE, if true, then trigger, if false don't.

EG
ppslim is OP on #help

if {[isop ppslim #help]} { CODE WORKS }

The ! is used to reverse the outcome of a command.

IE, TRUE becomes FALSE, and FALSE becomes TRUE.

Thus

if {![isop ppslim #help]} { CODE DOES NOT WORK }
Locked