Auto op on deop

By DJ^Aaron on May 15, 2007

I am new here heh i am presenting this small snippet to see if catches your attention. My snippet is for Undernet to use with X, when you get deoped you send a auto message to X to have op Back :) Engoy

on 1:deop:#: {
  if ($nick == $me) { halt }
  if ($opnick == $me) && ($nick != $me) && (X isin #) { .msg x op #
  }

Comments

Sign in to comment.
EL   -  Oct 03, 2008

Bullet_Dodger please dont post codes that are screwed up as help

ROFL wtf smh.`-.-´

 Respond  
napa182   -  Oct 03, 2008

Bullet_Dodger please dont post codes that are screwed up as help

on !*:DEOP:#: { if ($opnick == $me) { .cs op # $me } }
on !*:DEOP:#: { if ($opnick == $me && X ison #) { .msg X op # $me } }

@ Basillisk
the ! in the on Halts it from +o'ing you if you demode ur self so no need for a halt line within the code.

 Respond  
Bullet_Dodger   -  Oct 03, 2008

You could use

on 1:deop:#: {
  if ($nick == $me) { halt }
  if ($opnick == $me) && ($nick != $me) && (X isin #) { .msg x op #
  }
on 1:deprotect:#: {
  if ($nick == $me) { halt }
  if ($protectnick == $me) && ($nick != $me) && (X isin #) { .msg x protect #
  }
on 1:dehalfop:#: {
  if ($nick == $me) { halt }
  if ($halfopnick == $me) && ($nick != $me) && (X isin #) { .msg x halfop #
  }
 Respond  
Basillisk   -  Oct 03, 2008

well, if you wanted to deop yourself, you wouldnt want it to op you again. so you halt it if you do it yourself

 Respond  
cantseeme   -  May 20, 2007

firstly, you forgot to add the end bracket, secondly, why not something like:
on !*:DEOP:#: {
if ($opnick == $me) { cs op $chan yournick }
}
Here is what I fixed:
1) you didnt have an end bracket
2) you halted the script if it was you deoping yourself, but in your if statement you checked again
3) if x is a network service mirc will not know it is on the channel (unrealircd3.2 and anope)
4) lol.

 Respond  
CharltonJ   -  May 16, 2007

good kugin eh. lol

 Respond  
|MELIORITE|   -  May 16, 2007

OK... reconsidered ... $opnick is fine but the ($nick != $me) is unnecesary because the first line already tells the script to halt if $me is doing the deop.

 Respond  
|MELIORITE|   -  May 15, 2007

I think the opening would be better as:

on @*:deop:#:

I think the line:

if ($opnick == $me) && ($nick != $me) && (X isin #) { .msg x op # }

is meant to be:

if($deopnick == $me) && ($nick != $me)...

On message, X might also like to know who to op.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.