Game Chat

Started by
1 comment, last by hplus0603 13 years, 4 months ago
Hello,

I am currently working on a multiplayer game and it should have a simple game chat like you usually have.

It should include:

A server lobby where everyone who logs in joins. This room should always be there, even if no one is in it.
Chat rooms that can be opened by users. They get discarded if all people in it get out.
Private person to person chats.

Then it should have different user groups. Like:

Admin(GameMaser), who can kick, ban and mute from the whole server and in any room. Also they can appoint the lower users anywhere they wish.

OPs, who can only kick and mute from rooms they're OP in. They can appoint OPs and lowers in their room.

Half-OP, who can only mute and appoint moderators in their rooms.

Moderator, who can only mute people in their rooms.

Admin status can only be granted by the server owner outside the game(through the database).

Banning from rooms is not possible, because they're meant to be temporarily.

Also you can have a friend list and an ignore list. You can't see messages from ignore list users.

Now I don't want to design the protocol for the chat myself. Is there a good and free chat protocol I could use for such kind of chat? Or is there a reference implementation I could look at?
I am mostly interested at packet types used and how client and server interact(in detail).
I have a multi-threaded architecture with one threadpool managing the chat.
Advertisement
You might look into IRC. I've only used it from time to time, so I don't know if it supports all the features you are looking for, but it might be a good place to start. You might be able to completely offload the chat onto an IRC server process, which would simplify the problem significantly. Your client would only need a simple, embedded IRC client then, which I'm sure there are libraries available for.
Check the Forum FAQ.

Also, the "IRC" protocol already exists, and does what you want. As does the XMPP protocol.
enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement