Raised This Month: $32 Target: $400
 8% 

Ban disconnected players


Post New Thread Reply   
 
Thread Tools Display Modes
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 08-18-2010 , 16:40   Re: Ban disconnected players
Reply With Quote #11

Quote:
Originally Posted by mad_hamster View Post
Yes, but this doesn't work when listening to the disconnection event since the client is gone by then, so I check its steam id, if it doesn't start with "STEAM_" then it's not a human.
Should work fine for event too. Client still on the server when event fires.
__________________
For admins: My plugins

For developers: Colors library
exvel is offline
Send a message via ICQ to exvel
mad_hamster
Member
Join Date: Nov 2009
Old 08-19-2010 , 07:04   Re: Ban disconnected players
Reply With Quote #12

Quote:
Originally Posted by exvel View Post
Should work fine for event too. Client still on the server when event fires.
Right. My bad. I looked at the incorrect event and tried accessing the "index" property which returned 0. Now checking IsFakeClient(). Thanks.
mad_hamster is offline
mad_hamster
Member
Join Date: Nov 2009
Old 08-19-2010 , 07:09   Re: Ban disconnected players
Reply With Quote #13

Quote:
Originally Posted by Antithasys View Post
How is this plugin any different than this:
http://forums.alliedmods.net/showthread.php?t=97051
As I wrote in the OP: I made this plugin primarily to fix a couple of issues I was having with the Too Late To Ban plugin, namely:
  • Admin needed RCON flag to ban disconnected players
  • Admin immunities were not respected
Also, this plugin's implementation is cleaner and more maintainable.
mad_hamster is offline
Cuz
Senior Member
Join Date: May 2007
Location: Alaska
Old 08-20-2010 , 01:02   Re: Ban disconnected players
Reply With Quote #14

Code:
L 08/19/2010 - 19:36:34: SourceMod error session started
L 08/19/2010 - 19:36:34: Info (map "koth_harvest_event") (file "errors_20100819.log")
L 08/19/2010 - 19:36:34: [SM] Native "IsFakeClient" reported: Client index 0 is invalid
L 08/19/2010 - 19:36:34: [SM] Displaying call stack trace for plugin "ban_disconnected.smx":
L 08/19/2010 - 19:36:34: [SM]   [0]  Line 38, /home/groups/alliedmodders/forums/files/6/3/7/7/5/71779.attach::OnEventPlayerDisconnect()
L 08/19/2010 - 19:36:34: [SM] Native "IsFakeClient" reported: Client index 0 is invalid
L 08/19/2010 - 19:36:34: [SM] Displaying call stack trace for plugin "ban_disconnected.smx":
L 08/19/2010 - 19:36:34: [SM]   [0]  Line 38, /home/groups/alliedmodders/forums/files/6/3/7/7/5/71779.attach::OnEventPlayerDisconnect()
L 08/19/2010 - 19:36:34: [SM] Native "IsFakeClient" reported: Client index 0 is invalid
L 08/19/2010 - 19:36:34: [SM] Displaying call stack trace for plugin "ban_disconnected.smx":
L 08/19/2010 - 19:36:34: [SM]   [0]  Line 38,
TF2
SM v1.3.2
MM v1.9.0-devV
Cuz is offline
Danny_l4d
Senior Member
Join Date: Feb 2010
Old 08-20-2010 , 05:02   Re: Ban disconnected players
Reply With Quote #15

I this also possible to make it compattible with sourcebans, I now can ban the player but the name of this player(s) isnt show?
__________________
Danny_l4d is offline
NaRyan
Member
Join Date: Jan 2010
Location: United Kingdom
Old 08-21-2010 , 21:47   Re: Ban disconnected players
Reply With Quote #16

I added this to my GMOD server (TTT server) today to replace TLTB as I did not like the idea of having to give my admins rcon access..

However in the Disconnected player list it is showing all disconnected players twice.

GMOD
SM v1.3.4
MM v1.8.3V
__________________


Last edited by NaRyan; 08-21-2010 at 22:37.
NaRyan is offline
mad_hamster
Member
Join Date: Nov 2009
Old 08-23-2010 , 06:34   Re: Ban disconnected players
Reply With Quote #17

Quote:
Originally Posted by NaRyan View Post
I added this to my GMOD server (TTT server) today to replace TLTB as I did not like the idea of having to give my admins rcon access..

However in the Disconnected player list it is showing all disconnected players twice.

GMOD
SM v1.3.4
MM v1.8.3V
Quote:
Originally Posted by Cuz View Post
Code:
L 08/19/2010 - 19:36:34: SourceMod error session started
L 08/19/2010 - 19:36:34: Info (map "koth_harvest_event") (file "errors_20100819.log")
L 08/19/2010 - 19:36:34: [SM] Native "IsFakeClient" reported: Client index 0 is invalid
L 08/19/2010 - 19:36:34: [SM] Displaying call stack trace for plugin "ban_disconnected.smx":
L 08/19/2010 - 19:36:34: [SM]   [0]  Line 38,  /home/groups/alliedmodders/forums/files/6/3/7/7/5/71779.attach::OnEventPlayerDisconnect()
L 08/19/2010 - 19:36:34: [SM] Native "IsFakeClient" reported: Client index 0 is invalid
L 08/19/2010 - 19:36:34: [SM] Displaying call stack trace for plugin "ban_disconnected.smx":
L 08/19/2010 - 19:36:34: [SM]   [0]  Line 38,  /home/groups/alliedmodders/forums/files/6/3/7/7/5/71779.attach::OnEventPlayerDisconnect()
L 08/19/2010 - 19:36:34: [SM] Native "IsFakeClient" reported: Client index 0 is invalid
L 08/19/2010 - 19:36:34: [SM] Displaying call stack trace for plugin "ban_disconnected.smx":
L 08/19/2010 - 19:36:34: [SM]   [0]  Line 38,
TF2
SM v1.3.2
MM v1.9.0-devV
Hmm... looks like irregularities in Sourcemod events. The disconnection event is supposed to fire just once, while the client is still connected. I filed a bug at https://bugs.alliedmods.net/show_bug.cgi?id=4587
mad_hamster is offline
Cuz
Senior Member
Join Date: May 2007
Location: Alaska
Old 08-23-2010 , 22:13   Re: Ban disconnected players
Reply With Quote #18

Quote:
Originally Posted by mad_hamster View Post
Hmm... looks like irregularities in Sourcemod events. The disconnection event is supposed to fire just once, while the client is still connected. I filed a bug at https://bugs.alliedmods.net/show_bug.cgi?id=4587
Per the reply at your Bug post SM is the only mod I run there is no ES_Tools.
Cuz is offline
mad_hamster
Member
Join Date: Nov 2009
Old 08-25-2010 , 07:54   Re: Ban disconnected players
Reply With Quote #19

Ok, I reverted back to the method of checking the client's steam ID for "STEAM_" prefix, since IsFakeClient() is not guaranteed to work when the event is triggered. I also check for duplicate disconnection events. Hope it'll work correctly for all mods now.
mad_hamster is offline
Cuz
Senior Member
Join Date: May 2007
Location: Alaska
Old 08-26-2010 , 00:55   Re: Ban disconnected players
Reply With Quote #20

Quote:
Originally Posted by mad_hamster View Post
Ok, I reverted back to the method of checking the client's steam ID for "STEAM_" prefix, since IsFakeClient() is not guaranteed to work when the event is triggered. I also check for duplicate disconnection events. Hope it'll work correctly for all mods now.
No Errors ...

Rock ON, great tool, Thanks !
Cuz is offline
Reply


Thread Tools
Display Modes

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 09:44.


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