Simple Owner/Deowner Script

By Kurama_ on Nov 04, 2008

This is a simple owner/deowner script, I know its not much but its just something that's easy to use and directly to the point. Just put this in your mIRC remotes, type /set %owner (yourname) that way only you can tell your bot to owner or deowner someone. This will only work if your bot is owner (which should be kinda obvious)

on 1:TEXT:'owner*:#: {
  if ($nick == %owner) {
    /mode $chan +q $2
  }
  if ($nick != %owner) {
    /notice $nick 4Acess Denied Noob!! :| 
  }
}
on 1:TEXT:'deowner*:#: {
  if ($nick == %owner) {
    /mode $chan -q $2
  }
  if ($nick != %owner) {
    /notice $nick 4Acess Denied Noob!! :|
  }
}

Comments

Sign in to comment.
chachin   -  Oct 11, 2011

there's a BIG flaw in this Jethro.. anybody can do !up !down and gain +qao :S

 Respond  
chachin   -  Oct 11, 2011

wooow thats a lot of script O_O

 Respond  
VxD aka DEATHJ0KER   -  Oct 11, 2011

on my dialog with dcx dll unless specific identifier $chan($active) does not work

It is redundant in case there are problems with the connection to the server (e.g. netsplit) ... Apart from this problem, do you think it applies the function owner\deowner? the problem and to rejoin (hop) recognize me again owner

 Respond  
Jethro   -  Oct 11, 2011

You shouldn't enclose $active with the $chan() identifier. It's redundant. Just use $chan instead.

 Respond  
VxD aka DEATHJ0KER   -  Oct 11, 2011

How do I get an Owner/Deowner Script using variables in my autoid?
i use...
on *:JOIN:#: {
If (%autoid1 == On) && ($network == %net1) && ($nick == $me) {
if ($chan($active) == $readini($mircdirscripts\autoid\autoid.ini,Chan,chana1)) /msg ChanServ IDENTIFY $chan $readini($mircdirscripts\autoid\autoid.ini,Password,chana1) | /msg chanserv owner
if ($chan($active) == $readini($mircdirscripts\autoid\autoid.ini,Chan,chana2)) /msg ChanServ IDENTIFY $chan $readini($mircdirscripts\autoid\autoid.ini,Password,chana2) | /msg chanserv owner
if ($chan($active) == $readini($mircdirscripts\autoid\autoid.ini,Chan,chana3)) /msg ChanServ IDENTIFY $chan $readini($mircdirscripts\autoid\autoid.ini,Password,chana3) | /msg chanserv owner
if ($chan($active) == $readini($mircdirscripts\autoid\autoid.ini,Chan,chana4)) /msg ChanServ IDENTIFY $chan $readini($mircdirscripts\autoid\autoid.ini,Password,chana4) | /msg chanserv owner
if ($chan($active) == $readini($mircdirscripts\autoid\autoid.ini,Chan,chana5)) /msg ChanServ IDENTIFY $chan $readini($mircdirscripts\autoid\autoid.ini,Password,chana5) | /msg chanserv owner
if ($chan($active) == $readini($mircdirscripts\autoid\autoid.ini,Chan,chana6)) /msg ChanServ IDENTIFY $chan $readini($mircdirscripts\autoid\autoid.ini,Password,chana6) | /msg chanserv owner
if ($chan($active) == $readini($mircdirscripts\autoid\autoid.ini,Chan,chana7)) /msg ChanServ IDENTIFY $chan $readini($mircdirscripts\autoid\autoid.ini,Password,chana7) | /msg chanserv owner
if ($chan($active) == $readini($mircdirscripts\autoid\autoid.ini,Chan,chana8)) /msg ChanServ IDENTIFY $chan $readini($mircdirscripts\autoid\autoid.ini,Password,chana8) | /msg chanserv owner
if ($chan($active) == $readini($mircdirscripts\autoid\autoid.ini,Chan,chana9)) /msg ChanServ IDENTIFY $chan $readini($mircdirscripts\autoid\autoid.ini,Password,chana9) | /msg chanserv owner
if ($chan($active) == $readini($mircdirscripts\autoid\autoid.ini,Chan,chana10)) /msg ChanServ IDENTIFY $chan $readini($mircdirscripts\autoid\autoid.ini,Password,chana10) | /msg chanserv owner
if ($chan($active) == $readini($mircdirscripts\autoid\autoid.ini,Chan,chana11)) /msg ChanServ IDENTIFY $chan $readini($mircdirscripts\autoid\autoid.ini,Password,chana11) | /msg chanserv owner
if ($chan($active) == $readini($mircdirscripts\autoid\autoid.ini,Chan,chana12)) /msg ChanServ IDENTIFY $chan $readini($mircdirscripts\autoid\autoid.ini,Password,chana12) | /msg chanserv owner
if ($chan($active) == $readini($mircdirscripts\autoid\autoid.ini,Chan,chana13)) /msg ChanServ IDENTIFY $chan $readini($mircdirscripts\autoid\autoid.ini,Password,chana13) | /msg chanserv owner
if ($chan($active) == $readini($mircdirscripts\autoid\autoid.ini,Chan,chana14)) /msg ChanServ IDENTIFY $chan $readini($mircdirscripts\autoid\autoid.ini,Password,chana14) | /msg chanserv owner
if ($chan($active) == $readini($mircdirscripts\autoid\autoid.ini,Chan,chana15)) /msg ChanServ IDENTIFY $chan $readini($mircdirscripts\autoid\autoid.ini,Password,chana15) | /msg chanserv owner
}
}

 Respond  
