Resource icon

[Reusable] Juggy's Jug of Tools 0.6.1

This thread contains content that may be reused, modified, or ported by anyone.

JugadorXEI

Sometimes codes for fun
Juggy's Jug of Tools

Juggy's Jug of Tools is a collection of (mostly admin) commands, for both SRB2 and Kart, meant to help make the chatting experience better and more.

This is an early release because I feel really confident with what I have done right now, and I would appreciate feedback on these features so far.


Individual Player Muting
A feature of this mod involves players being able to disallow another player's messages to reach them - a more traditional mute feature similar to other games. This is done by using the "muteplayer" or "playermute" command, followed by a name, or a node number (with #0, #1, etc...)
This feature is disabled by default. In order to enable it, set "jug_mute_enabled" to On
The console variable "jug_mute_immunity", which is enabled by default, controls if admins can be muted by players.
In addition, if you want to see who you have muted right now, "mutelist" will tell you. As an admin, you can also target "mutelist" (e.g. "mutelist Player") to see who they have muted themselves.
attachment.php


Shadow Mute
Players, specially in Kart, can get really salty. Although throwing all of your salt at the chat can be a therapeutic experience, a lot of players simply do not want to deal with it, as it can drag the mood down. "shadowmute [name or node]" is an admin tool that makes it so such a player is automatically muted by everyone, but they will still be able to read their own messages, making them think they are being listened to. It can be toggled on and off when needed. To see who's currently shadowmuted, the command "mutelist" will display a list of such players.
The console variable "jug_shadowmute_immunity", which is enabled by default, controls if admins can be shadowmuted. On by default.
The console variable "jug_shadowmute_adminread" allows admins to read shadowmuted players. They can still mute these players if they don't wish to read them at all. On by default.
The console variable "jug_logging_shadowmute" logs shadowmuted players' messages into the console. On by default.

Force Respawn
No map is perfect - which is why "forcerespawn [name or node]" exists, allowing admins to indeed do just that. Indicate a name or node number as a parameter, and players will be forced to respawn at their latest checkpoint.
Very useful for SRB2 in particular, as it does not have a respawn command, and in Kart, it covers situations where players could get softlocked, such as in the air through wind sectors in custom maps.
When someone is forced to respawn in SRB2, a life won't be deducted.
attachment.php


Rainbow Chat
A half-flavor, half-useful feature, that involves admins (by default) being able to coat their messages through all manner of pretty colors, using "rainbow [text]" (or "rainbowsay [text]", if you prefer).
It's possible to toggle on their usability by everyone by setting "jug_rainbow_everyone" on, but bear in mind that it could become an eyesore if abused by normal players. When this happens, the whole server will be notified.
It is also possible to toggle rainbow chat functionality to individual users, through "giverainbow [name or node]". This gives players a functionality similar to Hostmod's shout feature, and can be particularly useful if you want players to listen to someone in particular, without giving such person admin powers.
attachment.php



Map Configuration Files
When "jug_mapconfigs_enabled" is set to On, the server will load a config file matching the map's extended map number, e.g. "MAPXX.cfg", and when it ends, it will load a config file named like "MAPXX_end.cfg". You may put these config files inside a folder if you wish. This is a very versatile feature, allowing you to enable certain gamemodes, change addon variables and more!

attachment.php


Miscellaneous Features
You can use "forcecolor" and a number or a color name to force everyone to use a color, akin to "forceskin". If you ever wanted to force a particularly horrid palette in SRB2 or host Green Wonder Boy parties in Kart, now you can!

It is possible to greentext by starting a message with ">"! Admins can do this by default - in order to enable this behavior to everyone, "jug_greentext_enabled" must be set to On. In order to disable it for admins as well, "jug_greentext_admins" should be set to Off.

A lot of these features are logged in their usage. If you think this is annoying, you may disable logging by setting "jug_logging" to Off.

Targetted commands consider capitalized characters for precise targetting. If you think this is too annoying, you may set "jug_targetting_loose" to On, which will disregard capitalization in names.


More to Come!
I am still working on many useful features. I am releasing my mod now so players and admins alike can take advantage of its features so far.

I would like to thank SSF123, Tiny Plume, Archdiggle, Mustard, TWL9 and MooTheChao for helping me test my mod, and Callmore for giving me pointers on how SRB2's custom colors work among lots of things.

Please enjoy!

Changelogs:
v0.6.1 Changelog - Link
v0.6 Changelog - Link
v0.5 Changelog - Link
v0.4.1 - First Release
 

