[Mod]You Chat Command[you]

Post Reply
nanepiwo
Member
Posts: 23
Joined: Mon Jan 05, 2015 20:13
GitHub: nanepiwo
IRC: nanepiwo or nane
In-game: nanepiwo

[Mod]You Chat Command[you]

by nanepiwo » Post

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.

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.! ;)
Last edited by nanepiwo on Thu Jan 08, 2015 23:56, edited 5 times in total.

User avatar
srifqi
Member
Posts: 570
Joined: Sat Jun 28, 2014 04:31
GitHub: srifqi
IRC: srifqi
In-game: srifqi
Location: Indonesia

Re: [Mod]You Chat Command[you]

by srifqi » Post

Umm...
Where is the code?
Saya dari Indonesia! · Terjemahkan Minetest! · my mods · My nickname in IPA: /es.rif.qi/

nanepiwo
Member
Posts: 23
Joined: Mon Jan 05, 2015 20:13
GitHub: nanepiwo
IRC: nanepiwo or nane
In-game: nanepiwo

Re: [Mod]You Chat Command[you]

by nanepiwo » Post

WIP... I need some help for finding the /me command code.

User avatar
rubenwardy
Moderator
Posts: 6978
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: [Mod]You Chat Command[you]

by rubenwardy » Post

Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

nanepiwo
Member
Posts: 23
Joined: Mon Jan 05, 2015 20:13
GitHub: nanepiwo
IRC: nanepiwo or nane
In-game: nanepiwo

Re: [Mod]You Chat Command[you]

by nanepiwo » Post

Thanks! Though Amaz already pointed it out to me. ;)

Post Reply

Who is online

Users browsing this forum: No registered users and 34 guests