Page 1 of 1

[Mod]You Chat Command[you]

PostPosted: Wed Jan 07, 2015 01:19
by nanepiwo
This is a fairly simple mod. It adds a /you chat command which sends a chat about another player. For example, if I were to type '/you dummy is nanepiwo's friend', the in-game chat will display '** dummy is nanepiwo's friend [nanepiwo]'. It also comes with an option, defaulting to off, which sends a chat message to player talked about in the /you command.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all

--- WIP!!!!!!

minetest.register_chatcommand("you", {
params = "<player> <action>",
description = "Say something about another player in the format of /me",
privs = {shout = true},
func = function(name, param)
     local player, action
     = param:match('(^.- ) ( .-$)')

     minetest.chat_send_all("** "..player.. " " ..action.. "[" ..name.. "]")



Umm, I still need to add this to github, add licenses, etc.! ;)

Re: [Mod]You Chat Command[you]

PostPosted: Wed Jan 07, 2015 17:12
by srifqi
Umm...
Where is the code?

Re: [Mod]You Chat Command[you]

PostPosted: Wed Jan 07, 2015 19:50
by nanepiwo
WIP... I need some help for finding the /me command code.

Re: [Mod]You Chat Command[you]

PostPosted: Wed Jan 07, 2015 19:51
by rubenwardy

Re: [Mod]You Chat Command[you]

PostPosted: Wed Jan 07, 2015 21:54
by nanepiwo
Thanks! Though Amaz already pointed it out to me. ;)