mIRC Home    About    Download    Register    News    Help

Print Thread
#129353 05/09/05 02:01 PM
Joined: Sep 2005
Posts: 4
D
DOOJ Offline OP
Self-satisified door
OP Offline
Self-satisified door
D
Joined: Sep 2005
Posts: 4
Hello everyone.

What I want to do is be able to type specialop! and I get devoiced and deop'd.
Can someone tell me how to do that please? Weird I know. smile
Thank you.

#129354 05/09/05 02:35 PM
Joined: Apr 2005
Posts: 53
A
Babel fish
Offline
Babel fish
A
Joined: Apr 2005
Posts: 53
like this:
Code:
on *:text:specialop!:#:{
  if ($nick != YourNick) { halt }
  if ($nick isop $chan) mode $chan -o $nick
  if ($nick isvoice $chan) mode $chan -v $nick
}

just replace YourNick with your real nick on irc :P

#129355 05/09/05 03:53 PM
Joined: Mar 2005
Posts: 18
A
Pikka bird
Offline
Pikka bird
A
Joined: Mar 2005
Posts: 18
According to what he wrote, he wants it to occur when HE types it, which would require on INPUT. At least that is how I read it. In that case, you would do this:

on 1:INPUT:#:{
if ($1 == specialop! && $me isvoice $chan && $me isop $chan) { mode $chan -v $me }
if ($1 == specialop! && $me isop $chan) { mode $chan -o $me }
}

No need to change anything in the code, just type specialop! in any channel you are opped on.

Last edited by adazh; 05/09/05 03:54 PM.
#129356 05/09/05 05:10 PM
Joined: Sep 2005
Posts: 4
D
DOOJ Offline OP
Self-satisified door
OP Offline
Self-satisified door
D
Joined: Sep 2005
Posts: 4
That's exactly what I'm after, thanks adazh.
If I wanted to do the reverse of that by saying another command, do I just edit add to this script with something similar but change the -v and -o to +v and +o so that my script looks like this?

Code:
on 1:INPUT:#:{
if ($1 == specialop! && $me isvoice $chan && $me isop $chan) { mode $chan -v $me }
if ($1 == specialop! && $me isop $chan) { mode $chan -o $me }
}

on 1:INPUT:#:{
if ($1 == op! && $me isvoice $chan && $me isop $chan) { mode $chan +v $me }
if ($1 == op! && $me isop $chan) { mode $chan +o $me }
}

#129357 05/09/05 05:20 PM
Joined: Sep 2005
Posts: 4
D
DOOJ Offline OP
Self-satisified door
OP Offline
Self-satisified door
D
Joined: Sep 2005
Posts: 4
To answer my own question, no.
I don't even know where to start with editing because I don't know anything about it, but I'll give it a go till I get a response.
Thanks.

#129358 05/09/05 05:20 PM
Joined: Mar 2005
Posts: 18
A
Pikka bird
Offline
Pikka bird
A
Joined: Mar 2005
Posts: 18
Unless you are an IRC Operator and you have access to op yourself on a channel, then that would not work. You would need to send an op command to ChanServ or whatever the Channel Management service is (if any).

You could just add to the existing code also.

Example:

on 1:INPUT:#:{
if ($1 == specialop! && $me isvoice $chan && $me isop $chan) { mode $chan -v $me }
if ($1 == specialop! && $me isop $chan) { mode $chan -o $me }
if ($1 == op! && $me !isvoice ) { msg ChanServ voice $chan $me }
if ($1 == op! && $me !isop $chan) { msg ChanServ op $chan $me }
}

You don't seem to understand what it's checking for so I'll explain a bit.

$me isvoice $chan - Checks if you are VOICED on the channel
$me !isvoice $chan - Checks if you are DE-VOICED on the channel
$me isop $chan - Checks if you are OPPED on the channel
$me !isop $chan - Checks if you are DE-OPPED on the channel

#129359 05/09/05 05:37 PM
Joined: Sep 2005
Posts: 4
D
DOOJ Offline OP
Self-satisified door
OP Offline
Self-satisified door
D
Joined: Sep 2005
Posts: 4
I had to delete the line:
if ($1 == op! && $me !isvoice ) { msg ChanServ voice $chan $me }
to make that work, but that is all perfect and it does exactly what I want.

Thank you adazh smile

#129360 05/09/05 05:43 PM
Joined: Mar 2005
Posts: 18
A
Pikka bird
Offline
Pikka bird
A
Joined: Mar 2005
Posts: 18
Sorry about that. Change this line

if ($1 == op! && $me !isvoice ) { msg ChanServ voice $chan $me }

to this:

if ($1 == op! && $me !isvoice $chan) { msg ChanServ voice $chan $me }


Link Copied to Clipboard