Professional Protect bot.

Do you have script in mind but no ability to make it, type in what it should do, and you might be lucky.

Professional Protect bot.

Postby Lymmel » Wed Jun 18, 2008 8:03 pm

Hi.

I need a protect bot with this cmds etc etc.


$adduser op/master/owner
$deluser
$op
$voice
$deop
$devoice
$ban
$unban
$protect on
etc... etc...

I like to have a protect bot like .. ehm.. pwnd-bots?

// Lymmel

http://www.pwnd-bots.eu/viewpage.php?page_id=23 This Cmds etc.. :mrgreen:


PS. WITH a nice Anti-Takeover script!:) :geek:
Lymmel
 

Re: Professional Protect bot.

Postby Lukemob » Fri Jun 20, 2008 7:34 pm

Ehm, Hello man. As I've coded a TCL PRO script recently, I know how much time does it take. It's not really easy to find a time to code the whole script like that. Anyway, I'm sure... if you will search on the internet, you will find. Even if you wouldn't find it, I will try find it for you.
Lukemob
 

Re: Professional Protect bot.

Postby SilverRain » Fri Jun 20, 2008 8:40 pm

I'm going to be very nice and code you one. You must keep my name in it at all times.
SilverRain
 

Re: Professional Protect bot.

Postby SilverRain » Fri Jun 20, 2008 9:11 pm

Code: Select all
;;$adduser op/master/owner
;;$deluser
;;$op
;;$voice
;;$deop
;;$devoice
;;$ban
;;$unban
;;$protect on

alias access {
  !return $readini(users.ini,$1,$address($2,1))
}

alias chanlev {
  !return $readini(users.ini,$1,$address($2,1))
}

alias userlev {
  !return $readini(users.ini,global,$address($1,1))
}

alias protect {
  !return $readini(settings.ini,$1,protect)
}

alias addgowner {
  writeini users.ini global $address($1,1) owner
  echo Done.
}


on *:TEXT:$adduser*:#: {
  if ($istok(owner,$access($chan,$nick),32)) || ($istok(owner master,$userlev($nick),32)) {
    if (!$2) { notice $nick Syntax: $1 <nick/ident> <level> - where <level> can be: owner, master, op, voice, banned. | halt }
    if ($2 !ison $chan) { notice $nick The requested user ( $+ $2 $+ ) is not on the current channel. ( $+ $chan $+ ) | halt }
    if ($readini(users.ini,$chan,$address($2,1)) { notice $nick The requested user is already known on the current channel, with level: $v1 - use $!deluser to remove him/her. | halt }
    if (!$istok(owner master op voice banned,$3,32)) { notice $nick Invalid level, levels are: owner, master, op, voice, banned. | halt }
    writeini users.ini $chan $address($2,1) $3
    if ($istok(owner master op,$3,32)) { mode $chan +o $2 }
    elseif ($istok(voice,$3,32)) { mode $chan +v $2 }
    elseif ($istok(banned,$3,32)) { ban -k $chan $2 $iif(*!*@*.quakenet.org iswm $address($2,2),2,1) You are BANNED from this channel, order by: $nick, on: $date at: $time $+ . | writeini bans.ini $chan $address($2,$iif(*!*@*.quakenet.org iswm $address($2,2),2,1)) You are BANNED from this channel, order by: $nick, on: $date at: $time $+ . }
    notice $nick Done.
  }
}

on *:TEXT:$deluser*:#: {
  if ($istok(owner,$access($chan,$nick),32)) || ($istok(owner master,$userlev($nick),32)) {
    if ($2 !ison $chan) { notice $nick The requested user ( $+ $2 $+ ) is not on the current channel. ( $+ $chan $+ ) | halt }
    if (!$readini(users.ini,$chan,$address($2,1)) { notice $nick The requested user ( $+ $2 $+ ) is not known on the current channel ( $+ $chan $+ ) | halt }
    if ($2 isop $chan) { mode $chan -o $2 }
    elseif ($2 isvoice $chan) { mode $chan -v $2 }
    remini users.ini $chan $address($2,1)
    notice $nick Done.
  }
}

on *:TEXT:$op*:#: {
  if ($istok(owner,$access($chan,$nick),32)) || ($istok(owner master,$userlev($nick),32)) {
    if (!$2) { mode $chan +o $nick | notice $nick Done. | halt }
    if ($2 ison $chan) { mode $chan +o $2 | notice $nick Done. | halt }
    if (* isin $2) {
      var %x = $nick($chan,0)
      while (%x) {
        var %q = $nick($chan,%x)
        if ($2 iswm %q) { var %d = $addtok(%d,$v2,32) }
        dec %x
      }
      mode $chan + $+ $str(o,$numtok($gettok(%d,1-4,32),32))
      var %d = $deltok(%d,1-4,32)
    }
  }
}

on *:TEXT:$deop*:#: {
  if ($istok(owner,$access($chan,$nick),32)) || ($istok(owner master,$userlev($nick),32)) {
    if (!$2) { mode $chan -o $nick | notice $nick Done. | halt }
    if ($2 ison $chan) { mode $chan -o $2 | notice $nick Done. | halt }
    if (* isin $2) {
      var %x = $nick($chan,0)
      while (%x) {
        var %q = $nick($chan,%x)
        if ($2 iswm %q) { var %d = $addtok(%d,$v2,32) }
        dec %x
      }
      mode $chan - $+ $str(o,$numtok($gettok(%d,1-4,32),32))
      var %d = $deltok(%d,1-4,32)
    }
  }
}

on *:TEXT:$voice*:#: {
  if ($istok(owner,$access($chan,$nick),32)) || ($istok(owner master,$userlev($nick),32)) {
    if (!$2) { mode $chan +v $nick | notice $nick Done. | halt }
    if ($2 ison $chan) && ($access($chan,$nick) != voice) { mode $chan +v $2 | notice $nick Done. | halt }
    if (* isin $2) && ($access($chan,$nick) != voice) {
      var %x = $nick($chan,0)
      while (%x) {
        var %q = $nick($chan,%x)
        if ($2 iswm %q) { var %d = $addtok(%d,$v2,32) }
        dec %x
      }
      mode $chan + $+ $str(v,$numtok($gettok(%d,1-4,32),32))
      var %d = $deltok(%d,1-4,32)
    }
  }
}

on *:TEXT:$devoice*:#: {
  if ($istok(owner,$access($chan,$nick),32)) || ($istok(owner master,$userlev($nick),32)) {
    if (!$2) { mode $chan -v $nick | notice $nick Done. | halt }
    if ($2 ison $chan) && ($access($chan,$nick) != voice) { mode $chan -v $2 | notice $nick Done. | halt }
    if (* isin $2) && ($access($chan,$nick) != voice) {
      var %x = $nick($chan,0)
      while (%x) {
        var %q = $nick($chan,%x)
        if ($2 iswm %q) { var %d = $addtok(%d,$v2,32) }
        dec %x
      }
      mode $chan - $+ $str(v,$numtok($gettok(%d,1-4,32),32))
      var %d = $deltok(%d,1-4,32)
    }
  }
}

on *:TEXT:$ban*:#: {
  if ($istok(owner,$access($chan,$nick),32)) || ($istok(owner master,$userlev($nick),32)) {
    if (!$2) { notice $nick $1 <user> <reason> | halt }
    if ($2 == $me) { notice $nick I will not ban myself. | halt }
    if ($2 == $nick) { notice $nick I will not ban you. | halt }
    ban -k $chan $2 $iif(*!*@*.quakenet.org iswm $address($2,2),2,1) You are BANNED from this channel, order by: $nick, on: $date at: $time $+ .
    writeini bans.ini $chan $address($2,$iif(*!*@*.quakenet.org iswm $address($2,2),2,1)) You are BANNED from this channel, order by: $nick, on: $date at: $time $+ .
  }
}

on *:TEXT:$unban*:#: {
  if ($istok(owner,$access($chan,$nick),32)) || ($istok(owner master,$userlev($nick),32)) {
    if (!$2) { notice $nick $1 <user>/<all> | halt }
    if ($2 == all) {
      mode $chan +b-b *!*@* *!*@*
      remini bans.ini $chan
      notice $nick Done.
    }
    ban -r $chan $2 $iif(*!*@*.quakenet.org iswm $address($2,2),2,1)
  }
}

on *:TEXT:$version:#: {
var %x = $rand(1,2)
if (%x == 1) { msg $chan I am protect v0.2 by Phil (SilverRain) }
elseif (%x == 2) { describe $chan is protect v0.2 by Phil (SilverRain) }
}

on *:TEXT:$protect*:#: {
  if ($istok(owner,$access($chan,$nick),32)) || ($istok(owner master,$userlev($nick),32)) {
    if (!$2) { notice $nick Syntax: $1 <on/off/status> | halt }
    if ($2 == on) {
      writeini settings.ini $chan protect on
      notice $nick Done.
    }
    if ($2 == off) {
      writeini settings.ini $chan protect off
      notice $nick Done.
    }
    if ($2 == status) {
      notice $nick Protection is currently: $iif($readini(settings.ini,$chan,protect),$v1,off)
    }
  }
}
on @!*:OP:#: {
  if ($nick == Q) ||  ($istok(owner master op,$access($chan,$nick),32)) || ($istok(owner master op voice,$userlev($nick,32)) || ($protect($chan) != on) { halt }
  mode $chan -oo $nick $opnick
  /msg Q chanlev $chan $nick -ao
  hadd cbans $chan $address($nick,1) You are not allowed to OP anyone on $chan - violation on: $date at $time
  ban -k $chan $nick 1 You are not allowed to OP anyone on $chan - violation on: $date at $time  - by %homechan
}


