This commit is contained in:
Gap
2015-01-01 22:27:55 +01:00
3 changed files with 50 additions and 1 deletions

21
LICENSE.md Normal file
View File

@@ -0,0 +1,21 @@
# The MIT License (MIT)
Copyright (c) Redstoner
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE

View File

@@ -39,8 +39,9 @@ def get_all_data(sender, player):
msg(sender, "&6> UUID: &e%s" % str(player.getUniqueId())) msg(sender, "&6> UUID: &e%s" % str(player.getUniqueId()))
msg(sender, "&6> First joined: &7(y-m-d h:m:s) &e%s" % get_first_join(player)) msg(sender, "&6> First joined: &7(y-m-d h:m:s) &e%s" % get_first_join(player))
msg(sender, "") msg(sender, "")
msg(sender, "&7 -- Data provided by Mojang") msg(sender, "&7 -- Data provided by ipinfo.io")
msg(sender, "&6> Country: &e%s" % get_country(data)) msg(sender, "&6> Country: &e%s" % get_country(data))
msg(sender, "&7 -- Data provided by Mojang")
msg(sender, "&6> All ingame names used so far: &e%s" % get_all_names(player)) msg(sender, "&6> All ingame names used so far: &e%s" % get_all_names(player))
except Exception as e: except Exception as e:
# can throw exceptions such as timeouts when Mojang API is down # can throw exceptions such as timeouts when Mojang API is down

27
misc.py
View File

@@ -71,6 +71,33 @@ def on_sudo_command(sender, args):
return True return True
#
# /gm - custom gamemode command with extra perms for greater control
#
#@hook.command("gm")
#def on_gm_command(sender, args):
# if not is_player(sender):
# msg(sender, "&cDerp! Can't run that from console!")
# return True
# if not checkargs(sender, args, 1, 2):
# return True
# mode = args[0]
# target = args[1]
# if target and not sender.hasPermission("utils.gm.other"):
# msg(sender, "&cYou cannot change the gamemode of another player!")
# else:
# target = sender
# if mode < 0 or mode > 3:
# msg(sender, "&cThat gamemode does not exist!")
# elif sender.hasPermission("utils.gm." % mode):
# runas(server.getConsoleSender(), "gamemode " % mode % " " % target)
# else:
# msg(sender, "&cYou cannot access that gamemode!")
# return True
# #
# Clicking redstone_sheep with shears will drop redstone + wool and makes a moo sound # Clicking redstone_sheep with shears will drop redstone + wool and makes a moo sound
# #