Auto OP/Voice/HalfOP Bot

By HRaZoR on Nov 27, 2005

This is a simple Auto Op/Voice/HalfOP Bot, just change #Chan to your desired Channel. Commands are,
!aop NICKNAMEHERE (Auto OP)
!aov NICKNAMEHERE (Auto Voice)
!aoh NICKNAMEHERE (Auto HalfOP)
!delaop NICKNAMEHERE (Deletes NICKNAME from Auto Op List)
!delaov NICKNAMEHERE (Deletes NICKNAME from Auto Voice List)
!delaoh NICKNAMEHERE (Deletes NICKNAME from Auto HalfOP List)
You must be OP for the commands to operate, Enjoy.

on 1:TEXT:!aop*:#Chan:{
  if ($nick !isop #Chan) { msg $chan Command Ignored (Must be OP) }
  else { writeini aop.ini $2 aop $address($2,2) | msg $chan Added $2 to Auto Op List }
}
on 1:TEXT:!aov*:#Chan:{
  if ($nick !isop #Chan) { msg $chan Command Ignored (Must be OP) }
  else { writeini aov.ini $2 aov $address($2,2) | msg $chan Added $2 to Auto Voice List }
}
on 1:TEXT:!aoh*:#Chan:{
  if ($nick !isop #Chan) { msg $chan Command Ignored (Must be OP) }
  else { writeini aoh.ini $2 aoh $address($2,2) | msg $chan Added $2 to Auto Half-OP List }
}
on 1:JOIN:#Chan:{
  if ($readini(aop.ini,$nick,aop) == $address($nick,2)) { mode $chan +o $nick }
  if ($readini(aov.ini,$nick,aov) == $address($nick,2)) { mode $chan +v $nick }
  if ($readini(aoh.ini,$nick,aoh) == $address($nick,2)) { mode $chan +h $nick }
}
on 1:TEXT:!delaop*:#Chan:{
  if ($nick !isop #Chan) { msg $chan Command ignored (Must be OP) }
  else { remini aop.ini $2 | msg $chan Removed $2 From Auto Op List }
}
on 1:TEXT:!delaov*:#Chan:{
  if ($nick !isop #Chan) { msg $chan Command ignored (Must be OP) }
  else { remini aov.ini $2 | msg $chan Removed $2 From Auto Voice List }
}
on 1:TEXT:!delaoh*:#Chan:{
  if ($nick !isop #Chan) { msg $chan Command ignored (Must be OP) }
  else { remini aoh.ini $2 | msg $chan Removed $2 From Auto Half-OP List }
}

Comments

Sign in to comment.
DarkTan   -  Jan 24, 2009

I cannot get the script to work at all

 Respond  
Moose   -  Dec 04, 2005

two little notes. About your on text events, It\'s nice to let the user know they don\'t have access to the commands, however if a user with an attitude abuses this they have a chance of flooding off the client, You might want to consider adding some type of protection for this. Also you should try and string your on text events into one event. Other then that, GJ :)

 Respond  
nark0tics   -  Nov 28, 2005

before the \"if ($1 == !\" put two (2) spaces on each line.

 Respond  
nark0tics   -  Nov 28, 2005

intresting way of coding the on join event. but you can simplify your code.
on :text:#:!: {
if ($1 == !aoh) { ;put what the command does in this area and close with a bracket.
if ($1 == !aop) {
if ($1 == !aov) {
if ($1 == !delaop) {
if ($1 == !delaov) {
if ($1 == !delaoh) {
}
then your on text event can go down here.

 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.