Page 1 of 2

[Mod] Ban Hammer [0.2.1] [ban_hammer]

Posted: Fri Apr 11, 2014 20:26
by Evergreen
Image

This mod adds a hammer which bans (kicks, or removes shout privilege depending on the mode) any player it is punched with. The user of it must have the "ban" privilege. To switch modes, hold the shift key and punch while the item is wielded. Works with 0.4.9 and above.


Depends: none

License:
Textures: CC BY-SA 4.0
Code: GPL v3

Downloads:
Browse the code: https://github.com/4Evergreen4/ban_hammer
.zip: https://github.com/4Evergreen4/ban_hamm ... master.zip
.tar.gz: https://github.com/4Evergreen4/ban_hamm ... ter.tar.gz

Posted: Fri Apr 11, 2014 20:42
by stu
Nicely done!

I don't run a public server myself but I am sure this will go down well with those that do.

One little thing, you might want to check that the user does have the server privilege to use the tool.
Maybe overkill but imagine the consequences should one of these get in the wrong hands.

Edit: Forget that, on closer inspection I see you do check for that, only not where I would expect it.
That should be fine though, my apologies,

Posted: Fri Apr 11, 2014 20:58
by twoelk
how about a milder "kick player" version?

Posted: Sat Apr 12, 2014 04:13
by minermoder27
twoelk wrote:how about a milder "kick player" version?
There is no mine test.kick player function, but you could kick them by sending a invalid formspec.

Posted: Sat Apr 12, 2014 05:46
by CWz
cool, someone did my suggestion.

Posted: Sat Apr 12, 2014 07:13
by TenPlus1
/kick <player> is a command in 0.4.9

Posted: Sat Apr 12, 2014 07:19
by CraigyDavi
minermoder27 wrote:
twoelk wrote:how about a milder "kick player" version?
There is no mine test.kick player function, but you could kick them by sending a invalid formspec.
http://dev.minetest.net/minetest.kick_player

Posted: Sat Apr 12, 2014 22:10
by Evergreen
twoelk wrote:how about a milder "kick player" version?
I was planning on switching tools when click and shift is pressed. I might also make one which takes the "voice" privilege. I also might make a formspec appear which asks for the player's name on rightclick.

Posted: Sat Apr 12, 2014 22:10
by Evergreen
CWz wrote:cool, someone did my suggestion.
Oh, I didn't even know you suggested it. :P

Posted: Sun Apr 13, 2014 07:26
by Krock
minermoder27 wrote:
twoelk wrote:how about a milder "kick player" version?
There is no mine test.kick player function, but you could kick them by sending a invalid formspec.
https://github.com/minetest/minetest/bl ... .txt#L1583
wut?
Yes, it's a new thing in minetest 0.4.9

Posted: Sun Apr 13, 2014 14:50
by CWz
Krock wrote:
minermoder27 wrote:
twoelk wrote:how about a milder "kick player" version?
There is no mine test.kick player function, but you could kick them by sending a invalid formspec.
https://github.com/minetest/minetest/bl ... .txt#L1583
wut?
Yes, it's a new thing in minetest 0.4.9
0.4.9 stable doesn't have kick if I recall correctly it was added in dev.

Posted: Thu Apr 17, 2014 00:41
by Evergreen
Updates:

Posted: Fri Apr 18, 2014 23:02
by Evergreen
Updates: So essentially, I added a screwdriver like ability changer.

Re: [Mod] Ban Hammer [0.2.0] [ban_hammer]

Posted: Sun Apr 20, 2014 16:58
by crazyginger72
Evergreen i always say i will use my "banhammer" now i really can! XD i love it <3

Re: [Mod] Ban Hammer [0.2.0] [ban_hammer]

Posted: Sun Apr 20, 2014 18:09
by Evergreen
crazyginger72 wrote:Evergreen i always say i will use my "banhammer" now i really can! XD i love it <3
That's what I was going for. :P

Re: [Mod] Ban Hammer [0.2.0] [ban_hammer]

Posted: Sun Apr 20, 2014 23:08
by crazyginger72
I love it, I made a few changes for my server version. I made new textures ( in the normal admin tool colours ) and added chat messages :)


http://cg72server.d-n-s.name/minetest/ban_hammer.zip

Re: [Mod] Ban Hammer [0.2.0] [ban_hammer]

Posted: Mon Apr 21, 2014 00:02
by Evergreen
crazyginger72 wrote:I love it, I made a few changes for my server version. I made new textures ( in the normal admin tool colours ) and added chat messages :)


http://cg72server.d-n-s.name/minetest/ban_hammer.zip
I can add chat messages to the regular version if you want. (maybe make it optional via a settings.txt)

Re: [Mod] Ban Hammer [0.2.0] [ban_hammer]

Posted: Mon Apr 21, 2014 00:50
by crazyginger72
its up to you :) and to be honest im not sure myself how to make a mod check and use a .conf or settinggs.txt for a mod lol!

But i do like all my admin stuff the same colour ( i think i have OCD )

Re: [Mod] Ban Hammer [0.2.1] [ban_hammer]

Posted: Mon Apr 21, 2014 01:41
by Evergreen

Re: [Mod] Ban Hammer [0.2.1] [ban_hammer]

Posted: Mon Apr 21, 2014 01:42
by Evergreen
Also, instead of just revoking the shout command, I might make it bring up a formspec asking which privileges to take.

Re: [Mod] Ban Hammer [0.2.1] [ban_hammer]

Posted: Mon Apr 21, 2014 03:37
by crazyginger72
awesome!! and my fork is now updated with your new code :)

sorry OCD and the colours thing, it really erks me lol!

Re: [Mod] Ban Hammer [0.2.1] [ban_hammer]

Posted: Tue Apr 29, 2014 12:25
by Pitriss
Cool mod.. If this is craftable.. How about adding some fun feature.. When It will be used without ban priv, it could apply random effect (kick/ban/mute) on person who used it..

Re: [Mod] Ban Hammer [0.2.1] [ban_hammer]

Posted: Tue Apr 29, 2014 15:31
by Evergreen
Pitriss wrote:Cool mod.. If this is craftable.. How about adding some fun feature.. When It will be used without ban priv, it could apply random effect (kick/ban/mute) on person who used it..
Interesting security idea! If someone dares use it, it will backfire. :3

Re: [Mod] Ban Hammer [0.2.1] [ban_hammer]

Posted: Sun May 11, 2014 12:00
by CWz
for 4 mode it could act as a admin sword.

Re: [Mod] Ban Hammer [0.2.1] [ban_hammer]

Posted: Sun May 11, 2014 12:20
by Evergreen
CWz wrote:for 4 mode it could act as a admin sword.
Meh, I really just intended it to be an admin tool. There are already "ultimate" admin tools out there. I just have been too lazy to add the stuff I have idea for.