Modules for MudMagic 

1. What is that ?

	A module is a part of software that add features to a larger
	application (in our case MudMagic client). 

2. Developing a module.
	
	The important part of a modules is the functions which are
	called by MudMagic client when some event occurs. The 
	prototypes of this functions are :

	module_MODULENAME_load( ) 
	module_MODULENAME_unload( );  		
	module_MODULENAME_menu_modify( gpointer *widget );		
	module_MODULENAME_menu_reset( gpointer *widget );		
	module_MODULENAME_toolbar_modify( gpointer *widget )		
	module_MODULENAME_toolbar_reset( gpointer *widget )		
	module_MODULENAME_session_open( gpointer session ); 
	module_MODULENAME_session_close( gpointer session );
	module_MODULENAME_data_in( gpointer session, gchar **data, gsize *size );
	module_MODULENAME_data_out( gpointer session, gchar **data, gsize *size );		
	MODULENAME will be replaced with module name. 
	
  	- module_MODULENAME_load( )

	- module_MODULENAME_unload is called before module in unloaded.
	
	- module_MODULENAME_menu_modify( gpointer *widget ) is called 
	when module is loaded or new window is created. this allows to 
	modules to modify the menubar of window and to add new entries. 
	
	- module_MODULENAME_menu_reset( gpointer *widget ) is called 
	when module is unloaded. this allow to modules to restore the
	menubar before module_MODULENAME_menu_modify.
	
	- module_MODULENAME_toolbar_modify( gpointer *widget ) is called
	when module in loaded or new window is created. this allow to
	modules to modify toolbar and add new entries.
	
	- module_MODULENAME_toolbar_reset( gpointer *widget ) is called
	when module is unloaded. this allow  to modules to restor the
	toolbar berfore module_MODULENAME_toolbar_modify.
	
	- module_MODULENAME_session_open( gpointer session ) is called 
	whe a new connection to a mud is made. the argument is the 
	new created SESSION_STATE structure. the structure contains 
	all the information about a connection to mud: host, port, 
	variuos setting for mud, a TELNET_STATE structure...
	see configuration.h from configuration module for more info.
	
	- module_MODULENAME_session_close( gpointer session ) is called 
	whe connection to a mud is closed.
	
	- module_MODULENAME_data_in( gpointer session, gchar **data, gsize *size )
	is called after the server has sent some data. 

	- module_MODULENAME_data_out( gpointer session, gchar **data, gsize *size)
	is called before some data is send to the server.


