6 posts
Posted 04 August 2012 - 06:21 PM
I have been wondering if there is any way to display real IRC (such as #computercraft) on a monitor in-game. I've been told that it's not exactly possible because CC does not support sockets. However, since it can access HTTP I was wondering if there was any way to print IRC to an html file, and have it the computer display that file. I can manage this on the ComputerCraft side of things, but as for writing a log of the irc chat to an html file, I have no idea what to do.
Sorry if this is outside the scope of what I should be asking here, since I'm not exactly asking about computercraft, but I wasn't sure where else to bring this question
Thanks in advance,
Moopington
474 posts
Posted 04 August 2012 - 06:30 PM
You could have it retrieve the IRC page every 1-2 seconds, string.sub it so it's just the chat, then write it to a file.
6 posts
Posted 04 August 2012 - 06:34 PM
Thanks for the help, but that's not exactly what I was asking. Sorry if I was unclear. I was wondering if there was any way I could write the IRC chat to an html file. I kind of understand how to display it in computercraft, but as for creating the html file I'm not exactly sure how to do that.
Edit: Or I completely misread what you're saying. XD Sorry. Anyways, I'm not too familiar with programming outside of CC, and I'm at a loss at how to retrieve the IRC, as I don't have extensive knowledge of the protocol. Thanks!
Edit2: After some googling I found this. (
https://github.com/msva/lua-irc) Could I use something like that to pull from irc, and then write it to a log?
236 posts
Location
Germany
Posted 10 August 2012 - 08:21 PM
Thanks for the help, but that's not exactly what I was asking. Sorry if I was unclear. I was wondering if there was any way I could write the IRC chat to an html file. I kind of understand how to display it in computercraft, but as for creating the html file I'm not exactly sure how to do that.
Edit: Or I completely misread what you're saying. XD Sorry. Anyways, I'm not too familiar with programming outside of CC, and I'm at a loss at how to retrieve the IRC, as I don't have extensive knowledge of the protocol. Thanks!
Edit2: After some googling I found this. (
https://github.com/msva/lua-irc) Could I use something like that to pull from irc, and then write it to a log?
This module requires LuaSocket
686 posts
Posted 11 August 2012 - 09:02 AM
Simple answer: No.
Complex answer: Yes, if you have access to a webserver that has a lanuage installed that supports sockets and doesn't have the firewall restricting it. You could write a server-side script to join IRC and then output it in HTTP using either an html file (bad) or active server pages (good).
496 posts
Location
Harlem, NY
Posted 11 August 2012 - 11:18 AM
686 posts
Posted 12 August 2012 - 04:42 AM
Of course you can do with a preipheral. I like how you don't post a link to the peripheral, or even anything at all besides pictures to say "LOL screw you noobs, look what I can do!".
3790 posts
Location
Lincoln, Nebraska
Posted 12 August 2012 - 04:54 AM
Of course you can do with a preipheral. I like how you don't post a link to the peripheral, or even anything at all besides pictures to say "LOL screw you noobs, look what I can do!".
That's why there's a handy-dandy search box in the upper right of your screen.