PDA

View Full Version : Connecting sm_voteban to Sourcebans


Werewolf_UK
10-07-2012, 15:10
How do you connect sm_voteban to Sourcebans? At the moment, we are having to copy the players details over and re-ban manually.

Dr. McKay
10-07-2012, 23:12
This should work.

Werewolf_UK
10-08-2012, 14:57
Thanks, how exactly do I configure this? I placed the plugin in the folder, but nothing happened when I tested it (I votebanned myself)

Dr. McKay
10-08-2012, 14:58
Thanks, how exactly do I configure this? I placed the plugin in the folder, but nothing happened when I tested it (I votebanned myself)

It should work as-is. Are you using the stock basevotes sm_voteban?

Werewolf_UK
10-08-2012, 15:09
I believe so, its the only voteban thing we have. Even after restarting the server it does not work.

Dr. McKay
10-08-2012, 15:10
I believe so, its the only voteban thing we have. Even after restarting the server it does not work.

Anything in your error logs?

Werewolf_UK
10-08-2012, 15:39
Nope, nothing in error logs

Dr. McKay
10-08-2012, 16:09
Nope, nothing in error logs

Well, I've looked at the source of basevotes, and it should work fine.

When you're banned/kicked, are you able to rejoin the server, or do you have to unban yourself first?

Werewolf_UK
10-08-2012, 16:43
When you're banned/kicked, are you able to rejoin the server, or do you have to unban yourself first?I've not tried re-connecting immediately, I've been un-banning myself before rejoining.

Suddenly it seems worth mentioning that although I have been using !voteban @me in game, I've been unbanning myself by deleting the ban in my HLSW bans list. Might that have something to do with it?

Dr. McKay
10-08-2012, 16:44
I've not tried re-connecting immediately, I've been un-banning myself before rejoining.

Suddenly it seems worth mentioning that although I have been using !voteban @me in game, I've been unbanning myself by deleting the ban in my HLSW bans list. Might that have something to do with it?

If my plugin is intercepting the ban at all, it should be preventing the server itself from banning you. It looks like OnBanClient isn't being fired for whatever reason.

Werewolf_UK
10-08-2012, 16:49
Just tested votebanning myself then tried to rejoin, I was sucessfully banned.

Dr. McKay
10-08-2012, 16:53
I just updated the plugin earlier in the thread, try it now.

Werewolf_UK
10-08-2012, 17:25
Re-downloaded both files, and uploaded both to the proper respective folders. Restarted the server, connected and votebaned myself.

I now have 81 separate, 5-minutes bans, all issued at the same time! They all also list our servers website as the ban reason, not "Banned by Vote"

EDIT: Correction, one of the bans was for 30 minutes, but I only noticed it as I was mass-deleting the bans and didn't get a chance to check its listed reason

Dr. McKay
10-08-2012, 19:38
Re-downloaded both files, and uploaded both to the proper respective folders. Restarted the server, connected and votebaned myself.

I now have 81 separate, 5-minutes bans, all issued at the same time! They all also list our servers website as the ban reason, not "Banned by Vote"

EDIT: Correction, one of the bans was for 30 minutes, but I only noticed it as I was mass-deleting the bans and didn't get a chance to check its listed reason

I see absolutely no reason why this should happen, unless the server itself was banning you 81 times.

Werewolf_UK
10-09-2012, 13:32
At first I thought I could have been some kind of backlog from previous times I had been votekicked/banned because I've often used those commands on myself when testing.

However I just used voteban on 2 other players and both of them had 81 extra bans. I'm going to remove the plugin for now, but I hope this can get fixed soon

melaf
09-13-2013, 04:17
http://savepic.org/4487553.png

Potatofactory
10-16-2013, 07:10
This should work.
I tried this and it spams the ban a huge amount of times

Walliski
10-19-2013, 08:10
Wild guess since I am in no way a Sourcemod plugins developer: The sourcebans plugin also calls a function named BanClient, which means that when you ban a client with the plugin, the plugin will trigger itself?

Werewolf_UK
12-28-2013, 12:42
I thought I'd give this another try with latest SourceBans and SourceMod.

I get this:L 12/28/2013 - 17:33:46: [SM] Plugin encountered error 8: Not enough space on the stack
L 12/28/2013 - 17:33:46: [SM] Displaying call stack trace for plugin "sourcebans.smx":
L 12/28/2013 - 17:33:46: [SM] [0] Line 2294, D:\scripting\sourcebans.sp::UTIL_InsertBan()
L 12/28/2013 - 17:33:46: [SM] [1] Line 2274, D:\scripting\sourcebans.sp::CreateBan()
L 12/28/2013 - 17:33:46: [SM] [2] Line 2389, D:\scripting\sourcebans.sp::PrepareBan()
L 12/28/2013 - 17:33:46: [SM] [3] Line 2198, D:\scripting\sourcebans.sp::Native_SBBanPlaye r()
L 12/28/2013 - 17:33:46: [SM] Plugin encountered error 8: Not enough space on the stack
L 12/28/2013 - 17:33:46: [SM] Native "SBBanPlayer" reported: Error encountered while processing a dynamic native
L 12/28/2013 - 17:33:46: [SM] Displaying call stack trace for plugin "sourcebans_listener.smx":
L 12/28/2013 - 17:33:46: [SM] [0] Line 21, /home/groups/alliedmodders/forums/files/1/5/0/8/4/5/110631.attach::OnBanClient()

DJ Tsunami
12-29-2013, 20:20
SBBanPlayer eventually calls banid, which calls OnBanClient again, causing an infinite loop. I think it should be more along these lines:


public Action:OnBanClient(client, time, flags, const String:reason[], const String:kick_message[], const String:command[], any:source) {
if(StrEqual(command, "banid")) {
return Plugin_Continue;
}
if(source < 0 || source > MaxClients) {
return Plugin_Continue;
}
if(source > 0 && (!IsClientInGame(source) || GetUserAdmin(source) == INVALID_ADMIN_ID)) {
return Plugin_Continue;
}

SBBanPlayer(source, client, time, reason);
return Plugin_Handled;
}

Snaggle
12-31-2013, 19:17
With that I get this.
L 01/01/2014 - 00:16:15: [SM] Native "IsClientInGame" reported: Client index 0 is invalid
L 01/01/2014 - 00:16:15: [SM] Displaying call stack trace for plugin "sourcebans_listener.smx":
L 01/01/2014 - 00:16:15: [SM] [0] Line 22, E:\Documents\Tools\Sourcemod\scripting\source bans_listener.sp::OnBanClient()

verodir
03-11-2014, 01:39
hey guy's is here some progress fore this ??? i ghet a ban for 5min voor 65 time's plz some very smart dude's

check this fore us

kind regard

verodir

Potatofactory
11-24-2014, 17:26
hey guy's is here some progress fore this ??? i ghet a ban for 5min voor 65 time's plz some very smart dude's

check this fore us

kind regard

verodir

Can't tell if this is a troll or not

Allower
02-28-2016, 13:00
Hi DJ Tsunami (https://forums.alliedmods.net/member.php?u=34668)

Do you help me with how to fix this?

http://cs633329.vk.me/v633329634/14a84/7LlqJYX-YK0.jpg