Jump to content
coders-irc_Bot

The MasterMind Bot For IRC

Recommended Posts

  • Administrators
############################################################
##           The MasterMind Bot                          ##
##             Version: 1.0                              ##
##             By: manish17                              ##
##             irc.lucidchat.net #LoveLife                 ##
############################################################

on *:LOAD: set %owner $input(Enter name of the bot owner:,e) 
write admins.txt %owner
write kick.txt My master ordered.. And I followed... Nothing beyond that.
write kick.txt You are busted. BOOM! BOOM! BOOM!
write kick.txt GAME OVER!!!!!

;; A few messages for the compliment command..

write compliments.txt Are you really so much beautiful? Or its just my eyes...
write compliments.txt I really can't stop looking at you.
write compliments.txt You are like the Nightingale! 
write compliments.txt There is nobody in the world like you are . 
write compliments.txt If I had to describe you , words will fall short.

;; A few quotes . You may add more anytime.
write quotes.txt We must let go of the life we have planned, so as to accept the one that is waiting for us.
write quotes.txt Love is the only force capable of transforming an enemy into a friend.
write quotes.txt Life is 10% what happens to you and 90% how you react to it.
write quotes.txt Respect is for those who deserve it, not for those who demand it.

;; KICK COMMAND
;; KICK AN USER OUT OF THE CHANNEL

on *:TEXT:@ki*:#: {

    if ($read(admins.txt,w,$nick)) {
    if ($2 == $null ) { notice $nick Please mention the person whom you want to kick out. }

    elseif ($2 ison $chan) {
    if ($3 == $null) {
    /kick $chan $2  12 $read(kick.txt, n) 
    write recent.txt $nick kicked out $2 from the channel $chan . 
    }
    else {
    /kick $chan $2  13 $3-
write recent.txt $nick kicked out $2 from the channel $chan . (Reason : $3- )

}

}
  else {
 notice $nick $2 is not on $chan . 
 }

  }
  elseif ($read(admins.txt,w,$2)) {
   /kick $nick  11 You tried to kick my master huh ? You drunkard!!!!!
  write recent.txt $nick tried to kick $2 from the channel $chan . 

  }  
  else {
  notice $nick You are not allowed to use that command , $nick . Please ask any bot admin for assistance.
  }
  }

;; KICK BAN COMMAND
;; KICK-BAN AN USER FROM YOUR CHANNEL WITH THIS COMMAND.

   on *:TEXT:@kb*:#: {

    if ($read(admins.txt,w,$nick)) {
    if ($2 == $null ) { notice $nick Please mention the person whom you want to kick-ban. }

    elseif ($2 ison $chan) {
    if ($3 == $null) {
    /kickban $2  10 $read(kick.txt, n)
    write recent.txt $nick kick-banned $2 from the channel $chan .  
    }
    else {
    /kick $chan $2  13 $3-
    /msg ChanServ $chan ban $2
    write recent.txt $nick kick-banned $2 from the channel $chan . (Reason : $3- )
}
}
  else {
 notice $nick $2 is not on this channel $chan. 
 }

  }
  elseif ($read(admins.txt,w,$2)) {
   /kick $nick  11 You tried to kick-ban my master huh ? You drunkard!!!!!
   write recent.txt $nick tried to kick-ban $2 . 
  }  
  else {
  notice $nick You are not allowed to use that command , $nick . Please ask any bot admin for assistance.
  }
  }

   ;;BAN COMMAND
  ;; BAN THE USERS WHO MISBEHAVE ON YOUR CHANNEL 

  on *:TEXT:@ba*:#: {

   if ($read(admins.txt,w,$nick)) {
    if ($2 == $null ) { notice $nick Please mention the person whom you want to uban. }

    else {
   timer 1 1 describe $chan follows the orders of the Master.
   timer 1 3 describe $chan is about to do something.
   timer 1 5 /msg ChanServ ban $chan $2 
   write recent.txt $nick banned $2 from $chan . 
    }

   }

  else {
 notice $nick You are not allowed to use that command , $nick . Please ask any Bot Admin for assistance.. 
 }
  }
  ;;UNBAN COMMAND
  ;; UNBAN THE USERS WHOM YOU BANNED BEFORE. 

  on *:TEXT:@ub*:#: {

   if ($read(admins.txt,w,$nick)) {
    if ($2 == $null ) { notice $nick Please mention the person whom you want to un-ban. }

    else {
   timer 1 1 describe $chan follows the orders of the Master.
   timer 1 3 describe $chan is about to do something.
   timer 1 5 /msg ChanServ unban $chan $2 
   write recent.txt $nick unbanned $2 from $chan . 
    }

   }
  else {
 notice $nick You are not allowed to use that command , $nick . Please ask any Bot Admin for assistance.. 
 }
 }

  ;; INVITE USERS TO YOUR CHANNEL
  ;; AN INVITE COMMAND

  on *:TEXT:@in*:#: {

   if ($read(admins.txt,w,$nick)) {
    if ($2 == $null ) { notice $nick Please mention the person whom you want to invite to this channel. }

    else {
.
   timer 1 1 describe $chan is about to do something.
   timer 1 3 /invite $2 
    }

   }
  else {
 notice $nick You are not allowed to use that command , $nick . Please ask any Bot Admin for assistance.. 
 }
 }

 ;;MAKE YOUR BOT SAY SOMETHING

 on *:TEXT:@say*:#: {

   if ($read(admins.txt,w,$nick)) {
    if ($2 == $null ) { notice $nick Please add a message. }

    else {
.
  msg $chan  5 $2-    
  }

   }
  else {
 notice $nick You are not allowed to use that command , $nick . Please ask any Bot Admin for assistance.. 
 }
 }

 ;; MAKE YOUR BOT REACT 

  on *:TEXT:@do*:#: {

   if ($read(admins.txt,w,$nick)) {
    if ($2 == $null ) { notice $nick Please add a message. }

    else {
.
  describe $chan $2-    
  }

   }
  else {
 notice $nick You are not allowed to use that command , $nick . Please ask any Bot Admin for assistance.. 
 }
 }

;; CHAT STAFF (HOP)

on *:TEXT:@hop*:#: {

   if ($read(admins.txt,w,$nick)) {
    if ($2 == $null ) { notice $nick Please add a user to give Half-op. }

    else {
timer 1 1 describe $chan is about to do something really nice.
timer 1 3  /cs hop #lovelife add $2-    
  }

   }
  else {
 notice $nick You are not allowed to use that command , $nick . Please ask any Bot Admin for assistance.. 
 }
 }

 ;; CHAT STAFF (OP)

on *:TEXT:@op*:#: {

   if ($read(admins.txt,w,$nick)) {
    if ($2 == $null ) { notice $nick Please add a user to give op. }

    else {
timer 1 1 describe $chan is about to do something really nice.
timer 1 3  /cs op $chan add $2-    
  }

   }
  else {
 notice $nick You are not allowed to use that command , $nick . Please ask any Bot Admin for assistance.. 
 }
 }

 ;; ADD OR DELETE ADMINS WHO CAN CONTROL YOUR BOT 
 ;; THIS COMMAND CAN BE USED ONLY BY THE OWNER

 on *:TEXT:@botadmin*:#: {
 if ($nick == %owner) {

 if ($2 == add) {
 if ($read(admins.txt,w,$3)) {
 notice $nick $3 is already in the list of Bot Admins.
 }
 else {
 write admins.txt $3
 msg $chan  12 $3 is added successfully into the list of bot admins.
 }

 }

 if ($2 == del) {
 if ($read(admins.txt,w,$3)) {
 write -dl $+ $3 admins.txt
 msg $chan  5 $3 is successfully deleted from the list of bot admins.
 }
  }
 }
 else {
 notice $nick You are not allowed to use that command, $nick . Please ask any Bot Admin for assistance.
 }
 }

 ;; A FEW COMMANDS FOR EVERYONE TO USE :)

on *:TEXT:@greet*:#: {
  if ($2 == $null) { notice $nick You must type an username to greet someone. }
 else {
 describe $chan  9 welcomes $2 with a pleasant smile. How have you been? You look much better :) 
}
 }

 on *:TEXT:@compliment*:#: {
  if ($2 == $null) { notice $nick You must type an username to  compliment someone. }
 else { 
 msg $chan  3 $2 , $read(compliments.txt,n)
}
 }
    on *:TEXT:@quote*:#: {
  msg $chan  3  $read(quotes.txt,n)
}

;; ADD QUOTES ..

on *:TEXT:@addquote*:#: {
 if ($nick == %owner) {
 if ($2 == $null) { notice $nick You must type a quote. }
 else {
 write quotes.txt $2-
 msg $chan   9 Quote has been successfully added.
 }
 }
 else {
 notice $nick You cannot use this command. 
 }
 }

 ;; ADD COMPLIMENTS..

 on *:TEXT:@addcompliment*:#: {
 if ($nick == %owner) {
 if ($2 == $null) { notice $nick You must type a compliment. }
 else {
 write compliments.txt $2-
 msg $chan   9 Compliment has been successfully added.
 }
 }
 else {
 notice $nick You cannot use this command. 
 }
 }

;; RECENT ACTIVITY

on *:TEXT:@recent*:#: {
%x = $lines(recent.txt)
if (%x==0) { notice $nick No new activity }
else {
var %i = 1

while (%i <= %x) {

msg $chan  7 $read(recent.txt,n,%i)
 inc %i
} 
/write -c recent.txt
}
}

 ;; Commands List

 on *:TEXT:@cmds*:#: {
 notice $nick @usercmds : For commands that can be used by everyone.
 notice $nick @admincmds : For commands to be used by bot-admins.
 notice $nick @ownercmds : For the commands of the bot owner.
 }
 on *:TEXT:@usercmds*:#: {
 notice $nick @greet <user> : Greets an user.
 notice $nick @compliment <user> : Compliments an user!
 notice $nick @quote : Displays a random quote.
 }
 on *:TEXT:@admincmds*:#: {
 notice $nick @ki <user> <reason> : Kicks an user . If no reason is mentioned, then it displays a random reason stored.
 notice $nick @kb <user> <reason> : Kicks and bans an user. Displays random reason if no reason is mentioned.
 notice $nick @ba <user> : Bans an user.
 notice $nick @ub <user> : Un-bans an user. 
 notice $nick @in <user> : Invites an user.
 notice $nick @say <message> : Makes the bot say something.
 notice $nick @do <message> : Makes the bot react.
 notice $nick @hop <user> : Gives HOP to an user.
 notice $nick @op <user> : Gives OP to an user.
 }

 on *:TEXT:@ownercmds*:#: {
 notice $nick @botadmin add <user> : Adds an user to the list of bot-admins.
 notice $nick @botadmin del <user> : Removes an user from the list of bot-admins.
 notice $nick @addquote <quote> : Adds a quote to the list of quotes.
 notice $nick @addcompliment <compliment> : Adds a compliment to the list of compliments.
 notice $nick @recent : Views the recent activity. 
 }

 

Moderating channels might be a tough job . You might have to face situations where you make some people staff and when you are away, they misuse their powers by kicking/banning innocent people. But here is an awesome bot script that will let you moderate your channel using simple commands and moreover, it will also let you track your channel . By tracking channel , I mean that it will allow you to see who was kicked by whom , etc and stuff .

You can always do @cmds for command help.

Commands :-
@usercmds : For list of commands that can be used by everyone.
@admincmds : For list of commands to be used by bot-admins.
@ownercmds : For list of the commands of the bot owner.

Please paste the snppet on your remotes and then try any of these commands for a detailed list of commands.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...