I was making a bunch of scripts about announcing power
to the room (like Op) i came up with a bunch, but I was wondering if theres a way to do them all in one script...
and i also dont know how to do halfop
Example of Op code..
on @1:OP:#:if ($opnick == $me) { .msg $chan wow, Oped! }
Your example would work fine in most situations.
For half-op, use ON HELP rather than ON OP
For voices ON VOICE
If you also have code for the removal, then you want ON DEOP, ON DEHELP, and ON DEVOICE.
Also, don't forget that if the server ops someone in the channel, the ON OP command won't catch it. You have to use ON SERVEROP for those
Ok, i came up with 6 scripts
on @1:OP:#:if ($opnick == $me) { .msg $chan wow, Oped! }
on @1:DEOP:#:if ($deopnick == $me) { .msg $chan man, DeOped! }
on @1:HELP:#:if ($hnick == $me) { .msg $chan wow, HalfOped! }
on @1:DEHELP:#:if ($dehnick == $me) { .msg $chan man, DeHalfOped! }
on @1:VOICE:#:if ($vnick == $me) { .msg $chan wow, Voiced! }
on @1:DEVOICE:#:if ($devnick == $me) { .msg $chan man, DeVoiced! }
When i get the powers, it says the message, but it seems I have to be Oped...
and the DePowers dont leave a message...
I haven't tested this, but maybe it's because this script is told only to perform if you're opped. Maybe change it to this.
on 1:OP:#:if ($opnick == $me) { .msg $chan wow, Oped! }
on 1:DEOP:#:if ($deopnick == $me) { .msg $chan man, DeOped! }
on 1:HELP:#:if ($hnick == $me) { .msg $chan wow, HalfOped! }
on 1:DEHELP:#:if ($dehnick == $me) { .msg $chan man, DeHalfOped! }
on 1:VOICE:#:if ($vnick == $me) { .msg $chan wow, Voiced! }
on 1:DEVOICE:#:if ($devnick == $me) { .msg $chan man, DeVoiced! }
Ya, im an idiot...
That works but the DePowers don't work still...
for reference:
on 1:OP:#:if ($opnick == $me) { .msg $chan wow, Oped! }
on 1:DEOP:#:if ($deopnick == $me) { .msg $chan man, DeOped! }
on 1:HELP:#:if ($hnick == $me) { .msg $chan wow, Half-Oped! }
on 1:DEHELP:#:if ($dehnick == $me) { .msg $chan man, DeHalf-Oped! }
on 1:VOICE:#:if ($vnick == $me) { .msg $chan wow, Voiced! }
on 1:DEVOICE:#:if ($devnick == $me) { .msg $chan man, DeVoiced! }
Since people like to flood these scripts off ...
on 1:OP:#:if (!%antiflood) { if ($opnick == $me) { .msg $chan wow, Opped! | set -u7 %antiflood } }
on 1:DEOP:#:if (!%antiflood) { if ($opnick == $me) { .msg $chan man, DeOpped! | set -u7 %antiflood } }
on 1:HELP:#:if (!%antiflood) { if ($hnick == $me) { .msg $chan wow, Half-Opped! | set -u7 %antiflood } }
on 1:DEHELP:#:if (!%antiflood) { if ($hnick == $me) { .msg $chan man, DeHalf-Opped! | set -u7 %antiflood } }
on 1:VOICE:#:if (!%antiflood) { if ($vnick == $me) { .msg $chan wow, Voiced! | set -u7 %antiflood } }
on 1:DEVOICE:#:if (!%antiflood) { if ($vnick == $me) { .msg $chan man, DeVoiced! | set -u7 %antiflood } }
WIth that code, !%antiflood will always be null, making the initial check useless. You need to assign some value (other than 0) to %antiflood in order for it to work properly.
Simple typo :x
and I can't edit the post now