Added /who chat command

This commit is contained in:
Diego Martínez 2012-12-26 23:29:22 -02:00
parent 3b54b16efc
commit 9de98a8e8b
1 changed files with 16 additions and 0 deletions

View File

@ -63,3 +63,19 @@ minetest.register_chatcommand("me", {
irc.say(mt_irc.channel, "* "..name.." "..param);
end,
})
minetest.register_chatcommand("who", {
-- TODO: This duplicates code from !who
params = "";
description = "Tell who is currently on the channel";
privs = { shout=true; };
func = function ( name, param )
local s = "";
for k, v in pairs(mt_irc.connected_players) do
if (v) then
s = s.." "..k;
end
end
minetest.chat_send_player(name, "Players On Channel:"..s);
end;
});