Official Soldat Forums

Server Talk => Scripting Releases => Topic started by: Mighty on April 28, 2011, 04:13:06 am

Title: Punishments on HWID
Post by: Mighty on April 28, 2011, 04:13:06 am
Name: Punishments

Author: Mighty
Script version: 1.05
Server version: 2.6.5-275(legacy)
Release Date: 28.04.2011
Compile Test: Passed
Description:
Script allows to punish a player in a specified way for specific amount of time.
It has support for server crashes, instead of duration it checks if the expire date have passed.
/punishlist <snip> and /details X are now available for every player

Feel free to suggest new punishment types ;>


Command syntaxParameters   Description
/punish <ID> <type> <time> <reason>   
e.g. /punish 2 disarm 2d 15m for spam
<ID>: byte; <type>: See next table;
<time>: string e.g. 2d 3h 1m or 30m
<reason>: (optional) reason for punishment
   punishes a player for specified time
/punishhwid <HWID> <type> <time> <reason><HWID>: string; <type>: See next table;
<time>: string e.g. 2d 3h 1m or 30m
<reason>: (optional) reason for punishment
   punishes a HWID for specified time (in case a player has left the server)
/unpunish <PID><PID>: Punishment ID (in punishlist)   Removes specified punishment
/punishlist-   Shows all active punishments, their IDs, expire date, type
/punishlist <snip><snip>: ID ot nickname part   Shows all punishments put on a player
/details <PID><PID>: Punishment ID (in punishlist)   Shows details about one punishment

Punishment Type  Description
banit doesn't really ban a player, but kicks him when spotted
gmutemakes it unable for player to speak
specautomatically sends player to spec each time he wants to join other team
disarmmakes it unable for player to use weapons (except nades)


