Raised This Month: $51 Target: $400
 12% 

[ANY] Threaded Mysql Bans


Post New Thread Reply   
 
Thread Tools Display Modes
rautamiekka
Veteran Member
Join Date: Jan 2009
Location: Finland
Old 01-25-2016 , 07:32   Re: [ANY] Threaded Mysql Bans
Reply With Quote #91

Quote:
Originally Posted by Jakeey802 View Post
It's just a warning you don't need to change it
You should, the plugin won't work when deprecations are removed.
__________________
Links to posts I received Karma from:
Big thanks to all who gave Karma
rautamiekka is offline
Send a message via ICQ to rautamiekka Send a message via AIM to rautamiekka Send a message via MSN to rautamiekka Send a message via Yahoo to rautamiekka Send a message via Skype™ to rautamiekka
juss
Senior Member
Join Date: Jan 2016
Old 01-25-2016 , 07:44   Re: [ANY] Threaded Mysql Bans
Reply With Quote #92

Quote:
Originally Posted by rautamiekka View Post
You should, the plugin won't work when deprecations are removed.
i compile with this error: warning 234: symbol "GetClientAuthString" is marked as deprecated: Use GetClientAuthId"

and it didnt worked too =) ... the original one seems working , but after a change default to mysqlbans.. it give me another error (sorry i cant provide now that error) ,cant because i replace it wit h original one and servers are field with players now.. maybe at some point later i post the other errro here,, so far original one working without errors, altough i didnt ban anyone yet =) everyone seems so innocent =)
juss is offline
Nerus
Senior Member
Join Date: Aug 2010
Location: Poland
Old 02-11-2019 , 10:44   Re: [ANY] Threaded Mysql Bans
Reply With Quote #93

Fixed: compiling warnings removed.
Attached Files
File Type: sp Get Plugin or Get Source (mysqlt_bans.sp - 381 views - 6.1 KB)

Last edited by Nerus; 02-11-2019 at 10:44.
Nerus is offline
Effeff
AlliedModders Donor
Join Date: Jan 2019
Location: discord: ff#0533
Old 02-06-2021 , 12:28   Re: [ANY] Threaded Mysql Bans
Reply With Quote #94

I wanted to try making a new syntax version. As I was working on it, I realized someone named ShadowMen already did it 6 years ago here: https://github.com/Zipcore/Threaded-MySQL-Bans

I did it anyway and added translations and more features.

1. Separate table for IP bans
2. Separate table for logging bans (disabled by default, enable in AutoExecConfig)
3. Separate table for logging unbans (disabled by default, enable in AutoExecConfig)

I've tested it on server for a bit, everything seems to work without problems.

If someone has ideas for better implementation, let me know I guess. For example, the words "minutes" and "permanent" are hardcoded into the ban reason. I don't know of a better way to do it.
Also, I wanted to use regex for detecting if the IP you enter is valid, but I couldn't figure out how to make it work so I just made a function and used ExplodeString + some comparisons instead.

edit: forgot to get rid of a printtochat.
edit2: replaced two instances of Format that were supposed to be Database.Format
Attached Files
File Type: txt mysqlt_bans.phrases.txt (1.1 KB, 93 views)
File Type: sp Get Plugin or Get Source (mysqlt_bans.sp - 121 views - 16.9 KB)

Last edited by Effeff; 03-24-2021 at 00:14.
Effeff is offline
ZeNite
Junior Member
Join Date: Feb 2021
Location: Portugal
Old 04-04-2021 , 14:14   Re: [ANY] Threaded Mysql Bans
Reply With Quote #95

If i ban a steamid through console or the anti cheat bans someone it doesnt get registered in mysql
ZeNite is offline
Effeff
AlliedModders Donor
Join Date: Jan 2019
Location: discord: ff#0533
Old 04-04-2021 , 16:41   Re: [ANY] Threaded Mysql Bans
Reply With Quote #96

Today I noticed that this plugin had been calculating the "time remaining" for non-permanent bans incorrectly.
Turns out, the person who made the one on the zipcore github from 6 years ago also noticed and fixed it. Maybe I should've just added functionality to that one after all, instead of editing from the original. Oh well.

The original uses: (now()-timestamp)/60

The version in the zipcore github link uses: TIMESTAMPDIFF(SQL_TSI_MINUTE, timestamp, CURRENT_TIMESTAMP)

The one I am using: TIMESTAMPDIFF(MINUTE, timestamp, now())

I believe there is no difference between the zipcore one and mine.

Re-posting the plugin and translation, although translation has not changed:
Attached Files
File Type: sp Get Plugin or Get Source (mysqlt_bans.sp - 209 views - 16.9 KB)
File Type: txt mysqlt_bans.phrases.txt (1.1 KB, 113 views)
Effeff is offline
klikk
Member
Join Date: Apr 2021
Old 09-03-2021 , 20:17   Re: [ANY] Threaded Mysql Bans
Reply With Quote #97

Quote:
Originally Posted by Adjo View Post
It doesn't provide support for that by default, I've quickly written a PHP script that should do this for you, and anyone else.

Should work, haven't got an install of this plugin though to test it.

Spoiler


You'll need to have the banned_user.cfg file in the same directory as the php script. You don't need to remove anything from the banned_user file (such as the banid text), the script automatically does this.
How can i use this code? sry am newbie
klikk is offline
Nightmare Pyro
Member
Join Date: Mar 2020
Location: Cedar Falls
Old 09-24-2022 , 21:15   Re: [ANY] Threaded Mysql Bans
Reply With Quote #98

I notice that this doesn't support the command by sm_addban to add offline steamid...
Nightmare Pyro is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:31.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode