*Clap* *Clap* I've got a request

User avatar
HackerinPink
Member
 
Posts: 27
Joined: Tue Oct 29, 2019 19:36
Location: Somewhere in a 100% regular place.
In-game: Dudeman HackerinPink

*Clap* *Clap* I've got a request

by HackerinPink » Wed Oct 30, 2019 08:48

Yea so I'm a very insignificant being, but I'm AT LEAST in a certain light, okayish on one server, all because I have the kick privilege.
So....
I need an repeated kicker in a nice little CSM. Here's what I kinda hope it does. (if anyone cares about this post):

1. The ability to have a /kick WITH a custom message.
2. The ability to set a timer in seconds/minutes/etc_if_needed for how long it will kick
3. The ability for the CSM to either
A) repeatedly SPAM the /kick command
B) somehow kick a player right when he joins the server.

Here is how I hope it will work:

** sumspammer88 joined the game
.rkick sumspammer88 10s
** sumspammer88 left the game
** sumspammer88 joined the game
** sumspammer88 left the game
...ect

And so, hopefully, you get the point.
Now the big question I guess: why?

Well, I kinda want a repeated kicker for OBVIOUS moderation reasons. You might be like: "then use ban ect ect" but that just isn't the same. And if you need to troll your best friend on the server, what better way then to repeatedly kick him and make him rage!

Some of you might be like: "yea yea just use the up arrow" but that doesn't immediately kick the guy and it might seem, from the kicked persons perspective, like I'm spam kicking in a somehow unfriendly way? (Human psychology am I right? *no*) Obviously, if I have a good script to do it for me, it will seem more automated, and the kicked person will be like: what the? This guy is crazy!!

So yea there goes my humble CSM request. Hope you guys don't diss on me and actually try to help, since I'm too lazy to understand Lua...
-HackerinPink
Last edited by HackerinPink on Mon Nov 04, 2019 23:36, edited 1 time in total.
A Dude with power and Intellect.
 

User avatar
Miniontoby
Member
 
Posts: 262
Joined: Fri Mar 01, 2019 19:25
Location: The Netherlands
In-game: Miniontoby

Re: *Clap* *Clap* I've got a suggestion

by Miniontoby » Sun Nov 03, 2019 17:21

I should say you can do make a mesecons circuit (if mesecons is on your server)

Place a command block with this code kick [name of person] (P.S. please replace the "[name of person]" in the name of that person) and make a circuit likes the image I attached

(There is an mesecons torch on the cobblestone block)
Image

P.S. if this isn't what you would like to have I will make a code for you.
Attachments
screenshot_20191103_181928.png
The Circuit
(237.08 KiB) Not downloaded yet
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell"
 

User avatar
HackerinPink
Member
 
Posts: 27
Joined: Tue Oct 29, 2019 19:36
Location: Somewhere in a 100% regular place.
In-game: Dudeman HackerinPink

Re: *Clap* *Clap* I've got a suggestion

by HackerinPink » Mon Nov 04, 2019 23:22

The server I'm a moderator at isn't my server, but someone else's. The server doesn't have the mesecons mod, and getting the mod would be complicated. It would really be appreciated if you can make a CSM code with the features I posted in the original post. Honestly, if you do this for me, I will appreciate it 100 times over.

(please make this CSM I need it super bad XD)
If you do decide to help me with this, take your time!
Hope you help me with this.
-HackerinPink
A Dude with power and Intellect.
 

User avatar
Miniontoby
Member
 
Posts: 262
Joined: Fri Mar 01, 2019 19:25
Location: The Netherlands
In-game: Miniontoby

Re: *Clap* *Clap* I've got a request

by Miniontoby » Tue Nov 05, 2019 14:30

But if installing the mesecons mod would be complicated, then a csm mod installing would be also compilcated, I think
But I will try it for you.
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell"
 

User avatar
HackerinPink
Member
 
Posts: 27
Joined: Tue Oct 29, 2019 19:36
Location: Somewhere in a 100% regular place.
In-game: Dudeman HackerinPink

Re: *Clap* *Clap* I've got a request

by HackerinPink » Tue Nov 05, 2019 20:05

Im not the server admin, and he isnt that technical, so installing will be a pain. since I've installed CSM's before, I know how to do it, and as an added bonus, only I have to install the CSM.
A Dude with power and Intellect.
 

