[Mod] Ban Hammer [0.2.1] [ban_hammer]

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

[Mod] Ban Hammer [0.2.1] [ban_hammer]

by Evergreen » Post

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
Last edited by Evergreen on Fri Jun 19, 2015 22:00, edited 3 times in total.
Back from the dead!

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

by stu » Post

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,
Last edited by stu on Fri Apr 11, 2014 21:32, edited 1 time in total.

twoelk
Member
Posts: 1482
Joined: Fri Apr 19, 2013 16:19
GitHub: twoelk
IRC: twoelk
In-game: twoelk
Location: northern Germany

by twoelk » Post

how about a milder "kick player" version?

User avatar
minermoder27
Member
Posts: 138
Joined: Wed Nov 20, 2013 23:24
GitHub: ZNixian
In-game: minermoder27

by minermoder27 » Post

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.
My best mods:
Buildtest

CWz
Member
Posts: 197
Joined: Tue Dec 24, 2013 17:01
GitHub: chaoswormz
IRC: CWz
In-game: CWz
Location: Banana Land

by CWz » Post

cool, someone did my suggestion.
I am CWz on the following servers: VanessaE's servers. If you see CWz on server other then those then chances are it's a Fake. you can contact me on irc.freenode.net or by PM if you are not sure

t3tNU9hNyeSJxFOmM5fmtGxlfoJrcBCg

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

by TenPlus1 » Post

/kick <player> is a command in 0.4.9

User avatar
CraigyDavi
Member
Posts: 582
Joined: Sat Aug 10, 2013 13:08
GitHub: davisonio
IRC: davisonio
In-game: CraigyDavi
Location: Hampshire, UK
Contact:

by CraigyDavi » Post

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

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

by Evergreen » Post

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.
Back from the dead!

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

by Evergreen » Post

CWz wrote:cool, someone did my suggestion.
Oh, I didn't even know you suggested it. :P
Back from the dead!

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

by Krock » Post

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
Last edited by Krock on Sun Apr 13, 2014 07:28, edited 1 time in total.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

CWz
Member
Posts: 197
Joined: Tue Dec 24, 2013 17:01
GitHub: chaoswormz
IRC: CWz
In-game: CWz
Location: Banana Land

by CWz » Post

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.
I am CWz on the following servers: VanessaE's servers. If you see CWz on server other then those then chances are it's a Fake. you can contact me on irc.freenode.net or by PM if you are not sure

t3tNU9hNyeSJxFOmM5fmtGxlfoJrcBCg

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

by Evergreen » Post

Back from the dead!

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

by Evergreen » Post

Updates:
Spoiler
So essentially, I added a screwdriver like ability changer.
Back from the dead!

User avatar
crazyginger72
Member
Posts: 69
Joined: Wed Jan 01, 2014 07:57
GitHub: crazyginger72
IRC: cg72
In-game: crazyginger72
Location: gone to lunch

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

by crazyginger72 » Post

Evergreen i always say i will use my "banhammer" now i really can! XD i love it <3

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

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

by Evergreen » Post

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

User avatar
crazyginger72
Member
Posts: 69
Joined: Wed Jan 01, 2014 07:57
GitHub: crazyginger72
IRC: cg72
In-game: crazyginger72
Location: gone to lunch

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

by crazyginger72 » Post

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

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

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

by Evergreen » Post

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)

User avatar
crazyginger72
Member
Posts: 69
Joined: Wed Jan 01, 2014 07:57
GitHub: crazyginger72
IRC: cg72
In-game: crazyginger72
Location: gone to lunch

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

by crazyginger72 » Post

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 )

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

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

by Evergreen » Post


User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

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

by Evergreen » Post

Also, instead of just revoking the shout command, I might make it bring up a formspec asking which privileges to take.
Last edited by Evergreen on Tue Apr 29, 2014 15:30, edited 1 time in total.

User avatar
crazyginger72
Member
Posts: 69
Joined: Wed Jan 01, 2014 07:57
GitHub: crazyginger72
IRC: cg72
In-game: crazyginger72
Location: gone to lunch

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

by crazyginger72 » Post

awesome!! and my fork is now updated with your new code :)

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

User avatar
Pitriss
Member
Posts: 254
Joined: Mon Aug 05, 2013 17:09
GitHub: Pitriss
IRC: pitriss
In-game: pitriss
Location: Czech republic, Bohumin

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

by Pitriss » Post

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..

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

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

by Evergreen » Post

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

CWz
Member
Posts: 197
Joined: Tue Dec 24, 2013 17:01
GitHub: chaoswormz
IRC: CWz
In-game: CWz
Location: Banana Land

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

by CWz » Post

for 4 mode it could act as a admin sword.

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

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

by Evergreen » Post

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.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 30 guests