[ANY] Voice Enforcement
1 Attachment(s)
What is this? It sounds Evil! D:!
Basically what this plugin does is allows countries on a White list to talk on their microphone. If the client is not in the said countries, they're not allowed to talk. Yes, it is Evil to a certain extent, but childish players leave some of us with no option D:! Why would you make this :< The inspiration for the plugin came around when we started having random people from other countries joining and just screaming and swearing into their microphone. Not caring if they're banned or not. After I saw Psychonic's "Mute the Canucks/Msleeper" joke plugin that didn't function. I thought what the hell. Gave it a whirl, then just like that, the screaming was gone. Sounds... kind of cool. How would I add countries to the list? Well, first you'd find what the Country Code is for the Country that you want to Blacklist/Whitelist by going here: http://www.uspto.gov/patft/help/helpctry.htm (I use this, you don't have to). Then you'd have to make a list, an example would be sm_voicelist "US, CA, SE, AF, GN, UA" But I don't want to Whitelist countries, I want to Blacklist them! Cool. Just set sm_voicetoggle to 1 and away you go. I'm inside of a whitelisted country, but SourceMod doesn't recognize me and mutes me anyways. The GeoIP database is no where near complete. I'm personally using the MaxMind database which seems to have a lot more entires in it, and appears to be more accurate. Entries are still missing from it, though. Well... I took a look at your Source and noticed you're using a statically set string array. Why don't you use X or Y instead? To be perfectly honest, show me how and I'll move over to it. I spent all of 15minutes making this kind of user friendly, then an hour or so scratching my head wondering why it was only checking one array and not the others (while annoying the hell out 40 or so innocent clients getting printouts while playing). Then I found this which reminded me that if I made a String:Meh[9999999] or someone silly did in IRC a while back. I'd be sitting on a bigger binary which would save stack space to allocate data into the string. You cannot dynamically change the size of an array and or string. Where's your Public CVAR @:< There's no need for it, load it or don't. Stats don't really matter, especially for something like this. tl;dr sm_voicelist = Country list, separated by a simple comma. (,) sm_voicetoggle = Changes from a whitelist to a blacklist. 0 for the Whitelist functionality, 1 for the Blacklist functionality. sm_voicelevel = Command string used to check if the client has authorization or not to bypass the check. At the moment this is set to the reservation flag. As requested, you may change it using admin_overrides.cfg |
Re: [ANY] Voice Enforcement
thats pretty usefull plugin,
thank you |
Re: [ANY] Voice Enforcement
Some suggestions to make it infinitely more useful to more people without it having to be edited first:
|
Re: [ANY] Voice Enforcement
something more on your wishlist?
lol |
Re: [ANY] Voice Enforcement
Quote:
|
Re: [ANY] Voice Enforcement
What about you use ExplodeString on sm_voicelist with just a comma, then trim the spaces?
|
Re: [ANY] Voice Enforcement
Quote:
Quote:
Also, your buffer is too small on line 63 Code:
decl String:IPAddress[16], String:CC[2]; |
Re: [ANY] Voice Enforcement
Quote:
Quote:
Prototype-ish, I haven't tested it yet but I've fixed at least three other issues. Will update the main once LimeStone fixes my IPMI issue. EDIT: Thought about it in the shower. |
Re: [ANY] Voice Enforcement
Has a fault tolerance of up to four spaces, fixed some other issues with it and fully tested.
Updated the OP. EDIT: Psychonic told me how to handle this a bit better, updated again to 1.6. |
Re: [ANY] Voice Enforcement
Had some useless code left over from the previous method change.
1.6b is up. |
All times are GMT -4. The time now is 13:45. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.