VxD aka DEATHJ0KER   -  Oct 11, 2011

no mine was understood as a question, I wanted to know if i can add my nickname list (which should be authenticated) or a menu popups in which define the name of nick to identify
I would like to connect to the management of ID owner of my script
to the multi channel identification nickname.

I use variables of type %nick1 %nick2... to return the ID during the join in the channel, I'd like to add this function using my existing variables :)

 Respond  
Jethro   -  Oct 10, 2011

Are you teasing me or are you for real, Joker? :/

 Respond  
VxD aka DEATHJ0KER   -  Oct 10, 2011

Jethro a flawless routines :)

wanting to... nick1 nick2 nick3 nick4 nick5 could be replaced by a variable that contains the list of nick
----> var %a = %nick1 %nick2 %nick3 %nick4 %nick5

menu menubar {
Set Nick: .set %nick1 $$?="nick?"
Set Nick: .set %nick2 $$?="nick?"
Set Nick: .set %nick3 $$?="nick?"
Set Nick: .set %nick4 $$?="nick?"
Set Nick: .set %nick5 $$?="nick?"
}

 Respond  
Jethro   -  Oct 10, 2011

I change it to use nickname instead:

on @$*:text:/^!(up|down)( |$)/iS:#:{
  var %m = q a o, %? = $regml(1)
  var %a = nick1 nick2 nick3 nick4 nick5
  if ($istok(%a,$nick,32)) {
    if ($$2 ison #) {
      mode # $+($iif(%? = up,+,-),$&
        $remove(%m,$chr(32))) $str($chr(32) $2,$&
        $numtok(%m,32)) | halt
    }
    .notice $qt($2) is not here!
  }
}

change nick1, nick2, nick3, etc..with their actual nicknames. The command is:

 !up/down NickHere

to set +qao

Be warned though, people can impersonate.

 Respond  
chachin   -  Oct 10, 2011

kk i've done that copy/pasted the host to the "var %a = " line and added it there. i save it and everything and i dont get a responce :( or errors

 Respond  
Jethro   -  Oct 10, 2011

chachin, enter this in the active channel:

//echo -a $address(User_Name_Here,2)

the echo print is the one you should place in the code. Change "User_Name_Here" with the real nicknames.

 Respond  
chachin   -  Oct 10, 2011

k i addedmy address or nick vhost and it doesnt do nothing at all... no errors :( i hatemy bot >:

 Respond  
VxD aka DEATHJ0KER   -  Oct 10, 2011

sure ... There are many factors to consider in the syntax.
but a shortcut that invokes the NickSelf on change nick
could solve the identification without typing anything
I'm lazy and I don't want to write LoL

 Respond  
Jethro   -  Oct 10, 2011

No, it's not, Joker. If someone sets +Q mode (with uppercase q) your example will trigger. You need to use the case sensitive version of

isincs

Just use

if ($chan)

rather than ($active == #)

If you want to make a comparison between active channel and PM. You can do:

if (!$chan) {

with a ! to indicate that it is not a channel.

 Respond  
VxD aka DEATHJ0KER   -  Oct 10, 2011

if (+q isin $1) && ($active == #) It might be useful?

 Respond  
Jethro   -  Oct 10, 2011

chachin, here you go:

on @$*:text:/^!(up|down)( |$)/iS:#:{ 
  var %m = q a o, %? = $regml(1)
  var %a = *!*@host1 *!*@host2 *!*@host3 *!*@host4
  if ($istok(%a,$wildsite,32)) {
    if ($$2 ison #) {
      mode # $+($iif(%? = up,+,-),$&
        $remove(%m,$chr(32))) $str($chr(32) $2,$&
        $numtok(%m,32)) | halt
    }
    .notice $qt($2) is not here!
  }
}

Replace !@host1, !@host2 etc...with the ones' actual hosts.

 Respond  
chachin   -  Oct 10, 2011

is it possible to make one that you can do !up !down and it'll give you +qao or -qao? and make it so multiple users can do it? but only the ones YOU add to the bot.

 Respond  
trill   -  Nov 04, 2008

nice

 Respond  
Blitzjager   -  Nov 04, 2008

Good job on your SIMPLE Owner/Deowner Script.
Stop napaing things plz.

Might want to look into an on load event so that you don't have to set %owner yourself(Still would but meh...)
I'd also change the $nicks to $address

 Respond  
napa182   -  Nov 04, 2008

or you can do it like this if you dont want to use a bot

on *:input:*:{ if ($regex($1,/^[+-][qaovh]$/)) { mode # $1 $iif(!$2,$nick,$2) } }
 Respond  
Viper01   -  Nov 04, 2008

or if you're on your bot, you could just do:

menu Nicklist {
Owner:/mode # +q $$1
Deowner:/mode # -q $$1
}
 Respond  
napa182   -  Nov 04, 2008

you could do something like this, that way you can use all the modes

on $*:text:/^([+-][qaohv])/Si:#:{ if ($nick == %owner) { mode # $1 $iif(!$2,$str($nick $chr(32),5),$str($2 $chr(32),5)) } | else { .notice $nick Piss off } }
 Respond  
guest598594   -  Nov 04, 2008
  if ($nick == %owner) {
    /mode $chan -q $2
  }
  if ($nick != %owner) {
    /notice $nick 4Acess Denied Noob!! :|
  }

After the first if, you can just use else.

if ($nick == %owner) {
  ;he's the owner
}
else {
  ;he's not the owner
}
 Respond  
Kurama_   -  Nov 04, 2008

Rate please!

 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.