Top

Op bot


mIRC Code
+ 3 likes
Please Register to submit score.
Bookmark and Share
Average Score  4.0 (of 2 scores)
Date Added  Sep 27, 2009
Last Updated  Sep 27, 2009
Tags  bot  op 

Introduction

Ok this is really my first script and I haven't seen one this elaborate on hawkee.

it is an op bot basically.

For IRC services

Grab the Code

on *:TEXT:!own *:#: { if ($nick isop $chan) { mode $chan +q $2 } 
  ELSE { notice $nick  Sorry you cannot access this command only ops can use it.
  }      
}
on *:TEXT:!unown *:#: { if ($nick isop $chan) { mode $chan -q $2 } 
  ELSE { notice $nick  Sorry you cannot access this command only ops can use it.
  }      
}
on *:TEXT:!topic *:#: { if ($nick isop $chan) {  /cs topic $chan $2- }
  else { notice $nick Sorry you cannot access this command because you are not a op. }
}
 
on *:TEXT:!op *:#: { if ($nick isop $chan) { mode $chan +o $2 } 
  ELSE { notice $nick  Sorry you cannot access this command only ops can use it.
  }      
}
 
on *:TEXT:!deop *:#: { if ($nick isop $chan) { mode $chan -o $2 } 
  ELSE { notice $nick Sorry you cannot access this command because you are not a op.
  }      
}
 
on *:TEXT:!voice *:#: { if ($nick ishop $chan || $nick isop $chan) { mode $chan +v $2 } 
  ELSE { notice $nick Sorry you cannot access this command because you are not a op or halfop.  
  }      
}
on *:TEXT:!devoice *:#: { if ($nick ishop $chan || $nick isop $chan) { mode $chan -v $2 } 
  ELSE { notice $nick Sorry you cannot access this command because you are not a op or halfop. 
  }
}
on *:TEXT:!hop *:#: { if ($nick isop $chan) { mode $chan +h $2 } 
  ELSE { notice $nick  Sorry you cannot access this command because you are not a op.
  }      
}
on *:TEXT:!dehop *:#: { if ($nick isop $chan) { mode $chan -h $2 } 
  ELSE { notice $nick  Sorry you cannot access this command because you are not a op.
  }      
}
on *:TEXT:!ban *:#: { 
  if ($nick ishop $chan || $nick isop $chan) { mode $chan +b $address($2,2) $2 
    elseif ($nick !isop $chan) { notice $nick  Sorry you do not have access to this command ops and halfops only. }
  }
}
on *:TEXT:!unban *:#: { 
  if ($nick ishop $chan || $nick isop $chan) { mode $chan -b $address($2,2) $2 
    elseif ($nick !isop $chan) { notice $nick  Sorry you do not have access to this command ops and halfops only. }
  }
}
on *:TEXT:!sop *:#: { if ($nick isop $chan) { mode $chan +a $2 } 
  ELSE { notice $nick  Sorry you cannot access this command only ops can use it.
  }      
}
on *:TEXT:!desop *:#: { if ($nick isop $chan) { mode $chan -a $2 } 
  ELSE { notice $nick  Sorry you cannot access this command only ops can use it.
  }      
}
on *:TEXT:!aop *:#: { if ($nick isop $chan) { /cs aop $chan add $$2 } 
  ELSE { notice $nick  Sorry you cannot access this command only ops can use it.
  }      
}
on *:TEXT:!asop *:#: { if ($nick isop $chan) { /cs sop $chan add $$2 } 
  ELSE { notice $nick  Sorry you cannot access this command only ops can use it.
  }      
}
on *:TEXT:!ahop *:#: { if ($nick isop $chan) { /cs hop $chan add $$2 } 
  ELSE { notice $nick  Sorry you cannot access this command only ops can use it.
  }      
}
on *:TEXT:!protect *:#: { if ($nick isop $chan) { /cs protect $chan $$2 } 
  ELSE { notice $nick  Sorry you cannot access this command only ops can use it.
  }      
}
on *:TEXT:!deprotect *:#: { if ($nick isop $chan) { /cs deprotect $chan $$2 } 
  ELSE { notice $nick  Sorry you cannot access this command only ops can use it.
  }      
}
on *:TEXT:!deaop *:#: { if ($nick isop $chan) { /cs aop $chan del $$2 } 
  ELSE { notice $nick  Sorry you cannot access this command only ops can use it.
  }      
}
on *:TEXT:!deasop *:#: { if ($nick isop $chan) { /cs sop $chan del $$2 } 
  ELSE { notice $nick  Sorry you cannot access this command only ops can use it.
  }      
}
 

Comments

  (11)  RSS
Cracker200
Comments: 258
 
mIRC Snippet:  Op bot
Posted on Sep 27, 2009 3:44 pm
Nice =) I like it ;)
Vesperia
Comments: 26
 
mIRC Snippet:  Op bot
Posted on Sep 27, 2009 3:51 pm
Good snippet. Very useful.
MackBot
Comments: 4
 
mIRC Snippet:  Op bot
Posted on Sep 27, 2009 3:53 pm
Thanks.

I couldn't find one like it on hawkee and it pissed me off so I hat to write my own.
Cracker200
Comments: 258
 
mIRC Snippet:  Op bot
Posted on Sep 27, 2009 3:54 pm
LOL Nice :D
Jethro_
Comments: 438
 
mIRC Snippet:  Op bot
Posted on Sep 27, 2009 4:03 pm
From a good perspective in scripting, this script is redundant. And this sort of script has been done many, many times. Since the author suggests this is his first time, I'll withdraw my further critics.
Cracker200
Comments: 258
 
mIRC Snippet:  Op bot
Posted on Sep 27, 2009 5:15 pm
o.O
russjr08
Comments: 3
 
mIRC Snippet:  Op bot
Posted on Sep 27, 2009 7:41 pm
Nice Code
Hint on WyldRyde you can already hire a bot like this but cant change its name so this is really useful
Jethro_
Comments: 438
 
mIRC Snippet:  Op bot
Posted on Sep 28, 2009 12:14 am
I realize I should've put my two cents in. You really don't need to add if $nick isop $chan in every line and one text event per trigger. One is really enough:
Code:
on *:TEXT:*:#: {
  tokenize 32 $strip($1-)
  if ($nick !isop $chan) && ($istok($commands,$1-,32)) {
    notice $nick Access denied. Only Ops can use it.
  }
  if ($1 == !own) { mode $chan +q $2 }
  if ($1 == !unown) { mode $chan -q $2 }
  if ($1 == !topic) { cs topic $chan $2- }
  if ($1 == !op) { mode $chan +o $2 }
  .....
  so on and so forth...
}
alias -l commands { return !own !unown !topic !op }
if $nick !isop $chan tells mirc if the nick is not an op.
Gage
Comments: 16
 
mIRC Snippet:  Op bot
Posted on Sep 28, 2009 3:59 pm
It works good thanks :D
napa182
Comments: 1,455
 
mIRC Snippet:  Op bot
Posted on Sep 29, 2009 2:22 pm
i concur with Jethro_ as well as some flood control or else /timer 0 1 !op balh
Astaroth
Comments: 12
 
mIRC Snippet:  Op bot
Posted on Sep 30, 2009 2:20 am
w00f

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom