mIRC Home    About    Download    Register    News    Help

Print Thread
#172285 08/03/07 11:51 AM
Joined: Oct 2006
Posts: 82
B
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 82
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.


Never ASSUME!!!

As it often makes and ASS out of U and ME!!
BritishGent #172287 08/03/07 12:42 PM
Joined: Nov 2005
Posts: 105
D
Vogon poet
Offline
Vogon poet
D
Joined: Nov 2005
Posts: 105
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
Joined: Oct 2006
Posts: 82
B
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 82
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.

Never ASSUME!!!

As it often makes and ASS out of U and ME!!
BritishGent #172315 08/03/07 09:51 PM
Joined: Nov 2005
Posts: 105
D
Vogon poet
Offline
Vogon poet
D
Joined: Nov 2005
Posts: 105
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,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net
BritishGent #172405 09/03/07 05:15 PM
Joined: Oct 2006
Posts: 342
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Oct 2006
Posts: 342
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


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


Invision Support
#Invision on irc.irchighway.net
Riamus2 #172425 10/03/07 12:23 AM
Joined: Oct 2006
Posts: 342
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Oct 2006
Posts: 342
yes i only copied it so it'll be clear


learn learn learn

Link Copied to Clipboard