mIRC Home    About    Download    Register    News    Help

Print Thread
How to only allow & and ~ to use it. #208303 18/01/09 12:26 PM
Joined: Oct 2008
Posts: 167
S
seanturner70 Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Oct 2008
Posts: 167
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.

Last edited by seanturner70; 18/01/09 12:27 PM.
Re: How to only allow & and ~ to use it. [Re: seanturner70] #208305 18/01/09 01:03 PM
Joined: Jun 2007
Posts: 933
5
5618 Offline
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
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/&

Re: How to only allow & and ~ to use it. [Re: 5618] #208310 18/01/09 02:04 PM
Joined: Oct 2008
Posts: 167
S
seanturner70 Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Oct 2008
Posts: 167
Thanks grin

Re: How to only allow & and ~ to use it. [Re: seanturner70] #208337 18/01/09 08:18 PM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
You can also use this:
Code:
if ($nick($chan,$nick,&~))

Re: How to only allow & and ~ to use it. [Re: Tomao] #208339 18/01/09 08:42 PM
Joined: Jun 2007
Posts: 933
5
5618 Offline
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
Originally Posted By: Tomao
You can also use this:

Interesting...

Re: How to only allow & and ~ to use it. [Re: Tomao] #208340 18/01/09 09:14 PM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
This is the identifier I choose to use for user modes not supported by mIRC.

Re: How to only allow & and ~ to use it. [Re: 5618] #208345 18/01/09 10:22 PM
Joined: Oct 2008
Posts: 167
S
seanturner70 Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Oct 2008
Posts: 167
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.)


Last edited by seanturner70; 18/01/09 10:23 PM.
Re: How to only allow & and ~ to use it. [Re: seanturner70] #208352 19/01/09 12:47 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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,~)

Re: How to only allow & and ~ to use it. [Re: RusselB] #208377 19/01/09 05:21 PM
Joined: Oct 2008
Posts: 167
S
seanturner70 Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Oct 2008
Posts: 167
oh, ok smile