Page 1 of 1

Posted: Wed Jul 18, 2007 10:42 am
by Ryme
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.

Posted: Wed Jul 18, 2007 3:33 pm
by Jick
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.

Posted: Wed Jul 25, 2007 2:55 am
by IcyFreak
Devant wrote:I wonder what time interval that daemon uses.
Fix'd. =p

Posted: Thu Jul 26, 2007 3:52 am
by IcyFreak
Heh, that must have earned you a lot of odd looks.

Oh, and it's spelt "pronunciation".

Posted: Fri Jul 27, 2007 4:16 am
by IcyFreak
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.

Posted: Sat Jul 28, 2007 1:45 pm
by Ryme
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.