I've been looking at X7 Chat as a chat program for my Drupal Youth Ministry site. It offers intergration for about 10 other CMS except for Drupal. One of the files needed is a Authmod file and they even have a basic one set up on their site. Here is the code.

AuthMods are files that handle user authentication. They can be customized to allow X7 Chat to integrate with existing user management systems, such as bulletin boards or content management systems. This documentation covers how to program your own AuthMod. Basic knowledge of PHP and MySql is required in order to write your own AuthMod.

Throughout the course of this guide I will refer to the script that you are integrating X7 Chat with as the 'original script'.

AuthMod files are stored in /lib/auth/. The file config.php (in the root directory) controls which AuthMod file the chat room is using. The variable $X7CHAT_CONFIG['AUTH_MODE'] defines which AuthMod the chat room should load. This variable is simply the name of the AuthMod file without the .php extention.

AuthMod files have four basic jobs in an integration environment.
1) Handle password encryption
2) Get a user's password
3) Change a user's password
4) Automatically log a user into X7 Chat if they are logged into the original script.

Here is a blank authmod for you to start off with, all AuthMods must have these parts:

<?PHP
	$auth_ucookie = "X7C2U";			// Name of username cookie
	$auth_pcookie = "X7C2P";			// Name of password cookie
	$auth_register_link = "../register.php";	// Link to the registration Page
	$auth_disable_guest = true;			// Disable guest accounts
	
	// Any Cookie-Translations will have to go here
	
	function auth_encrypt($data){
		// Encrypt $data
		return $data;
	}
	
	function auth_getpass($auth_ucookie){
		// Get the password for user $_COOKIE[$auth_ucookie] (the user's username)
		return $password;
	}
	
	function change_pass($user,$newpass){
		// Change $user's password to $newpass
	}
?>

If someone could tell me what changes I need to make to the code I would be willing to make the changes and try to intergrate the program. The only problem is I know virtually nothing about PHP/Sql/Drupal code. I think this would really fill a hole in this aspect of Drupal especially for a community site. Any ideas on how to get this up and running? Or a develper that would take a crack at?

Paul