|
Joined: Feb 2006
Posts: 95
Babel fish
|
OP
Babel fish
Joined: Feb 2006
Posts: 95 |
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! }
-blk-
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
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
|
|
|
|
Joined: Feb 2006
Posts: 95
Babel fish
|
OP
Babel fish
Joined: Feb 2006
Posts: 95 |
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...
-blk-
|
|
|
|
Joined: May 2005
Posts: 449
Fjord artisan
|
Fjord artisan
Joined: May 2005
Posts: 449 |
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! }
|
|
|
|
Joined: Feb 2006
Posts: 95
Babel fish
|
OP
Babel fish
Joined: Feb 2006
Posts: 95 |
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! }
-blk-
|
|
|
|
Joined: May 2005
Posts: 449
Fjord artisan
|
Fjord artisan
Joined: May 2005
Posts: 449 |
on 1:OP:#:if ($opnick == $me) { .msg $chan wow, Oped! }
on 1:DEOP:#:if ($opnick == $me) { .msg $chan man, DeOped! }
on 1:HELP:#:if ($hnick == $me) { .msg $chan wow, Half-Oped! }
on 1:DEHELP:#:if ($hnick == $me) { .msg $chan man, DeHalf-Oped! }
on 1:VOICE:#:if ($vnick == $me) { .msg $chan wow, Voiced! }
on 1:DEVOICE:#:if ($vnick == $me) { .msg $chan man, DeVoiced! }
|
|
|
|
Joined: Nov 2004
Posts: 842
Hoopy frood
|
Hoopy frood
Joined: Nov 2004
Posts: 842 |
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 } }
What do you do at the end of the world? Are you busy? Will you save us?
|
|
|
|
Joined: Aug 2005
Posts: 525
Fjord artisan
|
Fjord artisan
Joined: Aug 2005
Posts: 525 |
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.
|
|
|
|
Joined: Nov 2004
Posts: 842
Hoopy frood
|
Hoopy frood
Joined: Nov 2004
Posts: 842 |
Simple typo :x and I can't edit the post now
Last edited by Jigsy; 09/02/06 09:19 PM.
What do you do at the end of the world? Are you busy? Will you save us?
|
|
|
|
Joined: Feb 2006
Posts: 95
Babel fish
|
OP
Babel fish
Joined: Feb 2006
Posts: 95 |
-blk-
|
|
|
|
|