Making an IRC bot. What functions should I add? reddit / irc ---------------------------------------------------------------------- d4m4s74 · 2014-02-17 14:01 I am building an IRC bot to use on my team's IRC channel (at work). Originally it was just to hold the fort (the server doesn't have nickserv and chanserv) but since building it I've been working on it continously. I've already added a few functions: !op - If you're on the list of allowed OPs you can make yourself or someone else OP, and/or adds people to the lists of allowed OPs !deop - Removes someone's OP status, and when used by the botmaster removes the user from the list !moon - Stolen from another bot, kicks, depending on OP status either a chosen victim, a random victim or the person using it with an 1 in 6 chance of a 5 minute ban. !say - allows you to treat the bot as a ventriloquist dummy and make it say things on the channel of your choice. !command - allows the botmaster to send commands to the server directly. For example to make the bot change its nick or join a different channel. !reload - kills the bot and reopens it, since I change and reupload the script 5 times a day while it's still in alpha this is very useful. !calc - (recommended by spling44) simple calculator allowing [a-z0-9+\-.*\/()%] The bot also OPs or voices allowed people on join. The necessary commands have already been added, so now it's time to add some novelty functions. My question for you is, do you have any ideas about what to add?. ---------------------------------------------------------------------- spling44 · 2014-02-17 16:42 I enjoy having a simple calculator, google search command, and youtube link info scripts on my bot. ---------------------------------------------------------------------- TehZomB · 2014-02-17 18:31 Seconding calculator, also a !next/!last for TV shows is always nice. ---------------------------------------------------------------------- jjasghar · 2014-02-17 20:02 I'd take a look at http://hubot.github.com. It does the majority of what you are looking for. I created https://github.com/jjasghar/hubot-chef-solo to leverage the irc-adapter with test-kitchen. Hope this helps. ---------------------------------------------------------------------- d4m4s74 · 2014-02-17 20:20 I've already written the bot, it's already functional, so I won't need a different bot, I just need tips about what to add. ---------------------------------------------------------------------- d4m4s74 · 2014-02-17 20:22 added the calculator. ---------------------------------------------------------------------- jjasghar · 2014-02-17 21:11 Ah sorry about that. ---------------------------------------------------------------------- d4m4s74 · 2014-02-17 21:19 no problems. any ideas about what to add to a corporate IRC bot? ---------------------------------------------------------------------- jjasghar · 2014-02-17 21:49 Honestly, i just leverage the hubot scripts/community scripts or write any specific jobs i need (run chef-client on some node or everywhere for instance) with coffeescript. I just have been building it over time for jobs that when i do something more than threeish times. ---------------------------------------------------------------------- thecarcrashset · 2014-02-18 04:43 On most of my bots I've implemented some code to make everything a command to return a random item from a list if the message starts with ! For example, if someone in channel were to type !beer it would parse all the known commands, such as your !calc, and if none are matched it then checks for a text file named beer.txt in the "stuff" directory. If beer.txt exists it returns a random line from that file. I've even added some custom category settings so the bot precedes anything in beer.txt with "Have a ". Adding to the list of items is done with preceding the command name is add, so to add a beer named "Joint Effort" a person would type !addbeer Joint Effort This has been a lot of fun to use and see what the users end up coming up with, such as quotes from individual users, terrible trouble ticket quotes from customers, etc If by chance you're writing a bot in perl and interested I would be happy to hook you up with the module. A few years back a friend of mine using it modified to it use sqlite or mysql rather than text files which is really a better way to go about it but for an internal work only bot I went with the simple/lazy method. ---------------------------------------------------------------------- [deleted] · 2014-02-18 06:13 lol all of those commands are just commands you can /run ... make something worth your time. ---------------------------------------------------------------------- IronWolve · 2014-02-18 07:03 Be able to parse URL's and grab titles, !urban dicationary lookup, !8ball, !top shows who pastes the most or !active to show who types the most (exclude bots), maybe notes or msgs. ---------------------------------------------------------------------- Labyras · 2014-02-21 17:57 Come on, maybe people enjoy making their own stuff and/or need to learn because they are new to all this?