*Clap* *Clap* I've got a request
- HackerinPink
- Member
- Posts: 43
- Joined: Tue Oct 29, 2019 19:36
- Location: Somewhere in a 100% regular place.
- Contact:
*Clap* *Clap* I've got a request
So I'm usually not in a position of power, but on one server, I have the kick privilege.
So I need an repeated kicker in a nice little CSM. Here's what I kinda hope it does:
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.
So yea there goes my humble CSM request. Hope you guys actually try to help since I'm too lazy to understand Lua...
-HackerinPink
So I need an repeated kicker in a nice little CSM. Here's what I kinda hope it does:
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.
So yea there goes my humble CSM request. Hope you guys actually try to help since I'm too lazy to understand Lua...
-HackerinPink
Last edited by HackerinPink on Thu Dec 19, 2019 19:50, edited 2 times in total.
A Dude with power and Intellect.
- Miniontoby
- Member
- Posts: 616
- Joined: Fri Mar 01, 2019 19:25
- GitHub: Miniontoby
- IRC: Miniontoby
- In-game: Miniontoby
- Location: The Netherlands
Re: *Clap* *Clap* I've got a suggestion
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)
P.S. if this isn't what you would like to have I will make a code for you.
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)
P.S. if this isn't what you would like to have I will make a code for you.
- Attachments
-
- The Circuit
- screenshot_20191103_181928.png (237.08 KiB) Viewed 1003 times
- HackerinPink
- Member
- Posts: 43
- Joined: Tue Oct 29, 2019 19:36
- Location: Somewhere in a 100% regular place.
- Contact:
Re: *Clap* *Clap* I've got a suggestion
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
(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.
- Miniontoby
- Member
- Posts: 616
- Joined: Fri Mar 01, 2019 19:25
- GitHub: Miniontoby
- IRC: Miniontoby
- In-game: Miniontoby
- Location: The Netherlands
Re: *Clap* *Clap* I've got a request
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.
But I will try it for you.
- HackerinPink
- Member
- Posts: 43
- Joined: Tue Oct 29, 2019 19:36
- Location: Somewhere in a 100% regular place.
- Contact:
Re: *Clap* *Clap* I've got a request
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.
- Miniontoby
- Member
- Posts: 616
- Joined: Fri Mar 01, 2019 19:25
- GitHub: Miniontoby
- IRC: Miniontoby
- In-game: Miniontoby
- Location: The Netherlands
Re: *Clap* *Clap* I've got a request
Oké, but I don't know of it is going to work if I have the code. But I will make it.
- HackerinPink
- Member
- Posts: 43
- Joined: Tue Oct 29, 2019 19:36
- Location: Somewhere in a 100% regular place.
- Contact:
Re: *Clap* *Clap* I've got a request
okay, Thanks a lot.
I look forward to it!
I look forward to it!
A Dude with power and Intellect.
- Miniontoby
- Member
- Posts: 616
- Joined: Fri Mar 01, 2019 19:25
- GitHub: Miniontoby
- IRC: Miniontoby
- In-game: Miniontoby
- Location: The Netherlands
Re: *Clap* *Clap* I've got a request
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).
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).
- HackerinPink
- Member
- Posts: 43
- Joined: Tue Oct 29, 2019 19:36
- Location: Somewhere in a 100% regular place.
- Contact:
Re: *Clap* *Clap* I've got a request
Ah, I see. okay I'm not rushing you, take your time.
A Dude with power and Intellect.
- PolySaken
- Member
- Posts: 817
- Joined: Thu Nov 09, 2017 05:18
- GitHub: PolySaken-I-Am
- In-game: PolySaken
- Location: Wānaka, Aotearoa
- Contact:
Re: *Clap* *Clap* I've got a request
Try this:
replace player="" with player=<the target's name>,
and then type .kick_on in chat
you can use .kick_off to disable it
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,
})
and then type .kick_on in chat
you can use .kick_off to disable it
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.
- Miniontoby
- Member
- Posts: 616
- Joined: Fri Mar 01, 2019 19:25
- GitHub: Miniontoby
- IRC: Miniontoby
- In-game: Miniontoby
- Location: The Netherlands
Re: *Clap* *Clap* I've got a request
But I already make a code And I'm nearly done
- HackerinPink
- Member
- Posts: 43
- Joined: Tue Oct 29, 2019 19:36
- Location: Somewhere in a 100% regular place.
- Contact:
Re: *Clap* *Clap* I've got a request
@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.
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.
- PolySaken
- Member
- Posts: 817
- Joined: Thu Nov 09, 2017 05:18
- GitHub: PolySaken-I-Am
- In-game: PolySaken
- Location: Wānaka, Aotearoa
- Contact:
Re: *Clap* *Clap* I've got a request
Essentially yes. But you could make a command that changes the name like this:HackerinPink wrote:@Polysaken
What am I supposed to do, change the CSM every time i want to kick another player?
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,
})
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.
- Miniontoby
- Member
- Posts: 616
- Joined: Fri Mar 01, 2019 19:25
- GitHub: Miniontoby
- IRC: Miniontoby
- In-game: Miniontoby
- Location: The Netherlands
Re: *Clap* *Clap* I've got a request
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
EDITED!!!
The previous code isn't the good one. But this one is the good one
- HackerinPink
- Member
- Posts: 43
- Joined: Tue Oct 29, 2019 19:36
- Location: Somewhere in a 100% regular place.
- Contact:
Re: *Clap* *Clap* I've got a request
@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)
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.
- Miniontoby
- Member
- Posts: 616
- Joined: Fri Mar 01, 2019 19:25
- GitHub: Miniontoby
- IRC: Miniontoby
- In-game: Miniontoby
- Location: The Netherlands
Re: *Clap* *Clap* I've got a request
That was the difficult part and that I am going to solveHackerinPink 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.
- Miniontoby
- Member
- Posts: 616
- Joined: Fri Mar 01, 2019 19:25
- GitHub: Miniontoby
- IRC: Miniontoby
- In-game: Miniontoby
- Location: The Netherlands
Re: *Clap* *Clap* I've got a request
Here is the eddited one and hope fully it does work
- HackerinPink
- Member
- Posts: 43
- Joined: Tue Oct 29, 2019 19:36
- Location: Somewhere in a 100% regular place.
- Contact:
Re: *Clap* *Clap* I've got a request
Sadly, upon testing the CSM, I got a very similar, if not the same, error message.
(copied from debug.txt)
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.
A Dude with power and Intellect.
- Miniontoby
- Member
- Posts: 616
- Joined: Fri Mar 01, 2019 19:25
- GitHub: Miniontoby
- IRC: Miniontoby
- In-game: Miniontoby
- Location: The Netherlands
Re: *Clap* *Clap* I've got a request
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
And I'm trying to solve the problem also
- PolySaken
- Member
- Posts: 817
- Joined: Thu Nov 09, 2017 05:18
- GitHub: PolySaken-I-Am
- In-game: PolySaken
- Location: Wānaka, Aotearoa
- Contact:
Re: *Clap* *Clap* I've got a request
This doesn't seem very safe. If your mod requires users to disable security features, it's probably not a great mod.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
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.
- Lone_Wolf
- Member
- Posts: 2578
- Joined: Sun Apr 09, 2017 05:50
- GitHub: LoneWolfHT
- IRC: LandarVargan
- In-game: LandarVargan
Re: *Clap* *Clap* I've got a request
It doesn't disable security features. It just re-enables CSMs. Which are completely disabled server-side by default in 5.xPolySaken wrote:This doesn't seem very safe. If your mod requires users to disable security features, it's probably not a great mod.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
- Miniontoby
- Member
- Posts: 616
- Joined: Fri Mar 01, 2019 19:25
- GitHub: Miniontoby
- IRC: Miniontoby
- In-game: Miniontoby
- Location: The Netherlands
Re: *Clap* *Clap* I've got a request
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?
And you need to use the latest version of Minetest (5.1.0)? If not, what version are you using?
- HackerinPink
- Member
- Posts: 43
- Joined: Tue Oct 29, 2019 19:36
- Location: Somewhere in a 100% regular place.
- Contact:
Re: *Clap* *Clap* I've got a request
@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
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.
- Miniontoby
- Member
- Posts: 616
- Joined: Fri Mar 01, 2019 19:25
- GitHub: Miniontoby
- IRC: Miniontoby
- In-game: Miniontoby
- Location: The Netherlands
Re: *Clap* *Clap* I've got a request
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) )
- Lone_Wolf
- Member
- Posts: 2578
- Joined: Sun Apr 09, 2017 05:50
- GitHub: LoneWolfHT
- IRC: LandarVargan
- In-game: LandarVargan
Re: *Clap* *Clap* I've got a request
If you have the csm_restrictions setting then in this case you should consider yourself 5.xHackerinPink 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.
Who is online
Users browsing this forum: No registered users and 3 guests