This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Moopington's profile picture

Real IRC Displayed In CC

Started by Moopington, 04 August 2012 - 04:21 PM
Moopington #1
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
cant_delete_account #2
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.
Moopington #3
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?
Kolpa #4
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
D3matt #5
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).
FuzzyPurp #6
Posted 11 August 2012 - 11:18 AM
D3matt #7
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!".
Cranium #8
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.