Language: 
To browser these website, it's necessary to store cookies on your computer.
The cookies contain no personal information, they are required for program control.
  the storage of cookies while browsing this website, on Login and Register.

Author Topic:  Implementation of Server-side Clans  (Read 456452 times)

0 Members and 1 Guest are viewing this topic.

Torchwood

« Reply #45 on: 18, March 2012, 22:28:26 »
Status update:  Been doing a lot of work on this, but still lots more to go before we even have a basic functioning clan system.  Have done a few commits to /streams, but mostly for safety (don't want to loose anything if I do anything stupid on my PC - which happens!).  Testing is progressing ...

I would hope by next weekend I'll have the core of the system written which will cover:
- creating / disbanding clans
- inviting members, and accepting / rejecting invites
- requesting to join a clan, and accepting / rejecting requests
- kicking members, leaving clans

Note - as discussed previously, there won't be anything about min player level or min price to create a clan; this stuff will get added later (much later).

Next steps after that will be hooking into the channel system to allow clan-channels (so clans can actually start to 'do' something).  After that ... loads of stuff!

clobber

« Reply #46 on: 18, March 2012, 22:41:04 »
Level req and price could be handled easily in the NPC script, rather than server code, when it comes to it.

But good progress - it's looking really hopeful :)
Posted by Clobber

Collector Of Burnt out torches, 0 and Counting.

,-.  ___ ,-.
 \/ .   .  \ / 
(___O___)
 /  \      /   )
 ( ||       || )
  000     000
Woof, Woof!

Quote from: Longir
I use caution, fear is a distraction

Torchwood

« Reply #47 on: 18, March 2012, 22:49:10 »

Definitely my intention clobber!

_people_

« Reply #48 on: 18, March 2012, 22:53:46 »
IIRC Alderan had some comments in the channel file regarding clans when they are implemented, so that'll make you job there easier.

Good work so far! :)
-- _people_ :)

Torchwood

« Reply #49 on: 28, March 2012, 08:02:27 »
Took me a while longer than I thought (due to one or two fiendish little bugs), but revision r6903 puts a relatively stable (I hope!!!) version of the clan code into /streams/clan.

Obviously still tons more work to do, but the basic create/disband/invite/leave/etc. functionality as well as object memory management, etc. now works quite well.

Feel free to run it and have a play.  /clan is the main command (although there is also /clandev - but this is mostly for my own testing purposes and will be removed soon).  /help will give you the parameters you need.

At the moment, clans don't 'do' anything - you can join and leave, etc., but that's it.  My next steps are to look into the channel system and look into sending clan-channel messages.  Hopefully won't take me too long.

(And now that I have some stable code, I'll start making my commit-messages a bit more meaningful)

smacky

« Reply #50 on: 28, March 2012, 16:53:38 »
The clan channel stuff is really simple. Each channel has a clan pointer, channel->clan. Then when querying whether a particular player can see a particular channel we do is_player_in_clan(clan->channel). If 1 he can see it, if 0 he can't.

You should be able to reboot dev with your clan stream (/reboot clans or /reboot restart clans) but first you should rebase your stream so it's got any changes subsequently made to trunk.

Rebasing is just jargon for merging. Example: Your stream is at r6500 and since then X changes have been made to trunk/server so we're now at r6800. Do:

Code: [Select]
svn merge -r 6500:HEAD sf/trunk/server sf/streams/clans/server

Resolve any conflicts (I doubt there are any) and commit.

Note that the from revision is different for CLI SVN and Tortoise. For CLI it is the current revision - 1 (ie, 6499).

It's helpful to put the new rev in the commit loog as a quick reminder of where you are (ie, Rebase to r6800) for the next rebase.

clobber

« Reply #51 on: 28, March 2012, 23:19:41 »
Good job :) I'll have a test tomorrow.
Posted by Clobber

Collector Of Burnt out torches, 0 and Counting.

,-.  ___ ,-.
 \/ .   .  \ / 
(___O___)
 /  \      /   )
 ( ||       || )
  000     000
Woof, Woof!

Quote from: Longir
I use caution, fear is a distraction

Torchwood

« Reply #52 on: 29, March 2012, 13:25:51 »
I'll try and to the rebase stuff tonight; should be easy enough.  Once done, I'll reboot the DEV server and restart with the clan stream.

BTW, I did another commit this morning; clans now actually do something useful!  Its only "message-of-the-day", but still ...

Quote
The clan channel stuff is really simple

That's easy for you to say! :)

I looked through the channel code, and I can see what you mean, but I have some general strategy questions:

+  When a clan is created, should we automatically try to create an identically named channel?
+  If that channel name is already taken, I assume we 'fail' the clan creation (e.g. don't try to create a clan called VOL).   Hmmm ... actually, maybe that IS a good idea?

+  Can clans create additional channels?  A clan might want an admin-only channel, or an auction-channel?
+  Who moderates these channels?  I assume the clan admin ...

smacky

« Reply #53 on: 29, March 2012, 16:22:41 »
In fact, does clan channels absolutely have to be your next step or can you postpone it?

Reason: it'd be convenient for us both if I can commit my channel rewrite before you also start changing that code.

Torchwood

« Reply #54 on: 29, March 2012, 16:32:53 »
No, that's completely fine.  There's plenty of other stuff to look at.  Just bear my above questions in mind when re-writing perhaps?

Torchwood

« Reply #55 on: 29, March 2012, 23:16:45 »

Hmmm ... rebased, resolved 1 conflict, recompiled and tested, then committed; all fine.

But then on DEV server did /reboot restart /clans, but it hasn't worked.  The /clan stuff isn't there.  Did I do it right?  Can someone view the logs?

I wonder - I had to update my CodeBlocks project to include the new .c/.h files that I created.  But, I'm guessing the server doesn't use the CodeBlocks project files - guessing it uses something else?

_people_

« Reply #56 on: 30, March 2012, 00:12:53 »
Don't prefix the '/' on "clans". Just "/reboot restart clans".

The server uses Make, so an update of the Makefiles may be required (haven't looked into makefile format yet).
-- _people_ :)

smacky

« Reply #57 on: 30, March 2012, 01:33:42 »
Updated (I hope I got all the new files -- clan.c, c_clan.c, clan.h, and fiie.h) and dev is rebooting now so tomorrow we'll see.

Torchwood

« Reply #58 on: 30, March 2012, 07:33:10 »

Ah!  So that's how it works.  Unfortunately, you missed one - file.c.

I've updated and commited the relevant makefile.in with file.c, but DEV is not up (so I can't ask it to reboot).

smacky

« Reply #59 on: 30, March 2012, 11:42:44 »
For some reason it decided to wipe all the 'persistent' data (settings, gmaster_file, etc). So it was up but not showing on the metaserver.

I've restored the settings and rebooted, so eventually it should be back.

Tags:
 

Related Topics

  Subject / Started by Replies Last post
4 Replies
1218 Views
Last post 25, April 2006, 18:43:32
by longir
1 Replies
760 Views
Last post 03, June 2006, 10:55:14
by Anahuyu
2 Replies
1106 Views
Last post 15, June 2006, 18:10:57
by dwarrior
5 Replies
1076 Views
Last post 07, August 2007, 05:41:23
by bugbunny
1 Replies
747 Views
Last post 19, September 2010, 08:30:41
by Anich