mIRC Homepage
Posted By: seanturner70 How to only allow & and ~ to use it. - 18/01/09 12:26 PM
I currently have this script:
Code:
...
      elseif ($1 == !aop) && ($2 == add) && ($nick *?*) { write $chan $+ .ao.txt $3 | notice $nick $3 has been added to the auto op list. | /mode $chan +o $3 }
      elseif ($1 == !aop) && ($2 == del) &&  ($nick *?*) { write -ds $+ $3 $chan $+ .ao.txt $3 | notice $nick $3 has been deleted from the auto op list. | /mode $chan -o $3 }
...


However, I do not know how to make it only usable by admins and owners.
I also have a similar one, for !sop add(del) <nick>.

I looked up "isop" and looked around that section in the help files, but didn't seem to find anything.


Thanks in advance.
Posted By: 5618 Re: How to only allow & and ~ to use it. - 18/01/09 01:03 PM
modes & and ~ are not supported in mIRC so that there is an operator for it. However, you can use...
Code:
if ($nick(#,$nick,q))

or
Code:
if (~ isin $nick(#,$nick).pnick)

...for mode +q/~, and...
Code:
if (& isin $nick(#,$nick).pnick)

...for mode +a/&
Thanks grin
Posted By: Tomao Re: How to only allow & and ~ to use it. - 18/01/09 08:18 PM
You can also use this:
Code:
if ($nick($chan,$nick,&~))
Posted By: 5618 Re: How to only allow & and ~ to use it. - 18/01/09 08:42 PM
Originally Posted By: Tomao
You can also use this:

Interesting...
Posted By: DJ_Sol Re: How to only allow & and ~ to use it. - 18/01/09 09:14 PM
This is the identifier I choose to use for user modes not supported by mIRC.
I found: ($nick(#,$nick,q)) and ($nick(#,$nick,a)) to work well.
Code:
...
      elseif ($1 == !vop) && ($2 == add) { write $chan $+ .av.txt $3 | notice $nick $3 has been added to the autovoice list. | /mode $chan +v $3 }
      elseif ($1 == !vop) && ($2 == del) { write -ds $+ $3 $chan $+ .av.txt $3 | notice $nick $3 has been deleted from the autovoice list. | /mode $chan -v $3 }
      elseif ($1 == !hop) && ($2 == add) { write $chan $+ .ah.txt $3 | notice $nick $3 has been added to the auto-hop list. | /mode $chan +h $3 }
      elseif ($1 == !hop) && ($2 == del) { write -ds $+ $3 $chan $+ .ah.txt $3 | notice $nick $3 has been deleted from the auto-hop list. | /mode $chan -h $3 }
      elseif ($1 == !aop) && ($2 == add) && ($nick(#,$nick,a)) { write $chan $+ .ao.txt $3 | notice $nick $3 has been added to the auto op list. | /mode $chan +o $3 }
      elseif ($1 == !aop) && ($2 == del) && ($nick(#,$nick,a)) { write -ds $+ $3 $chan $+ .ao.txt $3 | notice $nick $3 has been deleted from the auto op list. | /mode $chan -o $3 }
      elseif ($1 == !sop) && ($2 == add) && ($nick(#,$nick,q)) { write $chan $+ .so.txt $3 | notice $nick $3 has been added to the auto-administration list. | /mode $chan +ao $3 $3 }
      elseif ($1 == !sop) && ($2 == del) && ($nick(#,$nick,q)) { write -ds $+ $3 $chan $+ .so.txt $3 | notice $nick $3 has been deleted from the auto-administration list. | /mode $chan -ao $3 $3 }
      elseif ($1 == !qop) && ($2 == add) && ($nick(#,$nick,q)) { write $chan $+ .qo.txt $3 | notice $nick $3 has been added to the auto-owner list. | /mode $chan +qo $3 $3 }
      elseif ($1 == !qop) && ($2 == del) && ($nick(#,$nick,q)) { write -ds $+ $3 $chan $+ .qo.txt $3 | notice $nick $3 has been deleted from the auto-owner list. | /mode $chan -qo $3 $3 }
...

(the rest of the script is set so only Ops can use it.)

Posted By: RusselB Re: How to only allow & and ~ to use it. - 19/01/09 12:47 AM
According to the help file $nick(#,$nick,a) would return the nick no matter what modes the nick has, as the 'a' is for all, not admin.
Quote:
a = all nicks


I have seen, and do use the following.
For admin: $nick(#,$nick,&)
For owner/founder: $nick(#,$nick,~)
oh, ok smile
© mIRC Discussion Forums