on @!*:DEOP:#: {
  if ($nick == $me) {
    msg Q op $chan
  }
  if ($nick == Q) ||  ($istok(owner master op,$access($chan,$nick),32)) || ($istok(owner master op voice,$userlev($nick,32)) || ($protect($chan) != on) { halt }
  mode $chan -o+o $nick $opnick
  hadd -m cbans $chan $address($nick,1) You are not allowed to DEOP anyone on $chan - violation on: $date at $time
  /msg Q chanlev $chan $nick -ao
  ban -k $chan $nick 1 You are not allowed to DEOP anyone on $chan - violation on: $date at $time
}



on @!*:KICK:#: {
  if ($nick == Q) ||  ($istok(owner master op,$access($chan,$nick),32)) || ($istok(owner master op voice,$userlev($nick,32)) || ($protect($chan) != on) { halt }
  mode $chan -ov $nick $nick
  /msg Q chanlev $chan $nick -ao
  writeini bans.ini $chan $address($nick,1) You are not allowed to KICK anyone on $chan - violation on: $date at $time
  ban -k $chan $nick 1 You are not allowed to KICK anyone on $chan - violation on: $date at $time
}



on @!*:BAN:#: {
  if ($nick == Q) ||  ($istok(owner master op,$access($chan,$nick),32)) || ($istok(owner master op voice,$userlev($nick,32)) || ($protect($chan) != on) { halt }
  mode $chan -o+b-b $nick $address($nick,1) $banmask
  /msg Q chanlev $chan $nick -ao
  kick $chan $nick You are not allowed to BAN anyone on $chan - violation on: $date at: $time
  writeini bans.ini $chan $address($nick,1) You are not allowed to BAN anyone on $chan - violation on: $date at $time
}


on @!*:UNBAN:#: {
  if ($nick == $me) { halt }
  if ($nick == Q) ||  ($istok(owner master op,$access($chan,$nick),32)) || ($istok(owner master op voice,$userlev($nick,32)) || ($protect($chan) != on) { halt }
  mode $chan -o+b+b $nick $address($nick,1) $banmask
  kick $chan $nick You are not allowed to BAN anyone on $chan - violation on: $date at: $time
  /msg Q chanlev $chan $nick -ao
  hadd cbans $chan $address($nick,1) You are not allowed to BAN anyone on $chan - violation on: $date at $time
}


on @!*:TOPIC:#: {
  if ($nick == Q) ||  ($istok(owner master op,$access($chan,$nick),32)) || ($istok(owner master op voice,$userlev($nick,32)) || ($protect($chan) != on) { writeini settings.ini $chan topic $chan($chan).topic | notice $nick Topic Saved. | halt }
  mode $chan -o+b $nick $address($nick,1)
  kick $chan $nick You are not allowed to CHANGE TOPIC on $chan - violation on: $date at $time
  /msg Q chanlev $chan $nick -ao
  hadd cbans $chan $address($nick,1) You are not allowed to CHANGE TOPIC on $chan - violation on: $date at $time
  topic $chan $readini(settings.ini,topic,$chan)
}


Did what was requested. Nothing more. Be more specific next time.
SilverRain
 

Re: Professional Protect bot.

Postby Lukemob » Mon Jun 23, 2008 5:17 am

Nice work, mate. Even if the bot doesn't have all the commands as pwnd as was requested. But well, you're the first who did it. Your own choice ;-)
Lukemob
 

Re: Professional Protect bot.

Postby SilverRain » Tue Jun 24, 2008 4:41 pm

Well, tbh, he can't just request that here, since it's a big script, many lines, long time to code, and for one thing, we can't guarantee the copyright remains intact after ;)
SilverRain
 

Re: Professional Protect bot.

Postby Lukemob » Sat Jul 26, 2008 5:11 pm

Yes sure. But then it's not professional bot, just a bot with few commands being afraid of copyrights :) But I understand the time thing...
Lukemob
 

Re: Professional Protect bot.

Postby PRADA » Thu Jul 31, 2008 8:15 am

