Auto Op From ini file

By chicknh8r on Jan 23, 2006

To Use this snippet, you will first;

  1. Have to have a ini file named "auto_ops"
  2. Within this ini file, add this text each by itself to a line separated by a couple lines from eachother:
    [voice], [hop], [op], [admin], [owner].
    I put a couple line spaces between each since this is where the info is going to be written when you add nicks to your auto ops list.
    Here is example how it should look in the ini file;
[voice]

[hop]

[op]

[admin]

[owner]

Simply copy and paste the below code to your bots remote, "alt R",
and your ready to go. Again, this will ONLY work if you have an ini file in your bots mirc folder labled "auto_ops".

on *:join:# {
if ($readini(auto_ops.ini,Owner,$nick) == $address($nick,5)) { mode $chan +vhoaq $nick $nick $nick $nick $nick }
if ($readini(auto_ops.ini,Admin,$nick) == $address($nick,5)) { mode $chan +vhoa $nick $nick $nick $nick }
if ($readini(auto_ops.ini,FullOp,$nick) == $address($nick,5)) { mode $chan +vho $nick $nick $nick }
if ($readini(auto_ops.ini,HalfOp,$nick) == $address($nick,5)) { mode $chan +vh $nick $nick }
if ($readini(auto_ops.ini,Voice,$nick) == $address($nick,5)) { mode $chan +v $nick }
}

