i have made a program that connects to multiple servers and handles packets from multiple platforms (ie irc and some others)

what i want to do is make a plugin system that will use my original program for connection purpose then have the plugin system be something like that actually parses user chat input and what not

this is all pretty new to me so i'm looking for ideas on how to make a plugin system, or if any open source stuff exists any advice/direction would be appreciated


Linux or windows?

If it is windows then i cant help :)

In Linux any plugin usually developed as a SO file (shared library) which can be loaded runtime by a server which knows which interface to load, (usually a structure with function pointers)

A tutorial on Static, Shared Dynamic and Loadable Linux Libraries
I hope it was helpful.

For windows its dll, i hope someone else will give you more info on this.

Making a Plugin System is not a trivial task... One of my friends who is very experienced tried and gave up. I made one (for windows) four years ago, and it took me about 1.5 years to get it to work properly. Now, I started a new one about 1 year ago, and it is still not finished but it is much better than my previous version. But, I have to say, it is really hard to do one if you want it to be cross-platform, cross-compiler, cross-module, and export classes and interfaces with a cross-modular RTTI system. If you require none of those things, it is quite easy.

There are plugin systems that already exist, like COM components in Windows (.ocx) or other things you have probably seen before like ActiveX. These are plugin systems with different flavors. I personally have never used them, but I'm sure it is not too difficult.

If you can reduce the purpose of you plugin to just a few functions (like parseIncomingMessage() and whatever). Then, all you really need is to define that set of standard functions, and make DLLs that implement and export those functions. This is a basic special-purpose plugin system.

So, start by looking into DLL, how to write them, export functions, load and use them from your main application. At that point, if you cannot manage to implement the functionality that you need with simple exported functions from a DLL, then you can look into COM components and others from Microsoft. If that is still not good enough, which I doubt, then, I guess you'll have to wait for me to finish my plugin system and release it open-source...