Guest User

Untitled

a guest
Mar 24th, 2013
45
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. minetest.register_chatcommand("timeban", {
  3.     params = "<time> <name_or_ip> <reason>";
  4.     description = "Ban a user for a certain amount of time";
  5.     privs = {ban=true};
  6.     func = function ( name, param )
  7.         local user, reason = param:gmatch("(%S+)%s(.*)");
  8.         if (not user) then
  9.             minetest.chat_send_player(name, "Usage: /ban30 <name_or_ip> [<reason>]");
  10.             return;
  11.         end
  12.         reason = reason or "No reason given.";
  13.         minetest.chat_send_player(user, "You have been banned for 30 minutes. Reason: "..reason);
  14.         minetest.after(60*30, function ( )
  15.             minetest.unban_player_or_ip(user);
  16.             minetest.chat_send_player(name, "Player "..user.." has been unbanned.");
  17.         end)
  18.         minetest.ban_player(user);
  19.     end;
  20. });
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×