Server Help

ASSS Custom Projects - <C> ASSS Files/Quickfix Module Combo Pack

Cheese - Thu Apr 01, 2010 9:20 pm
Post subject: <C> ASSS Files/Quickfix Module Combo Pack
For the first time in subspace history, you can give a staffer access to a directory without them being able to hijack the zone!

Modules:
Code: Show/Hide

files:quickfix
files:files



These two modules use 5 new constants for groupdef:
Code: Show/Hide

viewsettings
modifypublic
modifydefault
modifyarenas
modifyarena:arena


where the :arena is for a subarena named "arena"


The Files Module is simple:

It limits each file command to only the arena the command is used in, without having to create 30 groups per person.
EX: ?agetfile can only get files from the arena's directory.

In addition, the ?aputmap command has been rewritten to put the file into the arena directory instead of the generic one, allowing access, as well as being a cleaner way to do things. :P

Also, I have added a ?aputcfg command which works exactly like putmap, and appends the new cfg onto the end of the existing cfg.

A ?amakearena has been added as well, which creates a new arena the user is in, instead of creating one in which they are not. :)
This way, they can only make arenas they would have power in.

Commands:
Code: Show/Hide

cmd_adir
cmd_ageta
cmd_aseta
cmd_asets
cmd_amakearena
cmd_aputmap
cmd_aputcfg
cmd_aputfile
cmd_agetfile
cmd_aputfile
cmd_arenfile
cmd_adelfile
cmd_filehelp



By popular request I have added ?filehelp, which displays a simple listing of these commands.
I also added ?ageta and ?aseta, which are identical to ?geta and ?seta, except that they are cleaner code rewrites and mesh with the new clean-cfg system.
I also added ?asets, which can write an unmolested line of text to the cfg file, which previously could not be done.

This module is not designed to replace the existing filesystem, it is designed to be used in conjunction with the existing filesystem, which is designed to be used by only the highest of sysops.

Making a new arena is an easy 5 step process:


The Quickfix Module is simple:

It is meant to replace the existing quickfix command, and works exactly the same, except now uses the new capman constants to limit powers, and also limits conf file spam.
In addition, the arena change bug in the original quickfix which allowed permissions bypass has been fixed.

Powers are limited by groupdef.
Source attached.
Any comments/suggestions/ideas would be appreciated.
Cheese - Mon Apr 05, 2010 1:19 am
Post subject:
to do list:
fix arena change bug
add aseta/ageta/adir
Cheese - Sun Apr 11, 2010 2:26 am
Post subject:
fixed all entries in the above post

new features added!
files updated


PS:
after a week or two of having the code correct for ?adir and having it not work properly, i discovered that the files code in win32compat.h should be commented out and not be used by anyone.
Instead, the Dirent.h header file should be used.
Dr Brain - Sun Apr 11, 2010 9:31 am
Post subject:
dirent.h isn't a standard windows header. Also, arena -a has no problem with the win32compat.h code.

P.S. If you don't file a bug report it never happened.
Cheese - Sun Apr 11, 2010 12:40 pm
Post subject:
dont worry, its on my ever growing list of bugs which i will eventually do something with


edit:

actually, ?arena -a DOES use the dirent.h header, or it would not work, which is why the wincompat header needs to be changed.
Cheese - Tue Apr 13, 2010 6:05 pm
Post subject:
fixed small yet major bug in the permissions logic, grab a new copy if your timestamp is older than this post.

files updated.
Cheese - Tue Jun 29, 2010 3:50 am
Post subject:
the name_>: bug fix will be added next reload.

unfixed bug: currently displays strange behavior when dealing with publics, due to publics being handled differently by ASSS
Cheese - Thu Jan 20, 2011 4:15 am
Post subject:
Cheese wrote:

PS:
after a week or two of having the code correct for ?adir and having it not work properly, i discovered that the files code in win32compat.h should be commented out and not be used by anyone.
Instead, the Dirent.h header file should be used.

edit:
actually, ?arena -a DOES use the dirent.h header, or it would not work, which is why the wincompat header needs to be changed.



this was incorrect.
i now know what was going on, at that time i didnt know i was supposed to compile wincompat.c into my binary


updates:
fixed every bug, these should be 100% stable and cross platform now
fixed a few memory leaks
combined the two dlls into one
added another capman constant
removed a hack

to do:
add file parsing to quickfix for custom cfg, and a way to remove useless settings like turf


if your copy of either of these two files is older than this post, you need to update your files, unless you like your processor catching on fire
when updating, delete quickfix.dll and change modules.conf from quickfix:quickfix to files:quickfix

new features added!
files updated
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group