|
|
|
Joined: Oct 2005
Posts: 3
Self-satisified door
|
OP
Self-satisified door
Joined: Oct 2005
Posts: 3 |
I need a very simple bot script for it to Aop,Sop,Voice,Kick,Ban, and to reconize the nick that are ban that come in under a different nick or isp.I can't read script very well. central@cox.net
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
on me:*:join:#:{
.msg chanserv identify $chan <password>
}
alias op {
var %channels = $comchan($1,0)
while %channels {
if ($1 !isop $comchan($1,%channels)) { .msg $nick Insufficient authorization }
else {
set %nicks $replace($3-,$chr(44),$chr(32))
while %nicks {
.msg chanserv $2 $comchan($1,%channels) add $gettok(%nicks,1,32)
set %nicks $remtok(%nicks,$gettok(%nicks,1,32),1,32)
}
dec %channels
}
}
}
on $*:text:/![sa]op /i:*:{
op $nick $right($1,-1) $replace($2-,$chr(44),$chr(32))
}
on *:text:!*:*:{
if ($1 == !kick || $1 == !ban) {
var %channels = $comchan($nick,0)
while %channels {
var %nick = $numtok($2-,32)
while (%nick) {
if ($gettok($2-,%nick,32) ison $comchan($nick,%channels)) && ($me isop $comchan($nick,%channels)) && ($nick isop $comchan($nick,%channels)) {
ban -k $+ $iif($1 == !kick,u) $chan $gettok($2-,%nick,32) 3
}
dec %nick
}
dec %channels
}
}
elseif ($1 == !voice) {
var %channels = $comchan($nick,0)
while %channels {
var %nick = $numtok($2-,32)
while (%nick) {
if ($gettok($2-,%nick,32) ison $comchan($nick,%channels)) && ($me isop $comchan($nick,%channels)) {
set %voicenick $addtok(%voicenick,$gettok($2-,%nick,32),32)
if $numtok(%voicenick,32) == $modespl {
.mode $+(+,$str(v,$modespl)) %voicenick
unset %voicenick
}
}
dec %nick
}
if %voicenick {
.mode $+(+,$str(v,$modespl)) %voicenick
unset %voicenick
}
dec %channels
}
}
}
There's no way to know for sure if someone is trying to avoid a ban. Bans on nicks, idents, and/or hosts can be done, but any or all of these can be changed, and the only way to handle all possibilities would end up banning everyone from the channel...yourself included The above code is an amalgamation of codes that I already use, but has not been tested as shown above. Note: for the SOP & AOP options to work properly, the bot must have Founder level access (ie: identified to chanserv for the channel)
|
|
|
|
Joined: Oct 2005
Posts: 3
Self-satisified door
|
OP
Self-satisified door
Joined: Oct 2005
Posts: 3 |
Where or how do I add the nicks and who to what like Bree to aop or David to voice and so on?
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
on me:*:join:#:{
.msg chanserv identify $chan <password>
}
alias op {
var %channels = $comchan($1,0)
while %channels {
if ($1 !isop $comchan($1,%channels)) {
.msg $nick Insufficient authorization
}
else {
set %nicks $replace($3-,$chr(44),$chr(32))
while %nicks {
.msg chanserv $2 $comchan($1,%channels) add $gettok(%nicks,1,32)
if ($me isop $comchan($1,%channels)) {
set %opnick $addtok(%opnick,$gettok(%nicks,1,32),32)
if $numtok(%opnick,32) == $modespl {
.mode $comchan($1,%channels) $+(+,$str(o,$modespl)) %opnick
unset %opnick
}
set %nicks $remtok(%nicks,$gettok(%icks,1,32),1,32)
}
if (%opnick) {
.mode $comchan($1,%channels) $+(+,$str(o,$modespl)) %opnick
unset %opnick
}
dec %channels
}
}
}
on $*:text:/![sa]op* /i:*:{
op $nick $right($1,-1) $replace($2-,$chr(44),$chr(32))
}
on *:text:!*:*:{
if ($1 == !kick || $1 == !ban) {
var %channels = $comchan($nick,0)
while %channels {
var %nick = $numtok($2-,32)
while (%nick) {
if ($gettok($2-,%nick,32) ison $comchan($nick,%channels)) && ($me isop $comchan($nick,%channels)) && ($nick isop $comchan($nick,%channels)) {
ban -k $+ $iif($1 == !kick,u) $chan $gettok($2-,%nick,32) 3
}
dec %nick
}
dec %channels
}
}
elseif ($1 == !voice) {
var %channels = $comchan($nick,0)
while %channels {
var %nick = $numtok($2-,32)
while (%nick) {
if ($gettok($2-,%nick,32) ison $comchan($nick,%channels)) && ($me isop $comchan($nick,%channels)) {
set %voicenick $addtok(%voicenick,$gettok($2-,%nick,32),32)
if $numtok(%voicenick,32) == $modespl {
.mode $+(+,$str(v,$modespl)) %voicenick
unset %voicenick
}
}
dec %nick
}
if %voicenick {
.mode $+(+,$str(v,$modespl)) %voicenick
unset %voicenick
}
dec %channels
}
}
}
To add nicks use the appropriate command as listed here: !voice <nick(s)> !aop <nick(s)> !sop <nick(s)> !kick <nick(s)> !ban <nick(s)> Those can be used in the channel just like that, or in a pm to the bot. Please note that commands used are effective for all channels that are common to the person issuing the command, the bot, and the person/people that the command is affecting Noticed a mistake in my original code. It has been repaired in the above code. In all cases the person issuing the command must be opped in the channel(s) that it is effective in.
|
|
|
|
Joined: Oct 2005
Posts: 3
Self-satisified door
|
OP
Self-satisified door
Joined: Oct 2005
Posts: 3 |
I cant get it to work. I copy it and all I did on the first line next to # I put the chan name. On the second line where it said password I rplace it with my password without the <>. What am Im doing wrong?
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
You do realize that you have to put this on a different copy of mIRC. You can't put this code on your version of mIRC and have you be able to use the commands. Since the code uses ON TEXT events, the following quote from the help file is applicable Note: You can't test out these events by typing text to yourself. They can only be initiated by someone else saying something in a channel or in a private message.
|
|
|
|
|
|
|
|