on :text::: {
if ($1 ==
login) {
whois $nick
if ($readini(auto_ops.ini,Owner,$nick) == $address($nick,5)) { mode $chan +vhoaq $nick $nick $nick $nick $nick | msg $chan $nick is now logged in with Owner Access }
if ($readini(auto_ops.ini,Admin,$nick) == $address($nick,5)) { mode $chan +vhoa $nick $nick $nick $nick | msg $chan $nick is now logged in with Admin Access }
if ($readini(auto_ops.ini,FullOp,$nick) == $address($nick,5)) { mode $chan +vho $nick $nick $nick | msg $chan $nick is now logged in with Full Op Access }
if ($readini(auto_ops.ini,HalfOp,$nick) == $address($nick,5)) { mode $chan +vh $nick $nick | msg $chan $nick is now logged in with Half Op Access }
if ($readini(auto_ops.ini,Voice,$nick) == $address($nick,5)) { mode $chan +v $nick }
}
if ($1 == logout) {
if ($readini(auto_ops.ini,Owner,$nick) == $address($nick,5)) { mode $chan -vhoaq $nick $nick $nick $nick $nick | msg $chan $nick is now logged out }
if ($readini(auto_ops.ini,Admin,$nick) == $address($nick,5)) { mode $chan -vhoa $nick $nick $nick $nick | msg $chan $nick is now logged out }
if ($readini(auto_ops.ini,FullOp,$nick) == $address($nick,5)) { mode $chan -vho $nick $nick $nick | msg $chan $nick is now logged out }
if ($readini(auto_ops.ini,HalfOp,$nick) == $address($nick,5)) { mode $chan -vh $nick $nick | msg $chan $nick is now logged out }
if ($readini(auto_ops.ini,Voice,$nick) == $address($nick,5)) { mode $chan -v $nick }
}
if ($nick == ) {
if ($1 ==
flin) {
if ($readini(auto_ops.ini,Owner,$$2) == $address($$2,5)) { mode $chan +vhoaq $$2 $$2 $$2 $$2 $$2 | msg $chan $nick Forced Logged-In $2 }
if ($readini(auto_ops.ini,Admin,$$2) == $address($$2,5)) { mode $chan +vhoa $$2 $$2 $$2 $$2 | msg $chan $nick Forced Logged-In $2 }
if ($readini(auto_ops.ini,FullOp,$$2) == $address($$2,5)) { mode $chan +vho $$2 $$2 $$2 | msg $chan $nick Forced Logged-In $2 }
if ($readini(auto_ops.ini,HalfOp,$$2) == $address($$2,5)) { mode $chan +vh $$2 $$2 | msg $chan $nick Forced Logged-In $2 }
if ($readini(auto_ops.ini,Voice,$$2) == $address($$2,5)) { mode $chan +v $$2 | msg $chan $nick Forced Logged-In $2 }
}
if ($1 == flout) {
if ($readini(auto_ops.ini,Owner,$$2) == $address($$2,5)) { mode $chan -vhoaq $$2 $$2 $$2 $$2 $$2 | msg $chan $nick Forced Logged-Out $2 }
if ($readini(auto_ops.ini,Admin,$$2) == $address($$2,5)) { mode $chan -vhoa $$2 $$2 $$2 $$2 | msg $chan $nick Forced Logged-Out $2 }
if ($readini(auto_ops.ini,FullOp,$$2) == $address($$2,5)) { mode $chan -vho $$2 $$2 $$2 | msg $chan $nick Forced Logged-Out $2 }
if ($readini(auto_ops.ini,HalfOp,$$2) == $address($$2,5)) { mode $chan -vh $$2 $$2 | msg $chan $nick Forced Logged-Out $2 }
if ($readini(auto_ops.ini,Voice,$$2) == $address($$2,5)) { mode $chan -v $$2 | msg $chan $nick Forced Logged-Out $2 }
}
if ($1 ===
add) {
if ($2 === voice) { whois $3 | writeini -n auto_ops.ini Voice $$3 $address($$3,5) | msg $chan Added $3 To Auto-Voice List | halt }
if ($2 === hop) { whois $3 | writeini -n auto_ops.ini HalfOp $$3 $address($$3,5) | msg $chan Added $3 To Auto-Hop List | halt }
if ($2 === op) { whois #3 | writeini -n auto_ops.ini FullOp $$3 $address($$3,5) | msg $chan Added $3 To Auto-Op List | halt }
if ($2 === admin) { whois $3 | writeini -n auto_ops.ini Admin $$3 $address($$3,5) | msg $chan Added $3 To Auto-Admin List | halt }
if ($2 === owner) { whois $3 | writeini -n auto_ops.ini Owner $$3 $address($$3,5) | msg $chan Added $3 To Auto-Owner List | halt }
}
if ($1 === rem) {
set -u10 %remnick $$2
remini auto_ops.ini Voice %remnick | remini auto_ops.ini HalfOp %remnickmsg | remini auto_ops.ini FullOp %remnick | remini auto_ops.ini Admin %remnickmsg | remini auto_ops.ini Owner %remnick | msg $chan Successfully Removed %remnick | halt
}
if ($1 ==
status) {
if ($2 isin $readini(auto_ops.ini,Voice,$$2)) { msg $chan $2 Is Currently In Auto-Voice List | halt }
if ($2 isin $readini(auto_ops.ini,HalfOp,$$2)) { msg $chan $2 Is Currently In Auto-Hop List | halt }
if ($2 isin $readini(auto_ops.ini,FullOp,$$2)) { msg $chan $2 Is Currently In Auto-Op List | halt }
if ($2 isin $readini(auto_ops.ini,Admin,$$2)) { msg $chan $2 Is Currently In Auto-Admin List | halt }
if ($2 isin $readini(auto_ops.ini,Owner,$$2)) { msg $chan $2 Is Currently In Auto-Owner List | halt }
else { msg $chan $2 Isn't In Auto-Ops List | halt }
}
}
}

menu channel,nicklist {
Auto Ops
.[Add] $$1
..Voice: { whois $$1 | writeini auto_ops.ini voice $$1 $address($$1,5) | echo -a Added $$1 To Auto Voice List }
..Hop: { whois $$1 | writeini auto_ops.ini hop $$1 $address($$1,5) | echo -a Added $$1 To Auto Hop List }
..Op: { whois $$1 | writeini auto_ops.ini op $$1 $address($$1,5) | echo -a Added $$1 To Auto Op List }
..Admin: { whois $$1 | writeini auto_ops.ini admin $$1 $address($$1,5) | echo -a Added $$1 To Auto Admin List }
..Owner: { whois $$1 | writeini auto_ops.ini owner $$1 $address($$1,5) | echo -a Added $$1 To Auto Owner List }
.[Rem] $$1
..Remove Ops: { remini auto_ops.ini voice $$1 | remini auto_ops.ini hop $$1 | remini auto_ops.ini op $$1 | remini auto_ops.ini admin $$1 | remini auto_ops.ini owner $$1 | echo -a $$1 Successfully Removed From Auto Ops Lists }
}

Comments

Sign in to comment.
Pangaea   -  Jul 12, 2007

dose not work at all, sorry

 Respond  
sean   -  May 24, 2006

mirc has a built in aop feature ;T

 Respond  
Bigmomma   -  May 24, 2006

stupid


 thingy\'s
 Respond  
Bigmomma   -  May 24, 2006
on *:join:# 

Just make that

on *:join:#yourchan {
 Respond  
kambodianboi   -  Apr 06, 2006

Great script, but is it possible to make it for a certain channel, because it ops/voice the same person for all the channels I have. But its a really good script.

 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.