Attachments

  • unknown.png
    unknown.png
    13.4 KB · Views: 2,237
  • mutedemo.png
    mutedemo.png
    73.2 KB · Views: 2,289
  • saynotoGBJs.gif
    saynotoGBJs.gif
    4.6 MB · Views: 2,416
  • rainbowevent.png
    rainbowevent.png
    55.6 KB · Views: 112
  • mapconfigs.png
    mapconfigs.png
    17.5 KB · Views: 1,599
Last edited:

D00D64

Probably Responsible
Moderator
Judge
Welcome to releases!

Yes, I know this is in SRB2 mods, but it works for both SRB2 and Kart, so into the SRB2 section it goes.
 

JugadorXEI

Sometimes codes for fun
v0.5 has been released! Here's what's new:

General:
  • New: "forcecolor"! Set a color name or color index to force everyone in the server to use your favourite color. Set it to "None" or "-1" when you're done!
  • New: "mutelist"! See who you have muted. As an admin, you can also see who is shadowmuted, and can be targetted to see who did other players mute.
  • New: "jug_logging", which will log admin actions related to the addon to the server host. On by default - consider disabling this if you're hosting a listen server.
  • New: "jug_targetting_loose", which, if enabled, all targetted commands will not consider capitalization in their names. Off by default.
  • Console variables are now standarized and follow a "jug_[commandname]_[feature]" pattern:
    • "jug_caneveryonerainbow" is now "jug_rainbow_everyone"
    • "jug_muteimmunity" is now "jug_mute_immunity"
    • "jug_shadowmuteimmunity" is now "jug_shadowmute_immunity"
  • Fixed dedicated server's chat messages being overriden, causing really weird chat messages.
  • Fixed chat logs not being logged by the server.
  • Fixed players joining in voting or intermission having their and other people's chat messages be invisible.

Mute changes:
  • New: "jug_mute_enabled" now controls if "muteplayer" can be used. Off by default - it is up to the server owner to toggle this on.

Shadowmute changes:
  • New: "jug_logging_shadowmute" controls if shadowmuted messages should get sent to the server console/host. On by default.
  • New: "jug_shadowmute_adminread" controls if shadowmuted messages should get sent to admins. On by default.
    • Note that admins can still mute shadowmuted players to prevent messages from being sent to them at all.

Thank you everyone who helped me test v0.5! Have fun!
 

JugadorXEI

Sometimes codes for fun
v0.6 has been released! Here's the changelog:

  • New: The addon has been packed into a .pk3 (making it go from ~30KB to 13KB), and has been internally split and organized into different .lua files, which will help me deliver new features quicker in the long run.
  • New: You can now >greentext! Setting "jug_greentext_enabled" to "On" enables this for everyone. Admins can greentext by default, but it can be disabled by setting "jug_greentext_admins" to "Off" ("jug_greentext_enabled" still takes precedence).
  • New: Map configuration load automation (now say that 5 times really fast)! If "jug_mapconfigs_enabled" is "On", the server will load a "MAPXX.cfg" file when the map loads, and a "MAPXX_end.cfg" when the map is switched to another one.
  • Fixed: y/n/idc messages will now be hidden if a HOSTMOD vote is active.
  • Fixed a bug in SRB2 related to the chat hook throwing an error on map change.
  • Changed code to address new color changes in SRB2 2.2.7 RC1. Retrocompatibility with 2.2.6 is still maintained.
  • Optimized "forcecolor" logic.
Please enjoy!
 
Quick question:

Didn't get a chance to mention it back then, but .4 had an issue where chat messages weren't being recorded in log.txt. Does the current revision fix that?
 

JugadorXEI

Sometimes codes for fun
Quick question:

Didn't get a chance to mention it back then, but .4 had an issue where chat messages weren't being recorded in log.txt. Does the current revision fix that?


It's been fixed since v0.5. Shadow muted messages should also get properly logged as well.
 

JugadorXEI

Sometimes codes for fun
Released a hotfix, v0.6.1, that fixes chat sometimes hiding messages if joining during intermission... again. I fully encourage upgrading to v0.6.1 whenever possible.
 
Hey! Just want to let you know that this addon seems to break the /me <text> feature, rendering it no longer working. I am unsure if you are already aware or not, but in case you are not, here you go.

Great job on the addon by the way. I especially like the >greentext feature!
 
Found another bug (or conflict?) that was caused by this addon. Just once again posting for acknowledging purposes, not sure if you still manage this old addon.

When this addon is enabled, typing hostmod commands like rtv and y for voting gets broadcasted into the chat, where normally this does not happen. I have demonstrated it in this short video:

For 'y' or 'n' voting, only the very last vote gets broadcasted.
 

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Top