mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2008
Posts: 167
S
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.
Joined: Jun 2007
Posts: 933
5
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/&

Joined: Oct 2008
Posts: 167
S
Vogon poet
OP Offline
Vogon poet
S
Joined: Oct 2008
Posts: 167
Thanks grin

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
You can also use this:
Code:
if ($nick($chan,$nick,&~))

Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
Originally Posted By: Tomao
You can also use this:

Interesting...

Joined: Jan 2007
Posts: 1,156
D
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.

Joined: Oct 2008
Posts: 167
S
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.
Joined: Aug 2004
Posts: 7,252
R
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,~)

Joined: Oct 2008
Posts: 167
S
Vogon poet
OP Offline
Vogon poet
S
Joined: Oct 2008
Posts: 167
oh, ok smile


Link Copied to Clipboard