• CAT - Cats' Administration Tools
    48 replies, posted
[QUOTE=Lolcats;44682884]There's no SQL support for this so far. Everything is basically written into files in data.[/QUOTE] Please make sure you do not store EVERY SINGLE USER in this file. ULX does this. Every user that joins gets the usergroup "User" assigned. Quite pointless, why'd you write information that's applied to every user into a file? That's wasting performance on nothing. So, I hope you didn't do this. Still, if you add MySQL support, ranks are shared among servers, but in my opinion I think you should drop the whole .txt file idea completely and use .sql. I hardly know anyone who'd edit the .txt files manually. [QUOTE=Lolcats;44682884]I get what you're saying about the whole "Fun" commands thing, but if you really look at it, the average maturity level of certain server owners/admins isn't high. If I were to release an admin mod with 0 additional commands, just Kick, Ban, Unban, and other strictly administrative functions, it wouldn't garner as much support among communities. Of course, this is just me talking about my experience with Garry's Mod communities. (Also, is that Cockwork and all of it's derivatives for free from a GSP? That's... interesting if it is that way...)[/QUOTE] I understand that most of the Garry's Mod players are immature, but there is no actual admin mod that just offers what it has to offer. You can be that. It annoys me that when I restrict all the "fun" commands from my admins on my server, they keep bugging me "Can I please have maul back?" or "Can I please have whip back?". The commands offer nothing. They will not make users stop what they are doing, it will most of the time encourage them to continue because they like to fly around in the air another 100 times. Even though you are trying to get as many people as possible to use your admin mod, but I don't think you have to lower yourself to a level where you implent "fun" commands for the 10 year olds that own a server.
I write users to a text file, but only temporarily. Its deleted after they leave. Only ranks given are saved.
[QUOTE=Lolcats;44687129]I write users to a text file, but only temporarily. Its deleted after they leave. Only ranks given are saved.[/QUOTE] That's indeed a better approach. Though, why write users to a file while removing them after they leave? Can't you just store them in a Lua table? Do you really have to write them to a text file for that?
[QUOTE=Cyberuben;44687630]That's indeed a better approach. Though, why write users to a file while removing them after they leave? Can't you just store them in a Lua tale? Do you really have to write them to a text file for that?[/QUOTE] Think if it though once alot of people join that table will broom huge and take up just as much space and use the same amount of performance as ulx. I feel that users should not be written down in any way.
Thanks this will be useful
[QUOTE=Baby Weiner;44690598]Think if it though once alot of people join that table will broom huge and take up just as much space and use the same amount of performance as ulx. I feel that users should not be written down in any way.[/QUOTE] I'm 100% sure that reading a file from harddisk is way slower than adding people to a table which is stored in memory. We're talking about amount of clockcycles here, but still.
[QUOTE=Cyberuben;44694047]I'm 100% sure that reading a file from harddisk is way slower than adding people to a table which is stored in memory. We're talking about amount of clockcycles here, but still.[/QUOTE] Won't the table get reset on map change, though? And to OP, why not contain all functions in a table CAT instead of doing CAT_functionname ?
[QUOTE=HumbleTH;44694943]Won't the table get reset on map change, though?[/QUOTE] Not sure, I have only recently started in Lua. Though, no matter what language, reading from the harddisk is always slower than reading from memory. You could always write something that converts the table into a string, write that to a file, reload the map, open file and insert it into a table again. As easy as that, at least, this should be possible.
[QUOTE=Lolcats;44687129]I write users to a text file, but only temporarily. Its deleted after they leave. Only ranks given are saved.[/QUOTE] You don't need to store users, you could just check if the player is any of the ranks. If the player isnt any of the ranks they must be a user, so then you don't need to save .txt files of users plus I was reading over your code on [URL="https://github.com/LolcatsV2/CATpublic/blob/master/catv1/lua/cat_core.lua#L243"]github[/URL]. I don't think the "PlayerDisconnected" hook gets called if the server crashes, so with out the player rejoining after the crash and disconnecting the file wont delete its self.
Honestly you should just simplify things and instantly commit changes to any users/ranks instead of dealing with disk caching in the first place. What ever performance benefits you're trying to achieve with your caching system will be totally nullified by the added layer of complexity + hardware delays.
[QUOTE=Mors Quaedam;44683833]ULX re-writes the hook library to give itself priority. They've written functions for the sake of writing functions. (ULib.FileWrite(), anyone?) [/QUOTE] We re-wrote hooks because we tired of ULX breaking due to 12 year olds not understanding how to return data. ULib.FileWrite() was written because we were tired of changing EVERY SINGLE file API call when Garry got the whim to change it up every six months.
[QUOTE=Megiddo;44828966]We re-wrote hooks because we tired of ULX breaking due to 12 year olds not understanding how to return data. ULib.FileWrite() was written because we were tired of changing EVERY SINGLE file API call when Garry got the whim to change it up every six months.[/QUOTE] Why aren't you taking responsibility for your shitty mod? Your mod is the only addon on GMod which rewrites the hook library.
[QUOTE=Megiddo;44828966]We re-wrote hooks because we tired of ULX breaking due to 12 year olds not understanding how to return data. ULib.FileWrite() was written because we were tired of changing EVERY SINGLE file API call when Garry got the whim to change it up every six months.[/QUOTE] So you should give your admin mod priority because of rookie coding mistakes? No other admin mod does this and they seem to work just fine.
[QUOTE=code_gs;44832809]So you should give your admin mod priority because of rookie coding mistakes? No other admin mod does this and they seem to work just fine. [/QUOTE] [QUOTE=Mors Quaedam;44832691]Your mod is the only addon on GMod which rewrites the hook library.[/QUOTE] I don't think you realize how much Garry's Mod has improved for developers now that GM13 has been released for some time. A good portion of ULX's codebase comes from ULX 3.0, which was [URL=http://forums.ulyssesmod.net/index.php/topic,619.0.html]released on Jan 2007[/URL] to update ULX from GM9 to GM10. [QUOTE=Mors Quaedam;44832691]Why aren't you taking responsibility for your shitty mod?[/QUOTE] We took responsibility of our admin mod back in '07 and addressed the [URL=http://forums.ulyssesmod.net/index.php/topic,1179.0.html]numerous[/URL] [URL=http://forums.ulyssesmod.net/index.php/topic,693.0.html]issues[/URL] [URL=http://forums.ulyssesmod.net/index.php/topic,1169.0.html]people kept[/URL] [URL=http://forums.ulyssesmod.net/index.php/topic,1069.0.html]having[/URL] from some addons that felt like they needed to return false on their chat hooks (among other things). So, in [URL=http://forums.ulyssesmod.net/index.php/topic,1130.0.html]August 2007[/URL], Megiddo simply took [URL=https://github.com/garrynewman/garrysmod/blob/master/garrysmod/lua/includes/modules/hook.lua]Garry's existing hook library[/URL] and added a [URL=https://github.com/Nayruden/Ulysses/blob/master/ulib/lua/ulib/shared/hook.lua#L89]fourth parameter to the Hook.add function[/URL]- a Linux-esque priority value between -20 and 20 that determines the order in which functions are called when a hook is triggered. If priority was not specified, it assumed the middle-ground of 0. The remaining functions were made backwards compatible. That's it. Nobody had any problems with it... until Garry began showing the entire call stack for Lua errors. Now whenever someone sees an error generated from their code that was called by a hook, they see the bottom most file on the call stack point to "ulib/lua/ulib/shared/hook.lua", which, as any good programmer would realize: OMGZOMG ULX IS BRRKKING MY CODE! IT OVERRIDES EVERYTHING IT"S EVERYWHERE11one! *sigh* I will state this now- [B]In the 6 years that we've had this modification of the Hook library, I have seen no proof that it specifically has caused any performance degradation or has broken anyone's code.[/B] If you have undeniable proof that it has, then PM me or Megiddo so we can get it fixed. Complaining incessantly about it is not helpful, and is really annoying to us. I'm not arguing that ULX isn't in need of improvements- its age is definitely showing and it's due for an overhaul (It's been through 2 overhauls since the first ULX version was released 9 years ago), but free time for such a huge task is more of a highly-sought rarity now that we have more real-world responsibilities. [B]To prevent further derailment of this thread, please respond to this post in [URL=http://facepunch.com/showthread.php?t=1390137]a different thread[/URL], or you can PM me directly.[/B] [QUOTE=Lolcats;44682884]In response to a few of your replies: I didn't realize how, uh, slightly widespread ULX was disliked. ULX is good at what it does, which is being an admin mod. I've ran about 4 servers with ULX, and it served it's purpose, fairly bug free. The only reason I say I disliked it is because I personally find the menu cluttered. I never really got too far into modding around with ULX, so I couldn't really speak on the technical aspects of it.[/QUOTE] I wish I could tell you why people are so vocal about disliking it- All I mainly see are complaints that are hard for us to reproduce, or without any suggestions of improvements. Oh well, it is what it is. Good luck with your admin mod, mate! :) And bravo on it being your first release! I love seeing earnest developers learning the ropes and getting valuable experience. People tend to be critical of every tiny thing, and demand you add every feature they want-- just make sure that you're making the admin mod you want it to be, and most importantly, that you're having fun while doing it! :)
[QUOTE=Stickly Man!;44854980] I will state this now- [B]In the 6 years that we've had this modification of the Hook library, I have seen no proof that it specifically has caused any performance degradation or has broken anyone's code.[/B][/QUOTE] Obliette's DBugR proved it. If you watch ULX, the amount of resources it takes up compared to the rest of lua scripts is absolutely ridiculous ULX needs to be entirely remade.
Thanks for the awesome mod! :) Hope you update it soon for the new update!
If there's something wrong with the mod I recommend you make an issue providing the errors and what doesn't work on the GitHub page.
wahahahaha why did this thread get bumped :v: I suppose it's nice that I give an update on what I've done with it I guess, even if there's only 3 or 4 people that use it. [B]What's New in CAT V 1.2[/B] - Screen capture now just sends the capture directly to the admin that called for it, rather than writing to a text file. It will still write the text file, for reference later (much neater though). - Included a prop protection (CPPI compliant). Completely up to you if you want to use it or not. FPP is leagues better. - Included a logger that logs a lot of server actions (works with DarkRP. Just disable FAdmin logging if you want your console spared.) - Simplified a lot of ranks. Now there's only User, Moderator, Staff, and Owner. VIP and stuff is dumb and usually only pertains to DarkRP. If you want VIP ranks, use FAdmin. - Chat commands! [sorta] Now there's chat commands for most of the commands; only complex stuff like ban and kick i didn't bother with because I'm lazy - Panic and Über Panic were added. Superadmin (owner) only by default. Panic freezes all colliding props, and Über Panic freezes EVERY prop on the map. - Observer Ban was added. Ban people slightly less harshly! No, I still haven't made this easily code-able. Sorry. If you have an understanding of Derma and Lua, then you can probably sort it out though. I know there are a lot of things I could improve on, but I don't really have the time right now. Again, wasn't expecting this to be bumped, but this is just a little update.
You say that, but I've been looking for a nice little, actively updated admin mod that works well, the panic modes seem pretty cool too, will be trying/keeping an eye on this
Sorry, you need to Log In to post a reply to this thread.