Daffy IRC bot (mSL)

By berend on Nov 14, 2012

Screenshots

* NOTE: ONLY A FEW LINES OF CODE ARE IN THE SNIPPET ***
** BEACAUSE IT IS WAY TO LONG DOWNLOAD THE .RAR

The first (big) script I ever made in my life, 4 years ago when I was 13. IRC bot works almost the same as Chanserv in the srvx.

It basicly does channel management. With some extra's. You can register channels to people, they will be owner to the channel and are able to add user with diffrent levels (100, 200, 300, 400) Peon, Op, Master, co-owner.

It also has a god mode so owners of the bot can do whatever they want to all registered channels. A few games are inserted and a helpserv if you run some project like we did by then, there might be some bugs because it is made on the irc.onlinegamesnet.net IRC server and it worked there. It uses RAW and /whois to find out what Authserv/Nickserv account you are logged in to.

You can download all the scripts here: http://berend.biz/wp-content/uploads/2017/03/Daffy.txt (Including the helpserv)

When you wanna use this bot, write //run $mircdir in your mIRC and create a .ini file: admins.ini after that put this insite:

[admins]
yourname=youname
yourname=1000
[1000]
yourname=yourname

after that write on IRC $addadmin yourname 1000 and then it should be done. The bot works with Authserv, if your IRC server doesn't have authserv idk if it is gonna work, it did with nickserv on a few servers as far as I know.

I made this when I was quite jung, When I look at the script there is some logic missing but still I think it was quite okay to use so here it is. I didn't use it for years.

All the commands: (Probably I miss some but you can find them in the help files or the $help, !help and @help on IRC)

Users, Readusers, a, ma , peons, ops, masters, co-owners, owners, adduser, addpeon, addop, addmaster, addcoowner, addowner, deluser , clvl, resync, up, down
Addadmin, deladmin, adminclvl, do, god, nick, reg, unrag, say, emote, part, join ,slap, givepoints, love, kiss, slap, oa, set, (set) giveops, (set) givevoice, (set) enfops, (set) enfvoice, (set) setters
, (set) autovoice, (set) userscript, (set) protect, (set) uset, bans, savebans, rban, uba, delbanall, addban, delban, kickban, kb, uset, joininfo, partinfo, remjoininfo, partjoininfo, setinfo, reminfo
op, deop, voice, devoice, dva, va, opa, dpa, games, oaccess, channel, fun, setin, rr, sr, r, ln ,ht, number, love, dance, hug, kiss, test, invite, uptime, calc, throw, ping, pong, spam
sex, f*ck, banana, porn, flag, appel, tomaaas, littlehero, berend, wut ,wtf, fail ,hack, points

If you have questions feel free:
Server irc.onlinegamesnet.net
Port: 6667
channel: #berend
nickname: berend probably

Have fun, Greetings berend!

RAW 330:*is logged in as*: {
  writeini dafauth.ini nicks $2 $3
  writeini dafauth.ini auths $3 $2 
}
RAW 354:*: {
  writeini dafauth.ini nicks $3 $5
  writeini dafauth.ini auths $5 $3
  }
}
on *:NICK: { 
  whois $newnick
  remini dafauth.ini nicks $nick
}
on *:TEXT:$auth:#: {
  whois $nick
  notice $nick done
  set %a [
  set %b ]
  msg #Daffy.overwatch %a $+ $nick $+ : $+ %auth $+ %b %a $+ $chan $+ : $+ 0 $+ %b $1 $+ :Auth user $2-
}
on *:TEXT:$authchan:#: {
  who $chan (%nacf)
  set %a [
  set %b ]
  msg #Daffy.overwatch %a $+ $nick $+ : $+ %auth $+ %b %a $+ $chan $+ : $+ 0 $+ %b $1 $+ :Auth all users $2-
}
on *:QUIT: {
  remini dafauth.ini nicks $nick
}

on *:text:$god:#: {
  var %auth $readini(dafauth.ini, nicks, $nick)
  if ($readini(admins.ini, 800, [ $+ [ %auth ] $+ ])) { 
    if (%god [ $+ [ %auth ] ] == 1) { 
      unset %god [ $+ [ %auth ] ]
      notice $nick God Disabled. 
      var %a [
      var %b ]
      msg #Daffy.overwatch %a $+ $nick $+ : $+ %auth $+ %b %a $+ $chan $+ : $+ 800 $+ %b $1 $+ :disabled
      HALT
    }
    if (!%god [ $+ [ %auth ] ]) { 
      set %god [ $+ [ %auth ] ] 1
      notice $nick God Enabled. 
      var %a [
      var %b ]
      msg #Daffy.overwatch %a $+ $nick $+ : $+ %auth $+ %b %a $+ $chan $+ : $+ 800 $+ %b $1 $+ :enabled
    }
  }
  else { notice $nick You need bot access: 800 For this command. }
}
on *:TEXT:$channels:#: {
  whois $nick
  var %auth $readini(dafauth.ini, nicks, $nick)
  if ($readini(admins.ini, 700, [ $+ [ %auth ] $+ ])) {
    notice $Nick Channel                       Owner                       Registred by 
    var %c 0
    var %t $ini(channels.ini, channels, 0)
    while (%c < %t) {
      inc %c
      set %h $readini(channels.ini, channels, $ini(channels.ini, channels, %c))
      Notice $Nick $readini(channels.ini, channels, $ini(channels.ini, channels, %c))                       $readini(channels.ini, owner, [ [ %h ] ])                       $readini(channels.ini, Reg, [ [ %h ] ])
    }      
    notice $nick End of Channels Found %c  Channels.
    set %a [
    set %b ]
    msg #Daffy.overwatch %a $+ $nick $+ : $+ %auth $+ %b %a $+ $chan $+ : $+ 700 $+ %b $1 $+ :Registred channels
  }
  else { 
    notice $nick You Need bot access: 700 For this command.
    set %a [
    set %b ]
    msg #Daffy.overwatch %a $+ $nick $+ : $+ %auth $+ %b %a $+ $chan $+ : $+ 700 $+ %b %a $+ Lack access $+ %b $1 $+ :Registred channels
  }
}

Comments

Sign in to comment.
berend   -  Feb 12, 2019

I cannot edit the post since it says that I need to add code? Anyway, you can still download the old mSL bot here if you like:

http://www.b3r3nd.nl/msl/Daffy.zip

 Respond  
Conscious   -  Nov 16, 2012

To be fair that never did occur to me until you said it, I was mightily confused.

 Respond  
[Plornt]   -  Nov 16, 2012

Yeah sorry thought it was an identifier when I first looked didn't occur to me that it was the actual trigger.

 Respond  
Conscious   -  Nov 16, 2012
on *:TEXT:$meh:#:echo -a hi
alias -l meh return abc

The above triggers when someone says '$meh'. 7.27

 Respond  
napa182   -  Nov 15, 2012

Plornt they are not really identifiers the are more like triggers.
Lego the snippet is kind of redundant. You should cut out the redundancy an make it more efficient. Keep at it...

 Respond  
berend   -  Nov 14, 2012

don't ask me I haven't done any mSL in years

 Respond  
[Plornt]   -  Nov 14, 2012

Wait, since when has identifiers worked in the event text? I was always led to believe you had to encase it in $()

 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.