PDA

View Full Version : Passing Password to SigmaChat (Raidersoft)


hurrican
01-10-2005, 12:45 AM
I am using RaiderSoft's SigmaChat -- Remote Auth. System.. This works fine, except I want the users to be able to auto login.. How would I go about passing the 'password' field in this code? Anyone know the simplist way to pass this information?

This is currently in my "Chatbit" Template (Customized)
<applet
codebase="http://client0.sigmachat.com/current/"
code="Client.class" archive="scclient_en.zip"
width=600 height=400 MAYSCRIPT>
<param name="room" value="xxxxxx">
<param name="cabbase" value="scclient_en.cab">
<param name="username" value="$bbuserinfo[username]">
<param name="password" value="????????????????????">
<param name="autologin" value="yes">
</applet>

hurrican
01-10-2005, 10:26 PM
No one has any information on how to pass the users password?

Logician
01-11-2005, 06:26 AM
checked that hack? https://vborg.vbsupport.ru/showthread.php?t=63107&page=3&pp=50&highlight=sigma%2A

(edit: Sorry my bad, you're on vb2)

hurrican
01-15-2005, 03:22 AM
Here is the script that I am currently using.. Anyone see why this code would not pass the password to the Raidersoft server?? Should I be using $md5password in the chatbit template??? I have tested that too, but it still will not auth.. any help is greatly appreciated!


<?php

/*
SigmaChat Authentication Script v1.0
Tested with vBulletin 2.3.0, SigmaChat Platinum 7.1
Copyright (C) 2003, RaiderSoft. All Rights Reserved.

This script allows you to authenticate access to your SigmaChat
Java Chat room via a vBulletin MySQL database.

Place this file in the same directory as your vBulletin config.php
file (usually /upload/admin/)

This software is free for commercial, non-profit, and individual use.

Please read included README.txt file for installation instructions.

RaiderSoft Support Team
support@raidersoft.com
*/

require_once('../admin/config.php');

$username = dbparam("username");
$password = dbparam("password");
$ip = param("ip");

$usergroupid = -1;
$retval = 0;

header('Content-type: text/plain');

db_connect();

$md5password = md5($password);

$query1 = "SELECT usergroupid FROM user WHERE username='$username' AND PASSWORD='$md5password'";
$result = mysql_query($query1, $dbcxn);
if($row = mysql_fetch_row($result))
{
$usergroupid = $row[0];
@mysql_free_result($result);

$query2 = "SELECT canpostnew, cancontrolpanel FROM usergroup WHERE usergroupid=$usergroupid";
$result = mysql_query($query2, $dbcxn);
if($row = mysql_fetch_row($result))
{
$canpostnew = int($row[0]);
$cancontrolpanel = int($row[1]);


if($canpostnew > 0) { $retval = 1; }
if($cancontrolpanel > 0) { $retval = 2; }
}
}

echo "$retval\n";
db_disconnect();


/*
Database Related Functions...
*/

function db_connect()
{
global $dbcxn;
global $servername, $dbusername, $dbpassword, $dbname;

if(!($dbcxn = mysql_connect($servername, $dbusername, $dbpassword)))
dferror("db_connect:mysql_connect");

if(!(mysql_select_db("$dbname", $dbcxn)))
auth_error("Error connecting to database.");
}

function db_disconnect()
{
global $dbcxn;

@mysql_close($dbcxn);
}

function db_executeQuery($query)
{
global $dbcxn;

$result = mysql_query($query, $dbcxn);
@mysql_free_result($result);
}

function auth_error($errorstr)
{
echo $errorstr;
}

/*
CGI, Misc.. Related Functions...
*/

function param($cgiparam)
{
$value = isset($_POST[$cgiparam])
? $_POST[$cgiparam]
: $_GET[$cgiparam];

return ini_get('magic_quotes_gpc')
? stripslashes($value)
: $value;
}

function dbparam($cgiparam)
{
$value = isset($_POST[$cgiparam])
? $_POST[$cgiparam]
: $_GET[$cgiparam];

return $value;
}

function int($strval)
{
return intval($strval);
}

?>