Twilight Forums

Idle chat for wannabe heroes
It is currently Sat Jul 26, 2014 6:13 am

All times are UTC - 7 hours




Post new topic Reply to topic  [ 18 posts ] 
Author Message
 Post subject:
PostPosted: Wed Jul 18, 2007 10:42 am 
Offline
Site Admin
User avatar

Joined: Thu Apr 05, 2007 2:04 pm
Posts: 4262
I do consider having a healthy chat important to the game, and I really would like to have it working better -- most especially the /who command. The main reasons I haven't done it yet is:

1) I haven't figured out how to tell if someone is logged in.
2) I also haven't figured out how to feed in and interpret commands in chat, something else that's critical before any of those functions work.

I've got a JavaScript/Ajax book sitting on my desk that I've been meaning to spend some time with, but haven't been able to yet.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 18, 2007 3:33 pm 
Offline

Joined: Tue Apr 10, 2007 11:59 am
Posts: 21
The way I do it is pretty straightforward.

There's a table called "online" with 2 fields -- a playerid and a timestamp.

Every script in the game (including the "is there new chat?" script,) when called, checks to see if the player has been marked online recently -- it stores the timestamp of the last update in the session to allow it to skip needless updates if they're too close to the last one. If not, it tries to update their row with the current timestamp. If that query says it didn't update any rows (because they're not in the table yet) it inserts a row.

A daemon runs on the server that purges entries in the online table older than 30 seconds ago.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 25, 2007 2:55 am 
Offline
User avatar

Joined: Sat Apr 07, 2007 6:48 pm
Posts: 168
Devant wrote:
I wonder what time interval that daemon uses.


Fix'd. =p

_________________
Have a nice day.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 26, 2007 3:52 am 
Offline
User avatar

Joined: Sat Apr 07, 2007 6:48 pm
Posts: 168
Heh, that must have earned you a lot of odd looks.

Oh, and it's spelt "pronunciation".

_________________
Have a nice day.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 27, 2007 4:16 am 
Offline
User avatar

Joined: Sat Apr 07, 2007 6:48 pm
Posts: 168
What would be the point of such a panel? It'd be way more relevant if buffs were working... :wink:

Anyway. I really do think the /msg feature is important. The last conversation I had which I wanted to be private, we used the messages. The other person in chat was not especially amused (half the lines in chat were "check your messages").

Yeah.

_________________
Have a nice day.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 28, 2007 1:45 pm 
Offline
Site Admin
User avatar

Joined: Thu Apr 05, 2007 2:04 pm
Posts: 4262
Devant wrote:
Quanti anni hai? (How many years do you have? {the italian expression for "How old are you?"}) being pronounced as...

Quanti ani (How many assholes do you have?)


Spanish has a similarly dangerous concordance between ano and what's pronounced "anyo" but is spelled nearly identically except there's a tilde (~) over the n. (Can't figure out how to type it here.)

In fact, I believe it's this ancient and embarassing mix-up which caused the English to change the word to "year" instead.

In spanish there's another funny mix-up. The phrase "tengo miedo" means I'm afraid (literally I have fear). However, stick an "r" in there and you get "tengo mierdo" which tends to translate as "I have diarreah". Not a mistake you want to make in public.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group