User avatar
Miniontoby
Member
 
Posts: 262
Joined: Fri Mar 01, 2019 19:25
Location: The Netherlands
In-game: Miniontoby

Re: *Clap* *Clap* I've got a request

by Miniontoby » Thu Nov 07, 2019 14:46

Oké, but I don't know of it is going to work if I have the code. But I will make it.
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell"
 

User avatar
HackerinPink
Member
 
Posts: 27
Joined: Tue Oct 29, 2019 19:36
Location: Somewhere in a 100% regular place.
In-game: Dudeman HackerinPink

Re: *Clap* *Clap* I've got a request

by HackerinPink » Thu Nov 07, 2019 23:17

okay, Thanks a lot.
I look forward to it!
A Dude with power and Intellect.
 

User avatar
Miniontoby
Member
 
Posts: 262
Joined: Fri Mar 01, 2019 19:25
Location: The Netherlands
In-game: Miniontoby

Re: *Clap* *Clap* I've got a request

by Miniontoby » Mon Nov 11, 2019 15:48

I have a code, but it doesn't work as an CSM (It isn't my mistake) and it does work as an normal mod (But I haven't tested out of the kicking works).
I don't go publishing it now, because I'm waiting until it does work as an CSM (And I have already an topic for help made).
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell"
 

User avatar
HackerinPink
Member
 
Posts: 27
Joined: Tue Oct 29, 2019 19:36
Location: Somewhere in a 100% regular place.
In-game: Dudeman HackerinPink

Re: *Clap* *Clap* I've got a request

by HackerinPink » Tue Nov 12, 2019 22:48

Ah, I see. okay I'm not rushing you, take your time.
A Dude with power and Intellect.
 

User avatar
PolySaken
Member
 
Posts: 404
Joined: Thu Nov 09, 2017 05:18
Location: djelibabi
GitHub: PolySaken-I-Am
In-game: PolySaken

Re: *Clap* *Clap* I've got a request

by PolySaken » Sat Nov 16, 2019 05:20

Try this:
Code: Select all
local modstorage = core.get_mod_storage()
modstorage:set_string("switch", "0")

local player=""

while modstorage:set_string("switch")=="1" do
  minetest.send_chat_message("/kick "..player)
end

core.register_chatcommand("kick_on", {
   description = "enable autokick",
   func = function()
      modstorage:set_string("switch", "1")
   end,
})

core.register_chatcommand("kick_off", {
   description = "disable autokick",
   func = function()
      modstorage:set_string("switch", "0")
   end,
})

replace player="" with player=<the target's name>,
and then type .kick_on in chat
you can use .kick_off to disable it
 

User avatar
Miniontoby
Member
 
Posts: 262
Joined: Fri Mar 01, 2019 19:25
Location: The Netherlands
In-game: Miniontoby

Re: *Clap* *Clap* I've got a request

by Miniontoby » Sat Nov 16, 2019 13:11

But I already make a code And I'm nearly done
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell"
 

User avatar
HackerinPink
Member
 
Posts: 27
Joined: Tue Oct 29, 2019 19:36
Location: Somewhere in a 100% regular place.
In-game: Dudeman HackerinPink

Re: *Clap* *Clap* I've got a request

by HackerinPink » Wed Nov 20, 2019 22:01

@Polysaken

Nice code, I appreciate it, but it isn't the kind of functionality i'm looking for.
What am I supposed to do, change the CSM every time i want to kick another player?
However, I appreciate the effort.
A Dude with power and Intellect.
 

User avatar
PolySaken
Member
 
Posts: 404
Joined: Thu Nov 09, 2017 05:18
Location: djelibabi
GitHub: PolySaken-I-Am
In-game: PolySaken

Re: *Clap* *Clap* I've got a request

by PolySaken » Thu Nov 21, 2019 03:01

HackerinPink wrote:@Polysaken

What am I supposed to do, change the CSM every time i want to kick another player?

Essentially yes. But you could make a command that changes the name like this:
Code: Select all
local modstorage = core.get_mod_storage()
modstorage:set_string("switch", "0")
modstorage:set_string("name", "nullplayer")

local player=""

while modstorage:get_string("switch")=="1" do
  minetest.send_chat_message("/kick "..modstorage:get_string("name"))
end

core.register_chatcommand("kick_on", {
   description = "enable autokick",
   func = function()
      modstorage:set_string("switch", "1")
   end,
})

core.register_chatcommand("kick_off", {
   description = "disable autokick",
   func = function()
      modstorage:set_string("switch", "0")
   end,
})

core.register_chatcommand("change_name", {
   description = "modify playername to kick",
   func = function(param)
      modstorage:set_string("name", param)
   end,
})


You can then use the command .change_name <player> to set the player to kick.
 

User avatar
Miniontoby
Member
 
Posts: 262
Joined: Fri Mar 01, 2019 19:25
Location: The Netherlands
In-game: Miniontoby

Re: *Clap* *Clap* I've got a request

by Miniontoby » Thu Nov 21, 2019 14:10

Or use my code (p.s. I haven't test it but it does work) and you can kick more than one player repeatly

EDITED!!!
The previous code isn't the good one. But this one is the good one
kick_csm.zip
kick_csm_the good one
(764 Bytes) Downloaded 6 times
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell"
 

User avatar
HackerinPink
Member
 
Posts: 27
Joined: Tue Oct 29, 2019 19:36
Location: Somewhere in a 100% regular place.
In-game: Dudeman HackerinPink

Re: *Clap* *Clap* I've got a request

by HackerinPink » Fri Nov 22, 2019 18:21

@Polysaken

This makes things easier, but why can't it be in one command like MinionToby's??
It's over complicating things to use 2 commands to perform 1 simple function.

I'm testing MinionToby's one now... let's see if it works!

EDIT:
Bad news, it gave me a mod error. This is what I saw (copied from debug.txt)

Code: Select all
2019-11-22 13:28:02: ERROR[Main]: ModError: Failed to load and run script from C:\MTC\0.4.16\bin\..\clientmods\kick_csm\init.lua:
2019-11-22 13:28:02: ERROR[Main]: C:\MTC\0.4.16\bin\..\clientmods\kick_csm\init.lua:27: attempt to call field 'register_on_receiving_chat_message' (a nil value)
2019-11-22 13:28:02: ERROR[Main]: Check debug.txt for details.
A Dude with power and Intellect.
 

User avatar
Miniontoby
Member
 
Posts: 262
Joined: Fri Mar 01, 2019 19:25
Location: The Netherlands
In-game: Miniontoby

Re: *Clap* *Clap* I've got a request

by Miniontoby » Sat Nov 23, 2019 08:58

HackerinPink wrote:@Polysaken

This makes things easier, but why can't it be in one command like MinionToby's??
It's over complicating things to use 2 commands to perform 1 simple function.

I'm testing MinionToby's one now... let's see if it works!

EDIT:
Bad news, it gave me a mod error. This is what I saw (copied from debug.txt)

Code: Select all
2019-11-22 13:28:02: ERROR[Main]: ModError: Failed to load and run script from C:\MTC\0.4.16\bin\..\clientmods\kick_csm\init.lua:
2019-11-22 13:28:02: ERROR[Main]: C:\MTC\0.4.16\bin\..\clientmods\kick_csm\init.lua:27: attempt to call field 'register_on_receiving_chat_message' (a nil value)
2019-11-22 13:28:02: ERROR[Main]: Check debug.txt for details.


That was the difficult part and that I am going to solve
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell"
 

User avatar
Miniontoby
Member
 
Posts: 262
Joined: Fri Mar 01, 2019 19:25
Location: The Netherlands
In-game: Miniontoby

Re: *Clap* *Clap* I've got a request

by Miniontoby » Tue Nov 26, 2019 17:20

Here is the eddited one and hope fully it does work

kick_csm.zip
The hope fully good one
(767 Bytes) Downloaded 6 times
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell"
 

User avatar
HackerinPink
Member
 
Posts: 27
Joined: Tue Oct 29, 2019 19:36
Location: Somewhere in a 100% regular place.
In-game: Dudeman HackerinPink

Re: *Clap* *Clap* I've got a request

by HackerinPink » Thu Nov 28, 2019 15:55

Sadly, upon testing the CSM, I got a very similar, if not the same, error message.

Code: Select all
2019-11-28 10:52:48: ERROR[Main]: ModError: Failed to load and run script from /home/[username]/snap/minetest-luk3yx-4/97/.minetest/clientmods/kick_csm/init.lua:
2019-11-28 10:52:48: ERROR[Main]: ...etest-luk3yx-4/97/.minetest/clientmods/kick_csm/init.lua:27: attempt to call field 'register_on_receiving_chat_message' (a nil value)
2019-11-28 10:52:48: ERROR[Main]: Check debug.txt for details.

(copied from debug.txt)
A Dude with power and Intellect.
 

User avatar
Miniontoby
Member
 
Posts: 262
Joined: Fri Mar 01, 2019 19:25
Location: The Netherlands
In-game: Miniontoby

Re: *Clap* *Clap* I've got a request

by Miniontoby » Thu Nov 28, 2019 16:43

Please try to add the line csm_restriction_flags = 0 to the minetest.conf file for the server that you're testing with and try again.

And I'm trying to solve the problem also
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell"
 

User avatar
PolySaken
Member
 
Posts: 404
Joined: Thu Nov 09, 2017 05:18
Location: djelibabi
GitHub: PolySaken-I-Am
In-game: PolySaken

Re: *Clap* *Clap* I've got a request

by PolySaken » Thu Nov 28, 2019 20:58

Miniontoby wrote:Please try to add the line csm_restriction_flags = 0 to the minetest.conf file for the server that you're testing with and try again.

And I'm trying to solve the problem also

This doesn't seem very safe. If your mod requires users to disable security features, it's probably not a great mod.
 

User avatar
Lone_Wolf
Member
 
Posts: 2214
Joined: Sun Apr 09, 2017 05:50
Location: Hopefully very far from yours, snoop :P
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf

Re: *Clap* *Clap* I've got a request

by Lone_Wolf » Fri Nov 29, 2019 01:08

PolySaken wrote:
Miniontoby wrote:Please try to add the line csm_restriction_flags = 0 to the minetest.conf file for the server that you're testing with and try again.

And I'm trying to solve the problem also

This doesn't seem very safe. If your mod requires users to disable security features, it's probably not a great mod.

It doesn't disable security features. It just re-enables CSMs. Which are completely disabled server-side by default in 5.x
Content DB -|- Working on Voxel Knights
 

User avatar
Miniontoby
Member
 
Posts: 262
Joined: Fri Mar 01, 2019 19:25
Location: The Netherlands
In-game: Miniontoby

Re: *Clap* *Clap* I've got a request

by Miniontoby » Fri Nov 29, 2019 14:49

You need to add that, because it could block a part of the code.

And you need to use the latest version of Minetest (5.1.0)? If not, what version are you using?
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell"
 

User avatar
HackerinPink
Member
 
Posts: 27
Joined: Tue Oct 29, 2019 19:36
Location: Somewhere in a 100% regular place.
In-game: Dudeman HackerinPink

Re: *Clap* *Clap* I've got a request

by HackerinPink » Fri Nov 29, 2019 16:29

@PolySaken
hmm..?

@Lone_Wolf
I'm not using 5.x, I'm using the 'luk3yx-4' fork, which allows me to play both 4.x servers and 5.x servers.

@Miniontoby
I'm using the 'luk3yx-4' fork, so I guess I'm using 4.x, but I'm not sure
A Dude with power and Intellect.
 

User avatar
Miniontoby
Member
 
Posts: 262
Joined: Fri Mar 01, 2019 19:25
Location: The Netherlands
In-game: Miniontoby

Re: *Clap* *Clap* I've got a request

by Miniontoby » Fri Nov 29, 2019 16:53

With snap you could have the newest version (and I think that you havent got an interface, but that you only can run servers (but that is the case by me with snap on my pi) )
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell"
 

User avatar
Lone_Wolf
Member
 
Posts: 2214
Joined: Sun Apr 09, 2017 05:50
Location: Hopefully very far from yours, snoop :P
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf

Re: *Clap* *Clap* I've got a request

by Lone_Wolf » Fri Nov 29, 2019 17:50

HackerinPink wrote:@Lone_Wolf
I'm not using 5.x, I'm using the 'luk3yx-4' fork, which allows me to play both 4.x servers and 5.x servers.

If you have the csm_restrictions setting then in this case you should consider yourself 5.x
Content DB -|- Working on Voxel Knights
 

Next

Return to Client-side modding



Who is online

Users browsing this forum: No registered users and 0 guests