Tim's LPC IMC2 client --------------------- This was started on: May 1, 2004. First released: May 8, 2004. Last edited: May 15, 2004. Well, I finally got around to making an IMC2 client in LPC. I seem to have gotten everything done and should be fairly portable. If you have a TMI-2 MUD, then setting this up will be easiest, though it has enough code in it that you shouldn't have any problem setting this up on Lima or Discworld or any others. It doesn't link to any outside stuff, so all you should have to do is copy everything and customize it. Be aware that this is all combined into 1 command. You won't have to rewrite your tell command or your channel daemon or whatever in order to use IMC2 without conflicts. You can use this and I3 at the same time, or even connect to multiple IMC2 networks without conflicts of any kind. You can do whatever you like with it, I'm releasing it freely. If you sell this on a CD or something, I'd like for you to send me a free copy, but don't need to. If you modify it, I'd like it if you include my name in the version setting, but it's alright if you don't. If you change 3 lines of code and then release it with a version setting that doesn't include my name, then I'll make fun of you, and tell all my friends to make fun of you too, but not sue you or anything. There are no strings at all included with this. The included files are: readme.txt This file code.h Basically all the code for IMC2 is in this file. To make use of this, get the imc2.c file, and customize it to your preferences. Pretty much everything you might need is included with this, but if you don't already have one, you'll need a who command, and have a way for this to get the output from it. imc2.c This has all the stuff that you'd have to customize, and the last line is #include "code.h", which tells it to use the code from code.h _imc2-TMI-2.c This is a sample command for TMI-2. Basically, you can call your command anything you want, and make sure to send all the arguments to the command function in the imc2.c file. imc2web-TMI-2.c This is my sample IMC2 web interface page. It just let you view the MUD list, and if you have any channels available to players, then the backlog will be viewable from the web on this page too. If you want to look at a sample of this, mine on TimMUD is located at http://www.darkwoodinc.com:3328/gateways/imc2 This sample is how the web server that comes with TMI-2 handles web pages. If you have any other web server, then basically all you have to do is make it call the html function in the imc2.c file, and pass along the arguments. Then, edit your imc2.c file and make sure HTML_LOCATION is set to where the page will display at. socket.h and socket_err.h These were in my /include directory, you most likely have comparable files, but just in case you're using this on an almost-empty mudlib, here you go. Thanks to: Cynosure (Dave Richards) who wrote the "MudOS LPC Sockets Tutorial - version 1.0" which came with TMI-2. Mud Domain for running the only open IMC2 network I could find to test this out on. Tacitus for having a MUD for it to be written on. Xorith for writing the "IMC Packet Documentation" found at http://hub00.muddomain.com/imc2_protocol_doc.txt