SilverRain wrote:I'm going to be very nice and code you one. You must keep my name in it at all times.


who cares about copyright anyway?
noone will ever see them. and the best scripts remain for your self anyway.

thats how im handling my business #iBots ;)
PRADA
 

Re: Professional Protect bot.

Postby Lukemob » Fri Aug 15, 2008 5:55 pm

PRADA wrote:
SilverRain wrote:I'm going to be very nice and code you one. You must keep my name in it at all times.


who cares about copyright anyway?
noone will ever see them. and the best scripts remain for your self anyway.

thats how im handling my business #iBots ;)


Most people get known as coders mainly when they put a "Copyright" in their scripts. You probably couldn't run commercial BUSINESS, as I see.
Lukemob
 

Re: Professional Protect bot.

Postby capurro » Mon Nov 24, 2008 5:28 pm

Code: Select all
on *:load: {
  echo -a Bot Commands Scripted By capurro
  echo -a http://www.capurro.tk
  echo -a Level 1 Users Are Regular Users - Add These By Typing !addregular nick
  echo -a Level 5 Users Get HalfOp Status - Add These By Typing !adduser nick
  echo -a Level 10 User (Owner) Gets Op Status
  echo -a Start By Setting The Bot's Owner By Typing !owner NICK
}
on *:connect: {
  nick %botnick
  identify %botpass
  join %botchan
  timestamp on
}
on 10:join:%botchan: {
  mode %botchan +o $nick
  mode %botchan +a $nick
}
on 5:join:%botchan: {
  mode %botchan +h $nick
}
on *:join:%botchan: {
  mode %botchan +v $nick
}
on *:INVITE:*: {
  query $nick Please stop inviting me to your shady little alley ways !
}
on *:op:#:{
  if ($opnick == $me) { msg $chan 12Thanks for the 4@12 $nick }
  else { halt }
}
on *:deop:#:{
  if ( $nick = $me ) { halt }
  if ($opnick = $me) {
    chanserv op %botchan $me
    chanserv deop %botchan $nick
    msg %botchan 4DONT 12DeOp 4The Bot
  }
}
on *:help:#:{
  if ($hnick == $me) { msg $chan 12Thanks for the 4%12 $nick }
  else { halt }
}
on *:voice:#:{
  if ($vnick == $me) { msg $chan 12Thanks for the 4+12 $nick }
  else { halt }
}
on *:KICK:#:{
  if ($knick = $me) {
    join %botchan
    mode %botchan +v $me
    msg chanserv op %botchan $me 
    .timer 1 1 { msg %botchan 4DONT 12Kick 4The Bot | kick %botchan $nick }
  }
}
on !*:BAN:#:{
  if ($banmask iswm $address($me,5)) {
    msg chanserv unban %botchan
    join %botchan   
    msg chanserv op %botchan $me
    msg chanserv protect %botchan $me
    .timer 1 1 { msg %botchan 4DONT 12Ban 4The Bot | ban %botchan $$2 2 | kick %botchan $nick | halt }
  }
}
on 1:MODE:%botchan: {
  msg %botchan 4 $nick 12changed4 $chan 12mode to4 $1-
}
;-------------------------------------start new remote here--------------------------------------
on *:text:*:*: {
  if ($$1 = !commands) {
  msg $nick !owner !google (search for). }
  if ($$1 = !owner) {
  msg %botchan %owner is my current owner . }
  if ($$1 = !setowner) {
    if (%owner == $null) {
      set %owner $nick 
      guser -a 10 $$2
      msg %owner Hi , now i will tell you how to set me up . First set the botchan by typing !setbotchan #channel .
    }
    if ($nick == %owner) {
      set %owner $$2
      guser -a 10 $$2
      msg %owner Hi , Type !commands for a list of owner commands .
      else { msg $chan You dont have permission to do that $nick . }
    }
  }
  if ($$1 = !setbotchan) && (%owner == $null) {
    msg $nick You have to set yourself as owner before configuring the bot . Do this by typing !setowner YOURNICK .
  }
  if ($$1 = !setbotchan) && ($nick == %owner) {
    set %botchan $$2
    msg %owner You have set my BotChan to %botchan , now set my nick by typing !setbotnick nick .
  }
  if ($$1 = !setbotnick) {
    if (%owner == $null) {
      msg $nick You have to set yourself as owner before configuring the bot . Do this by typing !setowner YOURNICK .
    }
    else {
      if (%botnick == $null) {
        set %botnick $$2
        nick %botnick
        msg %owner You have set my Nick to %botnick , Now set my Nickserv password by typing !setbotpass password .
      }
      if ($nick == %owner) {
        set %botnick $$2
        nick %botnick
        msg %owner You have set my Nick to %botnick , Now set my Nickserv password by typing !setbotpass password .
        else { msg $chan You dont have permission to do that $nick }
      }
    }
  }
  if ($$1 = !setbotpass) {
    if (%owner == $null) {
      msg $nick You have to set yourself as owner before configuring the bot . Do this by typing !setowner yournick .
    }
    else {
      if (%botnick == $null) {
        msg $nick You have to set my Nick first . Do this by typing !setbotnick MYNICK .
      }
      else {
        if (%botpass == $null) {
          set %botpass $$2
          msg %owner You have set my NickServ Password to %botpass , I am now setup . Enjoy .
        }
        if ($nick == %owner) && (%botpass == %botpass) {
          set %botpass $$2
          msg %owner You have set my NickServ Password to %botpass
          else { msg $chan You dont have permission to do that $nick }
        }
      }
    }
  }
}
;-------------------------------------start new remote here--------------------------------------
on 5:text:*:*: {
  if ($$1 = !op) {
    .mode %botchan +o $$2
    msg %botchan - $$2 has been given Op Status By $nick - | halt
  }
  if ($$1 = !deop) {
    .mode %botchan -o $$2
    msg %botchan - $nick Stripped $$2 Of Their Op Status - | halt
  }
  if ($$1 = !halfop) {
    .mode %botchan +h $$2
    msg %botchan - $$2 has been given HalfOp Status By $nick - | halt
  }
  if ($$1 = !dehalfop) {
    .mode %botchan -h $$2
    msg %botchan - $nick Stripped $$2 Of Their HalfOp Status - | halt
  }
  if ($$1 = !voice) {
    .mode %botchan +v $$2
    msg %botchan - $$2 has been given Voice Status By $nick - | halt
  }
  if ($$1 = !devoice) {
    .mode %botchan -v $$2
    msg %botchan - $nick Stripped $$2 Of Their Voice Status - | halt
  }
  if ($$1 = !kick) {
    kick %botchan $$2
    msg $$2 You were kicked by $nick
    msg %botchan [ I have performed %kcnt Kicks in %botchan ] | inc %kcnt 1
  }
  if ($$1 = !ban) {
    ban %botchan $$2 2
    msg $$2 You were banned by $nick
    msg %botchan [ I have performed %bcnt Bans in %botchan ] | inc %bcnt 1
    kick %botchan $$2
    timer 1 300 chanserv clear %botchan bans
  }
  if ($$1 = !mode) {
    set %tempmode $$2-
    mode %botchan %tempmode
  }
  if ($$1 = !modelock) {
    set %tempmode $$2-
    chanserv set %botchan mlock %tempmode
  }
  if (%%1 = !notify) {
    notify $$2
    msg %botchan added $$2 to notify list !
  }
  if ($$1 = !commands) {
    msg $nick !op (nick) !deop (nick) !halfop (nick !dehalfop (nick) !voice (nick) !devoice (nick) !kick (nick) !ban (nick).
    msg $nick !owner !google (search for) .
  }
}
;-------------------------------------start new remote here--------------------------------------
on 10:text:*:*: {
  if ($$1 == !adduser) {
    if ($nick == %owner) {
      guser -a 5 $$2
      notify $$2
      query $$2 Type !commands for a list of available commands
    }
    else {
      msg %botchan You dont have permission to do that $nick .
    }
  }
  if ($$1 == !addregular) {
    if ($nick == %owner) {
      guser -a 1 $$2
      msg %botchan - $$2 added to access list -
      query $$2 Type !commands for a list of available commands
    }
    else {
      msg %botchan You dont have permission to do that $nick .
    }
  }
  if ($$1 = !akick) {
    chanserv akick %botchan add $$2 2
    kick %botchan $$2
    msg $$2 You have been added to %botchan $+ s AutoKick List by $nick
    msg %botchan [ I have performed %akcnt AutoKicks in %botchan ] | inc %akcnt 1
    timer 1 300 chanserv akick %botchan del $$2 2
  }
  if ($$1 = !join) {
    join $$2
  }
  if ($$1 = !part) {
    part $$2
  }
  if ($$1 = !commands) {
    msg $nick !op (nick) !deop (nick) !halfop (nick) !dehalfop (nick) !voice (nick) !devoice (nick) !kick (nick) !ban (nick) !akick (nick).
    msg $nick !adduser (nick) !addregular (nick) !owner !google (search for) .
  }
}


Code: Select all
Alias owner { /set %owner $$1 }
capurro
 

Next

Return to Mirc Scripting Request

Who is online

Users browsing this forum: No registered users and 0 guests

cron