Host an IRC bot on the cloud? reddit / irc ---------------------------------------------------------------------- DaniSenpai · 2015-08-24 15:32 So I just started writing a simple C# IRC bot that I would like to keep on all the time on the channel, problem is I can't leave my computer on to do so, is it possible to host the bot on a web server without having to set up a webpage (HTTP, CSS and stuff)? I'm asking now because I need to set up a database and I'd rather not have to redo the work if I create a local one in SQL and then have to change it for another one web based. ---------------------------------------------------------------------- TingPing · 2015-08-24 16:54 Of course a server is capable of running a bot.. You can get a VPS from somewhere like digitalocean for $5 a month and run whatever you wish. It would be configurable over ssh so no webui is required. (Just make sure your C# program compiles with mono on linux and referral link for $10 credit https://www.digitalocean.com/?refcode=4ba63fec1971 :P) ---------------------------------------------------------------------- DaniSenpai · 2015-08-24 17:13 How about the Amazon Cloud Services? Can I store it there? Also, how much would I need to change my code in order to store it there? Or can I store it as it is? Does the virtual console save a log? Or can I only see what has happened after I logged in' ---------------------------------------------------------------------- TingPing · 2015-08-24 17:27 > How about the Amazon Cloud Services? Can I store it there? Sure, it is basically just a standard VPS. > Also, how much would I need to change my code in order to store it there? Or can I store it as it is? Well look into the Mono project, it probably supports most things unless you use any crazy libraries. > Does the virtual console save a log? Or can I only see what has happened after I logged in' You can use something like `tmux` to keep a session going when you are disconnected, or just have the bot log to files. ---------------------------------------------------------------------- NochaQueese · 2015-08-24 17:46 Depending on your budget and time you are willing to put into maintenance you have a number of options. You could go for a PaaS provider such as [Heroku](https://www.heroku.com/) which will provide you with a platform to run your code on. You don't need to worry about updates or system security as they take care of it all. I like Heroku as they offer a free option to get things started, and all their pricing is per app, not per account. The downside of them for you, is that they offer linux based systems, so you would have to be running using mono, which is the open source .NET implementation. An alternative you could consider is [AppHarbour](https://appharbor.com/). I don't know much about them, but they look to offer a nice PaaS setup for .NET based apps. I'm sure there are others out there, but I don't know anything about them as I'm not a windows dude outside of work. If you don't mind looking after an entire system, you can look at options such as AWS (expensive), or Digital Ocean (cheap but linux only). These will give you an entire server that you will need to manage yourself, but can be used to host multiple apps such as a bouncer and anything else you might want always on. ---------------------------------------------------------------------- mrpops2ko · 2015-08-24 22:20 If you wanted, you could get a raspberry pi (sure it is a large initial cost vs say a couple of months on some vps, but if you are going to run it 24/7 it'll cost you next to nothing.) I think the average usage was something like 5 watts an hour. ---------------------------------------------------------------------- DaniSenpai · 2015-08-25 01:28 Thank you both! /u/NochaQueese I'll look into the Mono project and these hosts you both suggested. If it's ok I'd like to ask a small question that I don't think deserves a new thread: How do I send a /me command? All I get when sending it as a PRIVMSG is a plain text "/me". ---------------------------------------------------------------------- rpcope1 · 2015-08-25 04:19 If you're capable of doing a little bit of extra sysadmin leg work, a good OpenVZ VPS provider like hostus.us would be an excellent choice for hosting. For something like an IRC bot where load isn't variable or excessive, AWS is more expensive and will be less bang for the buck (since you don't really need a lot of the instant provisioning and such). I don't like PaaS stuff like Heroku because you can't really tune things, and you're both more limited in your configuration as well as being vendor locked, and potentially out more money in hosting fees. Checkout lowendbox.com, as that's usually a good place to find a reasonable VPS provider. There are some decent VPS providers where you can get a low power box for about $1-2 a month, so long as you're ok with Linux. ---------------------------------------------------------------------- boo_ood · 2015-08-25 06:33 /me is also known as CTCP ACTION \x01ACTION waves\x01 (Sent as a privmsg or a notice) ---------------------------------------------------------------------- DaniSenpai · 2015-08-25 14:14 I have encountered a problem that others seem to have also encountered, but their solutions don't seem to work for me: Using \x01 send the message as "ACTION wave" with nothing else. The solutions I've found but haven't worked are: Using \001: message is interpret as "01ACTION waves" but I get a "No text to send" error. Using \0001: same issue. Using \u0001: only sends "ACTION waves" but prints an unknown symbol before action. Apparently the issue is the '\0' part where it interprets it as an escape character, is there a way to avoid this? I have tried the following three methods already: writer.WriteLine("PRIVMSG " + CHANNEL + " :" + CONTROL + "ACTION " + message.Remove(0, 3) + CONTROL); writer.WriteLine("PRIVMSG " + CHANNEL + " :" + "\u0001" + "ACTION " + message.Remove(0, 3) + "\u0001"); writer.Write(string.Format("PRIVMSG {0} :{1} ACTION {2}{1}", CHANNEL, CONTROL, message.Remove(0,3))); Where CONTROL = either one of the values before mentioned. ---------------------------------------------------------------------- t4hn · 2015-09-20 21:04 Hey mate, did you figure out a solution to this? ---------------------------------------------------------------------- DaniSenpai · 2015-09-21 17:34 Nope, if you do please make sure to PM me, because I still need this.