• Welcome to Valhalla Legends Archive.
 

Web chat user login

Started by Spht, December 18, 2005, 09:47 PM

Previous topic - Next topic

Spht

Has anyone ever wrote a site for web channel in which you can log on to your own username, then chat from the browser and your text will be prepended with your login name?

I'm quite sure this can be done effectively as long as the user never learns the "web chat password."  You should be able to design your site in such a way that users can log on to their unique account to access the web chat page, and from there send a message without knowledge of the chat password, and the page will send the appropriate query to the web channel isapi.  This would make prepending a name to a sent message much more valid, because the name is put there by the website based on the login name.

I'm asking this because a several people over the years have suggested that web bot should show what user is sending a message from a browser, when in fact any user with their own web space can write such a system on their own.  It could even be integrated into an already-existing user database (ie, a page could be written for the op [vL] web channel to allow [vL] members from this forum to login with their forum accounts to chat, and their forum name will appear along with their message on Battle.net).

Joe[x86]

I can't say I've ever written one, but I'm sure it wouldn't be too hard with PHP.
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

Phylix

#2
Have the page with the framesets point to name.htm where you want them to submit the message.  It's not a login page, but adding that shouldn't be too hard with a little modification to name.htm.

-Users don't need to know the password to submit messages.
-If the first character in the message is "/" then their name won't be added to the message.

name.htm:

<head><title>Enter Your Name</title>
<script language="Javascript"><!--
function sf(){document.forms[0].Name.focus();}
//--></script></head>
<body bgcolor="black" onLoad=sf()>
<form method="GET" action="/message.php">
<font color=white>Enter Your Name to Chat:&nbsp;&nbsp;<input type="text" name="Username" size="25" maxlength="20">&nbsp;
<input type="submit" value="Submit" name="cmdSubmit"></form></body>


message.php:

<?php$BotName="YourBotName";$Password="YourChatPassword";$Username=$_GET['Username'];$RedirectURL="http://www.yourwebhost.com/message.php?Username=" . $Username;if ($message != '' && $message{0} != '/') {	$Msg=$Username . ": " . $message;	$RemoteURL = "http://www.valhallalegends.com/skywing/isapi/BinaryChatISAPI.dll?sendtext&bot=" . $BotName . "&message=" . $Msg . "&password=" . $Password . "&redirect=" . $RedirectURL;	header("location:$RemoteURL");} else {	if ($message{0} == '/') {		$Msg=$message;		$RemoteURL = "http://www.valhallalegends.com/skywing/isapi/BinaryChatISAPI.dll?sendtext&bot=" . $BotName . "&message=" . $Msg . "&password=" . $Password . "&redirect=" . $RedirectURL;		header("location:$RemoteURL");	}}?>

<script language="Javascript"><!--
function sf(){document.forms[0].message.focus();}
//--></script>

<body bgcolor="black" onLoad=sf()>
<form method="GET" action="/message.php">
<input type="hidden" name="Username" value="
<?php echo $_GET['Username']; ?>
">
<input type="text" name="message" size="100">&nbsp;
<input type="submit" value="Send" name="cmdSubmit"></form>


Doing it in PHP was much easier.  I'm still having problems doing it in ASP, but I'll post again when I get it working.

Spht

Great work, Phylix!

Now it just needs non-anonymous usernames (give usernames logins so they can't be spoofed).  Having it use an already-existing database would be neat (ie, a forum).  Users in group "WebBot" can chat on WebBot. :)

rabbit

I'm almost done an SMF based login, but I can't make the password hash correctly.  Anyone want to strip the functions?  I can't figure it out.  I tried using both their methods, but to no avail.  md5_hmac is in Sources/Load.php, and the other hash is in Sources/LogInOut.php.  I'm stumped on this one :\
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

Denial

Actus non facit reum nisi mens sit rea