mIRC Homepage
Posted By: BritishGent Auto De-Op - 08/03/07 11:51 AM
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.
Posted By: drc4 Re: Auto De-Op - 08/03/07 12:42 PM
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
  }
}
Posted By: BritishGent Re: Auto De-Op - 08/03/07 02:00 PM
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
  }
}
Posted By: drc4 Re: Auto De-Op - 08/03/07 09:51 PM
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.
Posted By: Riamus2 Re: Auto De-Op - 08/03/07 10:37 PM
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.
Posted By: learn3r Re: Auto De-Op - 09/03/07 05:15 PM
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
Posted By: Riamus2 Re: Auto De-Op - 09/03/07 07:09 PM
You just did as well, unless you were quoting what he had originally.
Posted By: learn3r Re: Auto De-Op - 10/03/07 12:23 AM
yes i only copied it so it'll be clear
© mIRC Discussion Forums