mIRC Home    About    Download    Register    News    Help

Print Thread
Announce Power #141424 09/02/06 09:03 AM
Joined: Feb 2006
Posts: 95
B
blk Offline OP
Babel fish
OP Offline
Babel fish
B
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..
Code:
 on @1:OP:#:if ($opnick == $me) { .msg $chan wow, Oped! } 


-blk-
Re: Announce Power #141425 09/02/06 10:42 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
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

Re: Announce Power #141426 09/02/06 11:54 AM
Joined: Feb 2006
Posts: 95
B
blk Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Feb 2006
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-
Re: Announce Power #141427 09/02/06 04:10 PM
Joined: May 2005
Posts: 449
bwr30060 Offline
Fjord artisan
Offline
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.
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! }
 

Re: Announce Power #141428 09/02/06 04:22 PM
Joined: Feb 2006
Posts: 95
B
blk Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Feb 2006
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-
Re: Announce Power #141429 09/02/06 04:51 PM
Joined: May 2005
Posts: 449
bwr30060 Offline
Fjord artisan
Offline
Fjord artisan
Joined: May 2005
Posts: 449
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! } 

Re: Announce Power #141430 09/02/06 05:37 PM
Joined: Nov 2004
Posts: 800
Jigsy Offline
Hoopy frood
Offline
Hoopy frood
Joined: Nov 2004
Posts: 800
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 } }


What do you do at the end of the world? Are you busy? Will you save us?
Re: Announce Power #141431 09/02/06 07:22 PM
Joined: Aug 2005
Posts: 525
S
schaefer31 Offline
Fjord artisan
Offline
Fjord artisan
S
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.

Re: Announce Power #141432 09/02/06 09:19 PM
Joined: Nov 2004
Posts: 800
Jigsy Offline
Hoopy frood
Offline
Hoopy frood
Joined: Nov 2004
Posts: 800
Simple typo :x

and I can't edit the post now smirk

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?
Re: Announce Power #141433 09/02/06 09:22 PM
Joined: Feb 2006
Posts: 95
B
blk Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Feb 2006
Posts: 95
Ok, sweet....


-blk-