[CF-Devel] shouting channels
crossfire-devel-admin at archives.real-time.com
crossfire-devel-admin at archives.real-time.com
Tue Sep 23 01:41:49 CDT 2003
Todd Mitchell wrote:
>
>
So when you want a new channel you add it and it is added with your name
>
attached - if you leave the game the chanel is removed. If a Dm sets a
>
channel or it is hardwritten into the channel file in var then it is not
>
assigned to any player and is persistant.
You'd probably want to have some functionality like 'reassign channel' which
lets you give the channel to someone else.
Eg, suppose there is a group of people talking (shouting), but the person that
created the channel needs to leave. For convenience, it'd be nice to give
someone else ownership of that channel so that it sticks around and people can
continue to chat on the same channel.
>
>
An entry is added into new_draw_info that checks if the message is a
>
channel shout (by using the listen level for channel shouts - something
>
we set up) and if so if you are subscribed to a particular channel - if
>
you are you get the message.
That's not the right place to code it. Instead, it should be coded wherever
the channel shout function is used (eg, have that code iterate through the
players to see if the channel the player is shouting matches any each player is
subscribed to).
Trying to change new_draw_info is just making things much more complicated
than it needs to be.
I'd also put in code where the player can only shout at the channel if they
are subscribed to it.
>
>
So to recap - anyone can make a channel but only DM or admins can set up
>
permanent chanels that stay around. If you leave your channel is closed.
>
>
Then if you want to shout - it's still ok but really if you are shouting
>
all the time the DM will shut you up.
>
>
Sound reasonable? Any other thought on this? I guess finding out what
>
are the different listening levels would have to be done but as far as I
>
can tell 0 is system, 1 is shout and 5 is used for stuff like players
>
joining or leaving the game so maybe 2 or 3 would be a good one to use
>
since you will only get messages if you join a channel and I can see
>
folks turning off other messaging but keeping this on for stuff they
>
signed on for. <end of quote>
>
>
- so any thoughts?
Probably better to do it with dynamic sizing and not hardcoded sizes.
this wouldn't be that much harder to do, and prevents the otherwise forseeable
problem of running out of channel.
You probably want to limit the number of channels any player can create. Eg,
you don't want some abuser to log in and create 500 channels - even if the
number of allowed channels is dynamic, a listing that long would just be
unmanageable.
For the player side of things, you could just easily have a pointer like 'char
*subscribed_channels', and just have that be a comma seperated list of channnels
the player is subscribed to, eg, 'newbie,town,dm'. Then for that string, it's
just a matter of alloc, copy, etc.
If you take that approach, things are much more interesting - I could do
something like 'cshout asdf some random message', and it then just checks all
the players to see if anyone has 'asdf' listed in that string, and if so, they
get that message.
By doing so, you no longer need a list of channels. Players can basically
create their own channels by creating them, eg, 'subscribe blahblahblah', and if
someone does a 'cshout blahblahblah ....', you get it.
Official channel listing is only really needed then so players have an idea of
what channels are available.
Note that this method also means there is no worry about some player creating
500 channels. Sure, they can subscribe to 500 channels, but if no one else
knows about them, who cares.
_______________________________________________
crossfire-devel mailing list
crossfire-devel at lists.real-time.com
https://mailman.real-time.com/mailman/listinfo/crossfire-devel
More information about the crossfire
mailing list