• Welcome to Valhalla Legends Archive.
 

WebBot "web chat" suggestion/question

Started by Phylix, January 05, 2006, 11:44 PM

Previous topic - Next topic

Phylix

Is it possible to have a custom "web chat" page?  I have a lot of time on my hands and not much to do so I've been trying to make the page as close to perfect as I can and easy for people viewing the channel through their browser.  I've managed to make it easier so far by just automatically inserting the password.  I know, a little stupid, but I can trust my friends to not spam and people I don't know don't know the URL to the page with the saved password.  I'd like to have it a little neater and have the Message text box take focus when the page loads.  A short javascript function does it:

<body onLoad=sf()>
<SCRIPT LANGUAGE="JavaScript">
<!--
function sf(){document.forms[0].message.focus();}
//-->
</script>

Also, there are times when two people use web chat and others become confused as to who's who.  I was thinking of making a small database of users and have them do a quick login so their messages will be preceeded with their username.  I've spent a while on trying to accomplish these things with the knowledge I have, but not too successful.  It all goes back to the default submit page after one message submission.

But, yeah...  Thank you for WebBot.  Been using it for a few years now and it's great.

Oh, and five more things.  Option to turn logging off, option to sign on to Battle.net on start up, automatically going to the bottom of the text feed on page load, option for GMT or Military time, and have it display the time on the computer running WebBot instead of where ever the time comes from when it's displayed on the text feed (I'm guessing BotNet).  Heh...  I just keep seeing more things to change.

UserLoser

The time WebBot will broadcast comes from the WebBot being ran.  It doesn't have to do anything with the WebChannel server.  WebBot on your system calculates a value for a timestamp that it sends to WebChannel.  Check the time on your system and you should be ok then ;)

Phylix

Ah...  Thanks.  Thought it was two hours fast because of my bad military to GMT conversion.  It's still an hour ahead, but I guess I'll probably get it after some more fiddling around.

Spht

Quote from: Phylix on January 05, 2006, 11:44 PM
Is it possible to have a custom "web chat" page?

Yes, take a look at this page.  That is a simple send form which uses binarychat_isapi_submission_page_send.asp to send a message.  Look at the source of binarychat_isapi_submission_page.asp to see how it works.  binarychat_isapi_submission_page_send.asp sends a simple send query to the BinaryChatISAPI.dll then redirects you back to the send form page.  I was planning on writing little documentation on exactly how to send messages from the web using BinaryChatISAPI.dll.  I'll probably do it at some point...

Quote from: Phylix on January 05, 2006, 11:44 PMI have a lot of time on my hands and not much to do so I've been trying to make the page as close to perfect as I can and easy for people viewing the channel through their browser.  I've managed to make it easier so far by just automatically inserting the password.  I know, a little stupid, but I can trust my friends to not spam and people I don't know don't know the URL to the page with the saved password.  I'd like to have it a little neater and have the Message text box take focus when the page loads.  A short javascript function does it:

<body onLoad=sf()>
<SCRIPT LANGUAGE="JavaScript">
<!--
function sf(){document.chat.message.focus();}
//-->
</script>

Also, there are times when two people use web chat and others become confused as to who's who.  I was thinking of making a small database of users and have them do a quick login so their messages will be preceeded with their username.  I've spent a while on trying to accomplish these things with the knowledge I have, but not too successful.  It all goes back to the default submit page after one message submission.

Sounds great.  I proposed something like that here.

Quote from: Phylix on January 05, 2006, 11:44 PMBut, yeah...  Thank you for WebBot.  Been using it for a few years now and it's great.

Glad you're enjoying it.  :)

Quote from: Phylix on January 05, 2006, 11:44 PMOh, and five more things.  Option to turn logging off,

That's doable.  I added that non-toggible feature because I like the idea of knowing everything is being logged without any effort from me.  I'd be interested in knowing your reason for wanting it toggible.

Quote from: Phylix on January 05, 2006, 11:44 PMoption to sign on to Battle.net on start up,

That's planned for the next update.

Quote from: Phylix on January 05, 2006, 11:44 PMautomatically going to the bottom of the text feed on page load,

That's a good idea, but I don't have much control over it.  BinaryChatISAPI.dll creates all the web content you see, and that project is maintained by Skywing.  It does automatically scroll when new content is added when you use the default BinaryChatISAPI.dll?channeltextstream instead of channeltextex, hence "live channel feed."

Quote from: Phylix on January 05, 2006, 11:44 PMHeh...  I just keep seeing more things to change.

Comments and suggestions are encouraged and appreciated.  Thank you for taking the time to compile your post.

Phylix

#4
Quote from: Spht on January 06, 2006, 12:00 PM
Yes, take a look at this page.  That is a simple send form which uses binarychat_isapi_submission_page_send.asp to send a message.  Look at the source of binarychat_isapi_submission_page.asp to see how it works.  binarychat_isapi_submission_page_send.asp sends a simple send query to the BinaryChatISAPI.dll then redirects you back to the send form page.  I was planning on writing little documentation on exactly how to send messages from the web using BinaryChatISAPI.dll.  I'll probably do it at some point...
Ah...  I see.  What I've been trying to do was submitting the data to binarychat_isapi_submission_page_send.asp and my custom web chat page.  Then have it load that custom page instead of the binarychat_isapi_submission_page_send.asp page.  Can you show an example of that query or the ASP part of the source?

Quote from: Spht on January 06, 2006, 12:00 PM
Quote from: Phylix on January 05, 2006, 11:44 PM
Also, there are times when two people use web chat and others become confused as to who's who.  I was thinking of making a small database of users and have them do a quick login so their messages will be preceeded with their username.  I've spent a while on trying to accomplish these things with the knowledge I have, but not too successful.  It all goes back to the default submit page after one message submission.
Sounds great.  I proposed something like that here.

Hm...  I think it'll be pretty easy if I get the custom web chat page working.

Quote from: Spht on January 06, 2006, 12:00 PM
That's doable.  I added that non-toggible feature because I like the idea of knowing everything is being logged without any effort from me.  I'd be interested in knowing your reason for wanting it toggible.

I have another bot running for that since WebBot doesn't have commands to allow users to view their latency (My friends are obsessed with their ping.  Most command used), last few users the bot had seen, and other things.

Quote from: Spht on January 06, 2006, 12:00 PM
Quote from: Phylix on January 05, 2006, 11:44 PMoption to sign on to Battle.net on start up,

That's planned for the next update.

Oh, awesome.

Quote from: Spht on January 06, 2006, 12:00 PM
Quote from: Phylix on January 05, 2006, 11:44 PMautomatically going to the bottom of the text feed on page load,

That's a good idea, but I don't have much control over it.  BinaryChatISAPI.dll creates all the web content you see, and that project is maintained by Skywing. 

Oh.  I guessed that much, but thought you might have a little influence over it.

Quote from: Spht on January 06, 2006, 12:00 PM
It does automatically scroll when new content is added when you use the default BinaryChatISAPI.dll?channeltextstream instead of channeltextex, hence "live channel feed."
Yeah, noticed that part.  Didn't know about channeltextex.  Good to know, though.

Spht

#5
Quote from: Phylix on January 06, 2006, 01:52 PMAh...  I see.  What I've been trying to do was submitting the data to binarychat_isapi_submission_page_send.asp and my custom web chat page.  Then have it load that custom page instead of the binarychat_isapi_submission_page_send.asp page.  Can you show an example of that query or the ASP part of the source?

binarychat_isapi_submission_page_send.asp:

Quote[...]
RemoteURL = "http://www.valhallalegends.com/skywing/isapi/BinaryChatISAPI.dll?sendtext&bot=" & BotName & "&message=" & Message & "&password=" & Password & "&redirect=" & RedirectURL
[...]

So, it's BinaryChatISAPI.dll?sendtext.

bot is the registration name of the bot that is going to send the message.  message is the message you are going to send (this is where you would prepend the username sending the message if you want).  password is the password chosen in "Password to chat from web."  redirect is the URL to redirect to once the command has been processed.  That is optional I think.

Phylix

Got it working perfectly.  Thanks!  I'll work on doing this:
Quote from: Phylix on January 05, 2006, 11:44 PM
Is it possible to have a custom "web chat" page?

Also, there are times when two people use web chat and others become confused as to who's who.  I was thinking of making a small database of users and have them do a quick login so their messages will be preceeded with their username.  I've spent a while on trying to accomplish these things with the knowledge I have, but not too successful.  It all goes back to the default submit page after one message submission.
Quote

Sounds great.  I proposed something like that here.
Quote

And post if I get it working.