Difficulty of building a bot? reddit / irc ---------------------------------------------------------------------- ZeshV · 2014-06-11 02:31 I was just wondering, how hard is it to build a bot for IRC? I want a simple image posting one (I've seen them before) but I have literally no idea of how easy or difficult it is. My end goal is a bot that if I type ".sprite 'name of sprite' " I'll get a link to the image. That is all I want, how simple/difficult is that to do? and what programs do you need for that? ---------------------------------------------------------------------- banjaxe · 2014-06-11 04:41 what you described would be super easy. I used cloudbot as a base, and i host it myself on a vps that costs me $5 a month. https://github.com/banjaxe/CloudBot/tree/develop/plugins Me and a couple other guys from /r/metal forked it and added a bunch of last.fm functionality, but there are some pretty simple scripts in there that could be easily modified to do what you're wanting. ---------------------------------------------------------------------- ZeshV · 2014-06-11 04:53 I have no programming experience, so I don't even know where to start to run or use it or anything. Any suggestions on learning that? ---------------------------------------------------------------------- banjaxe · 2014-06-11 05:08 I'm mostly self-taught. What I can tell you without actually writing the python script, is that you're essentially just needing something that defines the command (.sprite), looks at the input ('name of sprite') and looks it up in a table containing all your sprites, and returns, say an imgur url with the sprite. Should be pretty simple. As for configuring and setting up the bot itself, it was pretty simple also, but I use linux on a daily basis. For something as simple as you're looking to do, cloudbot is probably overkill. You might try joining #snoonet or #help and asking if someone there would be interested in helping. EDIT: Is your channel on snoonet? If so, we could probably hammer out a plugin for this, and I could just idle my bot in your channel. Saves you the hassle. ---------------------------------------------------------------------- wub_wub · 2014-06-11 06:12 The functionality that you want is very easy to make. You can either make a plugin for an existing IRC bot or write one yourself (using some irc library that handles the low level stuff if you want it to be simple) in any language you want ---------------------------------------------------------------------- ZeshV · 2014-06-11 07:39 Nope, my channel is on synIRC And a Plugin sounds good, we have a bot that does kind of what I want to do, but not the images that I would want to use. ---------------------------------------------------------------------- ZeshV · 2014-06-11 07:40 What if we had a bot that did that, how easy would it be to add a plugin to that to connect it to a different command/pictures? ---------------------------------------------------------------------- banjaxe · 2014-06-11 07:50 do you know what framework the bot uses? eggdrop? suphpbot? cloudbot? ---------------------------------------------------------------------- wub_wub · 2014-06-11 08:24 Depends on the bot, but generally speaking it should be pretty easy to do. ---------------------------------------------------------------------- ZeshV · 2014-06-11 08:32 I have no idea, is there a way to tell? ---------------------------------------------------------------------- ZeshV · 2014-06-11 08:34 ok so this is the bot I want to edit... http://www.reddit.com/r/SVExchange/comments/1sl6f8/how_to_use_dkbot/#b tn ---------------------------------------------------------------------- ZeshV · 2014-06-11 08:34 ok so this is the bot i'd like to edit, or add a plugin to. http://www.reddit.com/r/SVExchange/comments/1sl6f8/how_to_use_dkbot/#b tn How could i do that? ---------------------------------------------------------------------- wub_wub · 2014-06-11 08:44 That bot is just a collection of scripts for mirc as far as I can tell. So you just need to write another script for mirc that does what you want to and run it. Look up mirc scripting language to familiarize yourself with the language used. But similar scripts most likely already exist so look them up and just modify them to suit your needs. ---------------------------------------------------------------------- ZeshV · 2014-06-11 08:46 I use hexchat, would mIRC scripts work with it or would I need to learn both? And do I need a program write the scripts or download the bot? ---------------------------------------------------------------------- wub_wub · 2014-06-11 08:55 >I use hexchat, would mIRC scripts work with it No. >And do I need a program write the scripts or download the bot? You don't need any extra applications to write the script - a text editor will do. And the script is not dependant on the existing bot so you don't need to download/use it. ___ Edit: You could just use python, lua or whatever hexchat supports and write your script in that. ---------------------------------------------------------------------- ZeshV · 2014-06-11 08:56 Well I also have mIRC so I can use it, but how do you upload the bot after you are done? Just sign in with it or something? BTW, sorry if I am bothering you with so many questions. It's kind of easier to ask someone who will know and answer my question directly then to try and search a tutorial page for a specific bit of info (Which I will to learn the scripts) ---------------------------------------------------------------------- wub_wub · 2014-06-11 08:59 "bot" runs locally via mirc. This isn't a standalone bot, it's a script that runs locally using mirc. Edit: depending on what you want writing a standalone bot using an existing framework or writing it from scratch might be better idea. ---------------------------------------------------------------------- ZeshV · 2014-06-11 09:02 so if its a script why does it show up as a user? does that mean I could make my own version of this script"bot" and have it show up as a user? ---------------------------------------------------------------------- wub_wub · 2014-06-11 09:04 I run mirc and join a channel and I have script that responds as me when certain commands/actions are done e.g. user writes a command. I'm not sure if mirc scripts can run as standalone applications - I doubt it, but you're free to look it up. ---------------------------------------------------------------------- banjaxe · 2014-06-11 09:19 looks like these are a bunch of scripts that he has loaded into a client, rather than an actual bot. that said, it should be pretty straightforward. I'm just trying to think of how to do it where it wasn't a chore to add new links. I know how to do it in python. Hell, I think the module we use for saving user quotes would work as- is with cloudbot. https://github.com/banjaxe/CloudBot/blob/develop/plugins/quote.py We'd just need to change the module name to .sprite, and then you could do .sprite add [name] [link] The way it stands now, you could even do multiple entries for each sprite, so (i have no idea how you guys would be using this) you could do .sprite [name] 1 and .sprite [name] 2 if there were variations on a theme. I'm not a programmer, but this is all scripting, and I can usually slap together something that works. I have no idea how cloudbot behaves on synIRC, but I could probably whip up something for you, and at least test it out on the network. I'm about to head home from work, but I am back at work tonight. (I get all my best personal work done at work. Long story..) Lemme know what you want to do. For testing purposes, I can give this a home on one of my home machines and just run it through a bnc or something. ---------------------------------------------------------------------- ZeshV · 2014-06-11 09:44 Well I am gonna be using it for pokemon, as the link I showed you was, and right now I have my name through Hexchat as myself, and I have my "bot" as another user through mIRC, and I am using the simple " **on *:TEXT: :#: msg** " script and just listing it multiple times to the different images. I was gonna try it through HexChat but I don't know where to start, but I can do my best. Maybe you might be able to try on your end? ---------------------------------------------------------------------- banjaxe · 2014-06-11 09:59 I got bored, and hacked something together for you. I tested it and it works. What channel do you idle in on synirc? ---------------------------------------------------------------------- PirateKitteh · 2014-06-11 13:49 This is quite simple to do, I have a ready-made script for eggdrop that does this, have been passing it around for the last few years. ---------------------------------------------------------------------- TheVenetianMask · 2014-06-11 18:37 You can grab a irssi plugin and Perl reference docs, and modify the script slightly to do what you need, then run it from a spare home computer (better not to use your regular one in case someone cracks your modified code). ---------------------------------------------------------------------- ZeshV · 2014-06-11 20:49 Thank you for your help, but I ended up running a script!