---
(http://img4.imageshack.us/img4/4158/downloadiz.gif) (http://forums.soldat.pl/index.php?action=dlattach;topic=40060.0;attach=30475)
---

Uses:
 * Explode function by DorkeyDear (http://soldatcentral.com/index.php?page=profile&u=4), CurryWurst (http://forums.soldat.pl/index.php?action=profile;u=10539)

Questions? Bugs? Report please --> macekmil@gmail.com
Title: Re: Punishments on GUID
Post by: Leo on April 28, 2011, 08:26:30 am
Tested with GUID, it works :)
Title: Re: Punishments on GUID
Post by: Mighty on April 30, 2011, 09:08:32 am
UPDATE 0.9b --> 1.00

   Changelog
   [30.04.2011] 0.9b --> 1.00:
      - fix: a bug counting Expire longint at 12 pm
      - add: /punishlist ID command
      - add: /details PID command
      - add: Reason of punishment
      - add: commands for casual players
      - add: new punishment types: spec and disarm

(http://img4.imageshack.us/img4/4158/downloadiz.gif) (http://forums.soldat.pl/index.php?action=dlattach;topic=40060.0;attach=27666)

      First post updated
Title: Re: Punishments on GUID
Post by: Leo on April 30, 2011, 04:10:59 pm
Mighty, first version crashed my server after one of my admins banned a guy with no msac. The cheater tried to rejoin and server crashed. No logs I am afraid, server just shut down.
Title: Re: Punishments on GUID
Post by: Mighty on April 30, 2011, 05:35:42 pm
Try attached.

I was trying to test it offline, but i found uninstalling msac too hard for me, heh
Even though I deleted MSAC files and restarted Soldat, even reinstalled it later, it still connected me to MSAC server ;p

Logs would be really helpful...
Title: Re: Punishments on GUID
Post by: Falcon` on April 30, 2011, 06:07:27 pm
http://msac.mologie.de/?page=help

FAQ, last question
Title: Re: Punishments on GUID
Post by: Mighty on April 30, 2011, 06:15:16 pm
wrong link i suppose?
Title: Re: Punishments on GUID
Post by: JotEmI on April 30, 2011, 06:37:37 pm
Quote
Q: How can I uninstall MSAC?
 A: Although an uninstallation is not necessary as MSAC does not run unless you join a MSAC-protected server, you can remove it from your system by browsing to %appdata%/Soldat/BattlEye/ and deleting BEClient.dll.

Also, be sure to check if GetPlayerStat(ID,'MSAC.GUID') <> ''
Title: Re: Punishments on GUID
Post by: Falcon` on April 30, 2011, 06:57:13 pm
haha, failed so hard.

Link fixed, ty :D
Title: Re: Punishments on GUID
Post by: Leo on May 01, 2011, 01:49:29 am
Try attached.

I was trying to test it offline, but i found uninstalling msac too hard for me, heh
Even though I deleted MSAC files and restarted Soldat, even reinstalled it later, it still connected me to MSAC server ;p

Logs would be really helpful...
Now it seems that it's always ban for 0 min:

(09:47:54) <SanctionsGUID> New Punishment: (by Admin)
(09:47:55) <SanctionsGUID>   Who:     Leo
(09:47:55) <SanctionsGUID>   Type:    ban
(09:47:55) <SanctionsGUID>   IDType:  ip
(09:47:55) <SanctionsGUID>   ID:      <myip>
(09:47:55) <SanctionsGUID>   Reason:  0min cheater
(09:47:55) <SanctionsGUID>   days:    0
(09:47:55) <SanctionsGUID>   hours:   0
(09:47:55) <SanctionsGUID>   mins:    0
(09:47:55) <SanctionsGUID>   Expires: 11-05-01--12-am-47
(09:47:56) <SanctionsGUID> 
(09:47:56) <SanctionsGUID> Done
Title: Re: Punishments on GUID
Post by: Mighty on May 01, 2011, 06:32:15 am
@Falcon & JotEmI: yeah, i read that before, but was too stupid to execute. maybe it was too late. Done however.

@Leo: fixed the problem, tested offline, worked. if there are any more problems, let me know



UPDATE 1.00 --> 1.01

Changelog:
   - fix: punishments on IP unfortunately not yet
   - fix: MANY problems with punishments made on 12 am and 12 pm.

(http://img4.imageshack.us/img4/4158/downloadiz.gif) (http://forums.soldat.pl/index.php?action=dlattach;topic=40060.0;attach=27674)
Title: Re: Punishments on GUID
Post by: Leo on May 01, 2011, 07:50:23 am
Doesn't work, not on guid neither on ip. 0 minutes ban and instant unban.

Code: [Select]
15:48:26) /punish 1 ban 30min cheater (myip)
(15:48:26) <SanctionsGUID> 
(15:48:26) <SanctionsGUID> New Punishment: (by Admin)
(15:48:26) <SanctionsGUID>   Who:     Leo
(15:48:26) <SanctionsGUID>   Type:    ban
(15:48:26) <SanctionsGUID>   IDType:  ip
(15:48:26) <SanctionsGUID>   ID:      <myip>
(15:48:27) <SanctionsGUID>   Reason:  30min cheater
(15:48:27) <SanctionsGUID>   days:    0
(15:48:27) <SanctionsGUID>   hours:   0
(15:48:27) <SanctionsGUID>   mins:    0
(15:48:27) <SanctionsGUID>   Expires: 11-05-01--03-am-48
(15:48:27) <SanctionsGUID> 
(15:48:27) <SanctionsGUID> Done
(15:48:27) Leo has been kicked.
(15:48:52) <SanctionsGUID> A punishment have expired: ban for Leo (ip)
Title: Re: Punishments on GUID
Post by: Mighty on May 01, 2011, 08:02:24 am
its 30m, not 30min. doesnt work either?
Title: Re: Punishments on GUID
Post by: Leo on May 01, 2011, 08:42:41 am
Yeah, my bad. It does work but after I tried to join server crashed:

Code: [Select]
<SanctionsGUID> Leo has been kicked.
Leo has been kicked. (xxx.xxxx.xxx)
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted
Title: Re: Punishments on GUID
Post by: Mighty on May 02, 2011, 05:28:35 am
Ok, i figured something out i hope.

Try attached and tell me what happens, please.

Title: Re: Punishments on GUID
Post by: Leo on May 02, 2011, 05:40:48 am
Yep, you fixed it. Works with GUID and IP with no crashes :D
Title: Re: Punishments on GUID
Post by: Mighty on May 02, 2011, 05:47:29 am
Updated the first post then.
And official:


UPDATE 1.01 --> 1.02

   Changelog:
      - fix: banning on IP
      - mod: moved checking ip to first OnJoinTeam
      - add: ungmute on join game
      - fix: punishment 0. showing as punishment for everyone

(http://img4.imageshack.us/img4/4158/downloadiz.gif) (http://forums.soldat.pl/index.php?action=dlattach;topic=40060.0;attach=27676)
Title: Re: Punishments on GUID
Post by: Damian[Eater] on May 02, 2011, 01:15:36 pm
It's a really good script (I tested it on Beo's servers and one mine). But I want to add a few suggestions:
-Ban by GUID (/beserver ban <GUID>)
-Tempban by GUID (/beserver tempban <time> <GUID>)

-Force ppl to stay in one team (people arent allowed to change teams, only if balance script changes them) if thats possible... ;)


And keep up your good work. :)
Title: Re: Punishments on GUID
Post by: KEEN on August 17, 2011, 10:19:44 pm
great work dude, very useful for noobs punishments

clap clap   [retard]
Title: Re: Punishments on HWID
Post by: Mighty on September 08, 2011, 05:07:54 pm
Updated to work with HWIDs

http://forums.soldat.pl/index.php?action=dlattach;topic=40060.0;attach=28007
Title: Re: Punishments on HWID
Post by: Xadhoom on September 09, 2011, 03:25:44 am
YAY! I love you   ;D
And you even included "/punish <HWID> <type> <time> <reason>"  :)

Good job!
Title: Re: Punishments on HWID
Post by: TheOne on September 09, 2011, 04:07:18 am
One punishment I liked was "blinding". Send the player a white drawtext every second.
Title: Re: Punishments on HWID
Post by: Xadhoom on September 09, 2011, 04:23:53 am
Ok tested it half an hour, there are some problems imo.

First, /punish id  is very nice for ingame server admins, this way they dont have to logsearch the hwid and can punish people fast and easy  :) . But that the punishment doesn't last in case the punished player rejoins takes away any sense of /punish id  imo.
It will happen lots of times that if I use spectating punishment for example, that the punished player is wtf-like, leaves the game and REJOINS.... and plays on unharmed.  >:(
Please, do me the favour and edit /punish id so it lasts also when the player rejoins!   :)

For  /punish hwid:
Didnt work.  :'(
Am I doing it wrong?  :-X

(11:21:33) /punish 47D9C33397B spec 10m (79.201.98.182)
(11:21:33) <Punishments> "47d9c33397b" is not an integer value
Title: Re: Punishments on HWID
Post by: Leo on September 09, 2011, 07:38:54 am
Yep, I get this error too.
Title: Re: Punishments on HWID
Post by: Mighty on September 09, 2011, 01:23:33 pm
Ok, as for punishments on HWID, I forgot to add a piece of syntax -.- it should be /punishhwid ...

2nd problem fixed, i think. Works fine locally
http://forums.soldat.pl/index.php?action=dlattach;topic=40060.0;attach=28010

Title: Re: Punishments on HWID
Post by: Xadhoom on September 09, 2011, 04:26:07 pm
Now it works all fine so far.  ;)

Thanks a lot for adjusting.  :)
Title: Re: Punishments on HWID
Post by: Leo on September 10, 2011, 10:01:23 am
I see another problem, while at bannedhw.txt I see five banned hardware id's when I do /punishlist I only get 1, the first one...
P.S It seems to work when I do/punishhwid <HWID> <type> <time> <reason>  from the command line by arsse but I can't see the punushments made by admins with /punish ID from ingame,
Title: Re: Punishments on HWID
Post by: Xadhoom on September 10, 2011, 12:06:06 pm
Nevermind about Leo's post, we were just confused and  "fixed" it now  :)
Title: Re: Punishments on HWID
Post by: KoGAi on August 05, 2013, 08:21:24 pm
Anyone else getting "Disk Full" error messages when trying to use the /punish or /punishhwid commands using a remote admin console such as Baka Admin? I'm seeing this happening with a few scripts like this one and AntiFake.
Title: Re: Punishments on HWID
Post by: JotEmI on August 06, 2013, 01:34:28 am
Anyone else getting "Disk Full" error messages when trying to use the /punish or /punishhwid commands using a remote admin console such as Baka Admin? I'm seeing this happening with a few scripts like this one and AntiFake.
Yesterday I was getting that message in ARSSE after connecting to one of my servers. Falcon said it couldn't come from the server itself so I thought it was a bug in ARSSE but since you had the same message on Baka Admin then it has to be server related. Nevertheless today the messages stopped showing in console.
Title: Re: Punishments on HWID
Post by: Falcon` on August 06, 2013, 06:01:49 am
Couldn't is a bit too much said. I meant i've never seen such thing neither in code nor in console. Doesn't mean it can't exist though.
Title: Re: Punishments on HWID
Post by: KoGAi on August 06, 2013, 07:41:57 pm
It's not happening all the time, but it's present on 3 (three) different hardware/server machines running each on different locations in the world so clearly something's going on.
Although the problem is not persistent when connecting to the servers, it IS consistent when I use the above commands as well as a few more like /readwhoiz or /whoizall (I only get the first few lines of the result and then I get the "Disk Full" error message).
All the above happens on remote admin consoles (Baka Admin in my case), it does not happen ingame but it poses a problem for us server admins since some actions/command cannot be performed without joining the game.

Let me know if I can provide more details, logs or assistance surrounding this.
Thanks!
Title: Re: Punishments on HWID
Post by: Falcon` on August 08, 2013, 06:24:56 pm
Contact me on IRC please, i see you hang around there.
Title: Re: Punishments on HWID
Post by: Vos on September 03, 2013, 07:44:59 am
is this script still up to date with current soldatversion etc?
Title: Re: Punishments on HWID
Post by: Mighty on September 04, 2013, 02:29:17 am
It works if you use Legacy mode. I might rescript it after all SC3 features are added.


Anyway, UPDATE 1.05
I tweaked dynamic arrays, previously they've been using more memory than needed. It's all good now.
Check 1st post for a download