diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-07-17 13:12:28 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-07-17 13:12:28 +0000 |
| commit | 727e15323c6f1a902495d9b155ddbdbfa95f2f46 (patch) | |
| tree | 41d64011a95c659d7353f7f2a5cd86c1494261a5 /src/base/item.c | |
| parent | 7efb51e2cb64a417d9d18ba0064c84abad265dad (diff) | |
- maximalny pocet ID je 1 000 000
- maximalny pocet item sa nastavuje v configu MAX_ITEM ( parameter --max-item )
git-svn-id: http://opensvn.csie.org/tuxanci_ng@152 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/base/item.c')
| -rw-r--r-- | src/base/item.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/base/item.c b/src/base/item.c index d5ca081..ef83066 100644 --- a/src/base/item.c +++ b/src/base/item.c @@ -29,6 +29,7 @@ #ifdef PUBLIC_SERVER #include "publicServer.h" +#include "publicServer.h" #endif #ifndef PUBLIC_SERVER @@ -173,6 +174,13 @@ void addNewItem(space_t *spaceItem, int author_id) int new_x, new_y; int type; +#ifdef PUBLIC_SERVER + if( spaceItem->list->count >= atoi( getSetting("MAX_ITEM", "--max-item", "100") ) ) + { + return; + } +#endif + #ifndef PUBLIC_SERVER if( isSettingAnyItem() == FALSE || getNetTypeGame() == NET_GAME_TYPE_CLIENT ) |