Another way of checking superowner is:
if ($left($nick(#,$nick).pnick,1) == ') {
You do the same for various prefixes, which can be checked using
//echo $prefix
to find out. d33j4y's example is equally efficient and shorter and does the same thing.
It isnt ishost, it's isop. if ($me isop #)
And I agree with err0r. Use isowner, isop, ishop.
You can also combine user modes in the $nick identifier.
if ($nick(#,$nick,' %)) will be true if nick is a super owner or helpop.
This has helped me a bit too with the nicklist i am going to be working on
Spam Honeypot - http://www.haggistech.co.uk/honey(humans do not register)
didn't you know?
err0r: 666 + 1337 = 2003 backwards is 3002 which is how many people ozzy has banned from tg
err0r: spooky
Ok so you know what I am trying to do, I am a gold & my auto vice keeps trying to voice superowners & i am trying to stop the message, YOU CANNOT CHANG THE LEVEL OF SOMONE HIGHER THAN YOURS.
on *:join:#:{
;Auto Voice
if ($readini($settings(chanoptions.txt),$iif($ini($settings(chanoptions.txt),#,0) != 0,#,Default),AutoVoice)) {
if ($nick($chan,$mnick,')) { return }
.sockwrite -tn buzzen mode # +v $nick
}
}
Instead of using:
if ($nick($chan,$mnick,')) { return }
Why didn't you use:
if (!$nick($chan,$mnick,')) {
You could've saved yourself a closing bracket. The ! tells mirc to negate.
i would suggest the other approach for general use (disregarding superowners as they are server particular, not general IRC) as general IRC may have different prefixes.
try and learn to combine if statements where possible... for example...
on @*:join:#:{
;Auto Voice
if (!$nick($chan,$mnick,') && $readini($settings(chanoptions.txt),$iif($ini($settings(chanoptions.txt),#,0) != 0,#,Default),AutoVoice)) {
.sockwrite -tn buzzen mode # +v $nick
}
I agree with err0r again! lol sorry tgk.
I'd do away with your aliases and $iif's in your $readini command though. ![]()
Try this method:
..$Iif($Nick(#, $Me, '.), $Style(0), $Style(2)) +q: sockwrite -n $C_Sock(#) $RawLineFeed(MODE, +q, $1-)
..$Iif($Nick(#, $Me, '.), $Style(0), $Style(2)) -q: sockwrite -n $C_Sock(#) $RawLineFeed(MODE, -q, $1-)
..-
...$Iif($Nick(#, $Me, '.@), $Style(0), $Style(2)) +o: sockwrite -n $C_sock(#) $RawLineFeed(MODE, +o, $1-)
...$Iif($Nick(#, $Me, '.@), $Style(0), $Style(2)) -o: sockwrite -n $C_sock(#) $RawLineFeed(MODE, -o, $1-)
..-
...$Iif($Nick(#, $Me, '.@), $Style(0), $Style(2)) +h: sockwrite -n $C_sock(#) $RawLineFeed(MODE, +h, $1-)
...$Iif($Nick(#, $Me, '.@), $Style(0), $Style(2)) -h: sockwrite -n $C_sock(#) $RawLineFeed(MODE, -h, $1-)
..-
...$Iif($Nick(#, $Me, '.@), $Style(0), $Style(2)) +v: sockwrite -n $C_sock(#) $RawLineFeed(MODE, +v, $1-)
...$Iif($Nick(#, $Me, '.@), $Style(0), $Style(2)) -v: sockwrite -n $C_sock(#) $RawLineFeed(MODE, -v, $1-)
Well whoever wrote that didn't need to do all that.
$iif($me isop #,$true,$false) is $true when you are superowner.
The only time you need to use $nick(#,$me,') or $nick(#,$nick,') is if you want to make sure you or they are a superowner and not owner or host.
For Buzzen user mode prefix, only two worth taking notice of are '^ and '
Sign in to reply or start a new topic where your account has permission.