mIRC Home    About    Download    Register    News    Help

Topic Options
#141424 - 09/02/06 09:03 AM Announce Power
blk Offline
Babel fish

Registered: 07/02/06
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..
Code:
 on @1:OP:#:if ($opnick == $me) { .msg $chan wow, Oped! } 
_________________________
-blk-

Top
#141425 - 09/02/06 10:42 AM Re: Announce Power
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
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

Top
#141426 - 09/02/06 11:54 AM Re: Announce Power
blk Offline
Babel fish

Registered: 07/02/06
Posts: 95
Ok, i came up with 6 scripts
Code:
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-

Top
#141427 - 09/02/06 04:10 PM Re: Announce Power
bwr30060 Offline
Fjord artisan

Registered: 23/05/05
Posts: 449
Loc: Georgia USA
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.
Code:
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! }
 
_________________________
Bears on Patrol Chat

Top
#141428 - 09/02/06 04:22 PM Re: Announce Power
blk Offline
Babel fish

Registered: 07/02/06
Posts: 95
Ya, im an idiot...
That works but the DePowers don't work still...

for reference:
Code:
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-

Top
#141429 - 09/02/06 04:51 PM Re: Announce Power
bwr30060 Offline
Fjord artisan

Registered: 23/05/05
Posts: 449
Loc: Georgia USA
Code:
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! } 
_________________________
Bears on Patrol Chat

Top
#141430 - 09/02/06 05:37 PM Re: Announce Power
Jigsy Offline
Hoopy frood

Registered: 18/11/04
Posts: 798
Loc: I live inside your computer. S...
Since people like to flood these scripts off ...

Code:
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 } }
_________________________
This signature is currently out of order. We apologize for the inconvenience.

Top
#141431 - 09/02/06 07:22 PM Re: Announce Power
schaefer31 Offline
Fjord artisan

Registered: 27/08/05
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.

Top
#141432 - 09/02/06 09:19 PM Re: Announce Power
Jigsy Offline
Hoopy frood

Registered: 18/11/04
Posts: 798
Loc: I live inside your computer. S...
Simple typo :x

and I can't edit the post now smirk


Edited by Jigsy (09/02/06 09:19 PM)
_________________________
This signature is currently out of order. We apologize for the inconvenience.

Top
#141433 - 09/02/06 09:22 PM Re: Announce Power
blk Offline
Babel fish

Registered: 07/02/06
Posts: 95
Ok, sweet....
_________________________
-blk-

Top