Valhalla Legends Forums Archive | Spht's Forum | Web chat user login

AuthorMessageTime
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).
December 19, 2005, 3:47 AM
JoeTheOdd
I can't say I've ever written one, but I'm sure it wouldn't be too hard with PHP.
December 19, 2005, 1:07 PM
Phylix
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:
[code]
<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>
[/code]

message.php:
[code]
<?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>
[/code]

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.
January 15, 2006, 9:20 AM
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. :)
January 15, 2006, 12:59 PM
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 :\
January 15, 2006, 2:16 PM
Denial
http://warwatch.polarnex.net/
January 30, 2006, 5:24 AM

Search