mIRC Home    About    Download    Register    News    Help

Print Thread
#172285 08/03/07 11:51 AM
B
BritishGent
BritishGent
B
Hi there...... smile

I am wondering if i could edit the following script to auto de-op myself on my channel after a time period of lets say 2 minutes.

Code:
on *:voice:#:{
  if $nick == ^Merlin && $vnick == $me {
    .mode $chan -v $me
  }
}


for example would i be able to use the -u switch in it somewhere as when i use this:
Code:
on *:op:#:{
  if $nick == ^Merlin && $vnick == $me {
    .mode $chan -o $me
  }
}

it generally de-ops me before it de-voices me thus making the de-voice script useless.

many thanks in advance.

#172287 08/03/07 12:42 PM
Joined: Nov 2005
Posts: 104
D
Vogon poet
Offline
Vogon poet
D
Joined: Nov 2005
Posts: 104
you could always use a timer. If you want to deop yourself, after 2 minutes has passed by since ^Merlin oped you, you could use something like
Code:
 
on *:op:#:{
  if (($nick == ^Merlin) && ($opnick == $me)) {
    timer 1 120 mode $chan -o $me
  }
}

drc4 #172290 08/03/07 02:00 PM
B
BritishGent
BritishGent
B
would it make a difference if it was chanserv opping me and ^Merlin as that does not seem to work.

Thanks for you help, i have edited it too this and it works fine smile

Code:
on *:op:#:{
  if $nick == ChanServ && $opnick == $me {
    timer 1 30 mode $chan -o $me
  }
}

Last edited by BritishGent; 08/03/07 02:02 PM.
#172315 08/03/07 09:51 PM
Joined: Nov 2005
Posts: 104
D
Vogon poet
Offline
Vogon poet
D
Joined: Nov 2005
Posts: 104
Since you are using an if statement with dual statements, you'll have to enclose them with ( ) properly. Copy and paste this into your remotes.
Code:
on *:OP:#:{
  if (($nick == Chanserv) && ($opnick == $me)) {
    timer 1 30 mode $chan -o $me
  }
}

Leave everything as is, and it will work.

drc4 #172324 08/03/07 10:37 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
You don't *have* to use ()'s, but it's preferable to do so. Also, I rarely use internal parentheses in an IF...

if ($nick == Chanserv && $opnick == $me) { }
vs.
if (($nick == Chanserv) && ($opnick == $me)) { }

But that's just my preference.

#172405 09/03/07 05:15 PM
L
learn3r
learn3r
L
Code:
on *:op:#:{
  if $nick == ^Merlin && $vnick == $me {
    .mode $chan -o $me
  }
}


The only thing that didn't worked is coz you used $vnick not $opnick

#172410 09/03/07 07:09 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
You just did as well, unless you were quoting what he had originally.

Riamus2 #172425 10/03/07 12:23 AM
L
learn3r
learn3r
L
yes i only copied it so it'll be clear


Link Copied to Clipboard