| Unique Uses For An Old Computer |
| Written by kevin-san |
| Friday, 08 May 2009 16:46 |
|
Running an IRC Bot On Old Computer
"Development Center" for installing an IRC Bot on an old computer Year after year, you always hear the same thing. People complain about their shitty computers and how they need to buy new ones. Sometimes they throw out their old machines. Other times they use them as expensive paperweights, or dust collectors in a musky basement. In any case, the things people say are always similar: “Oh my computer is getting old, I need a new one!” “I have so many viruses, it's running too slow and I can't stand it anymore!” “All the porn I downloaded on kazaa fucked up my computer and I don't know what to do!” The typical techno-retardo then goes out, buys a Windows Vista PC, or god forbid a Mac. They soon find out that Vista also runs slower than the fat kid on your 5th grade class's field day, and remain pissed off. Vista jab aside, people tend to think that these older computers become useless. However, the clever basement dweller could easily find a use for crappy, old technology – and probably enjoy it too. This article will hopefully help you find a use for your old computers, and is kind of a How To guide on installing an IRC Bot on an old computer.
Why would you use a whole computer just to run an IRC Bot you ask? Well, a lot of us tend to fill up HDD space fairly quick. Why not use these Mayan era blocks of plastic to store some of your files and media? And even more, why not set it up to do it remotely, through the internet. So I can transfer files to and from the spare computer HDD even if I'm 1000 miles away. There's plenty of ways to approach this problem, but I chose to accomplish it by hosting an IRC bot on a spare computer. My logic was as follows; a custom made IRC Bot would allow me to upload and download files to the spare computers HDD, as well as monitor Hikki Media's newly founded IRC channel. Oh, it could also have a few fun functions, like outputting random faces, predicting your luck, handing you beer, and other shit currently in development. With that general overview, let's get started. My parents had a couple of old computers that I was blessed (cursed) with. The one I chose for this project is a an HP with Windows XP, a Pentium III processor and 96 MB of RAM. The first step would be to get rid of Windows and install linux, or a similar operating system of your choice. First trying to install Ubuntu, and if you are having problems, try Damn Small Linux (DSL). Ubuntu is much easier to work with, but DSL is lighter and would be perfect for your shitty computer. My computer couldn't handle Ubuntu so I went with DSL. In order to install linux you will need to change your boot order. When you first turn on your computer start mashing F2 to access your computers BIOS (note: for your computer it may not be F2). In the BIOS go to the “Boot” tab and move the CD drive to the top of the list. This will allow you to load the linux CD before the hard drive attempts to load your previous operating system. Next, pop in the linux disk, turn on the computer, and install! Installing Ubuntu to your HDD is simple and straightforward (just follow the GUI), but DSL is more complicated. After DSL loads from the CD, open a terminal and become root by typing “su.” Then type “fdisk /dev/hda” to be able to format your HDD. You should note that doing the following will erase all data on your HDD – fair warning. Next, type “d” to delete the current partition and hit enter. Then type “n” to create a new partition and hit enter. Finally type “p” and hit enter to create a primary partition, and “1” for the partition number . Use the defaults for the start and end cylinders (just hit enter). When your back to the main menu type thing, entering “p” should give something like this:
Next, enter “w” to write the new partition table and wait! After it's done, restart your computer. Once you've rebooted your DSL open a terminal and install by typing “sudo -u root dsl-hdinstall”. You should now be able to boot into DSL from your HDD!
![]() After two failed DSL install attempts, I replaced the HDD (shown on top) and figured out how to do it correctly
After seeing how complicated a DSL install is, you people who chose to use Ubuntu should feel lucky. Now we need to actually create an IRC bot. As a note, if you are using DSL you'll have to manually install the packages you need to compile code – I used JDK and wrote my bot in Java. If you've programmed before, go ahead and make one on your own bot, otherwise I recommend using the framework provided by PircBot. This requires basic programming knowledge, I'll be able to provide support in the forum if you wish to go this route. It's too general, complicated, and dependent on how you are writing your bot to cover in this article. If you're taking the easy route and using PircBot, follow directions on the link above to get your bot running, adding custom functions for your bot as you go. Compile over 9000 times, and run your bot (great directions are on the PircBot website)! So shit, now we can run an IRC bot off of our crappy computers! That means we could like, totally send stuff from a laptop, through IRC to our bot, and then the bot could store it on our crap computer! Running the bot like this is fine for awhile, but it's annoying to have to invoke java and manually type it in to run each time. So we now need to set this to startup right when we turn on our computers! If you're using Ubuntu, again this is piss easy, and for DSL it's complicated. You will have to create a startup shell script to run this. Something like this would work. If you are using DSL replace the “java” command with the full path to your java command. For me, it was something like this: /opt/java/JDK/bin/java Now we have a startup script, test to see if it runs your bot – ie type “sh runBot” or whatever you called the script, and it should run your bot! To invoke this on startup go as follows: if you are using Ubuntu, go to Preferrences >> Sessions and add your bot startup script. If you are using DSL change the bootlocal.sh file at /opt/bootlocal.sh. Add the startup script in a line there. Now restart your computer; your IRC Bot should load up!
![]() Running hikki-sama from DSL
Now your 10 year old paper weight is back up doin' some work! Even better, if you're using DSL it stays running the bot, doesn't bother going to the desktop or anything. The computers with shit hardware gathering dust in your parents basement can now run an IRC bot! Fuck yeah.
|
| Last Updated on Wednesday, 13 May 2009 23:07 |




Comments