From 0677f8460d6b97202d5a2f5cd1466a62261974c8 Mon Sep 17 00:00:00 2001 From: Derrick Lim Date: Fri, 26 Dec 2014 18:48:30 +0800 Subject: [PATCH 1/5] Added /gm - commented for now --- misc.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/misc.py b/misc.py index d91a82c..dc9b95b 100644 --- a/misc.py +++ b/misc.py @@ -71,6 +71,34 @@ def on_sudo_command(sender, args): return True +# +# /gm - custom gamemode command with extra perms for greater control +# + + +#@hook.command("gm") +#def on_gm_command(sender, args): +# mode = args[0] +# target = args[1] +# if target and not sender.hasPermission(utils.gm.other): +# msg(sender, "You do not have permission to change the gamemode of other players") +# else: +# target = sender +# if mode < 0 or mode > 3: +# msg(sender, "That gamemode does not exist!") +# elif mode == 0 and sender.hasPermission(utils.gm.0): +# runas(server.getConsoleSender(), "gamemode 0 " % target) +# elif mode == 1 and sender.hasPermission(utils.gm.1): +# runas(server.getConsoleSender(), "gamemode 1 " % target) +# elif mode == 2 and sender.hasPermission(utils.gm.2): +# runas(server.getConsoleSender(), "gamemode 2 " % target) +# elif mode == 3 and sender.hasPermission(utils.gm.3): +# runas(server.getConsoleSender(), "gamemode 3 " % target) +# else: +# msg(sender), "You do not have access to that gamemode") +# return True + + # # Clicking redstone_sheep with shears will drop redstone + wool and makes a moo sound # From e4ab382d98d145148da35ad665ce60a67b262627 Mon Sep 17 00:00:00 2001 From: Derrick Lim Date: Sat, 27 Dec 2014 00:17:53 +0800 Subject: [PATCH 2/5] Squashed some /gm bugs Thnx sheep --- misc.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/misc.py b/misc.py index dc9b95b..51ad637 100644 --- a/misc.py +++ b/misc.py @@ -78,24 +78,23 @@ def on_sudo_command(sender, args): #@hook.command("gm") #def on_gm_command(sender, args): +# if not is_player(sender): +# noperm(sender) +# 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, "You do not have permission to change the gamemode of other players") +# 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, "That gamemode does not exist!") -# elif mode == 0 and sender.hasPermission(utils.gm.0): -# runas(server.getConsoleSender(), "gamemode 0 " % target) -# elif mode == 1 and sender.hasPermission(utils.gm.1): -# runas(server.getConsoleSender(), "gamemode 1 " % target) -# elif mode == 2 and sender.hasPermission(utils.gm.2): -# runas(server.getConsoleSender(), "gamemode 2 " % target) -# elif mode == 3 and sender.hasPermission(utils.gm.3): -# runas(server.getConsoleSender(), "gamemode 3 " % target) +# msg(sender, "&cThat gamemode does not exist!") +# elif sender.hasPermission("utils.gm." % mode): +# runas(server.getConsoleSender(), "gamemode " % mode % " " % target) # else: -# msg(sender), "You do not have access to that gamemode") +# msg(sender, "&cYou cannot access that gamemode!") # return True From 967bda67dad0ccd53fe48ef042813c6be0a28a9b Mon Sep 17 00:00:00 2001 From: Derrick Lim Date: Sat, 27 Dec 2014 00:42:01 +0800 Subject: [PATCH 3/5] /gm finished for now, will remain commented --- misc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc.py b/misc.py index 51ad637..b8482fd 100644 --- a/misc.py +++ b/misc.py @@ -79,7 +79,7 @@ def on_sudo_command(sender, args): #@hook.command("gm") #def on_gm_command(sender, args): # if not is_player(sender): -# noperm(sender) +# msg(sender, "&cDerp! Can't run that from console!") # return True # if not checkargs(sender, args, 1, 2): # return True From 3b2ad46ab939ec21eec23121116d380c89101af1 Mon Sep 17 00:00:00 2001 From: jomo Date: Fri, 26 Dec 2014 18:28:19 +0100 Subject: [PATCH 4/5] fix /check output --- check.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/check.py b/check.py index 97cc3ab..575c6ad 100644 --- a/check.py +++ b/check.py @@ -39,8 +39,9 @@ def get_all_data(sender, player): 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, "") - 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, "&7 -- Data provided by Mojang") msg(sender, "&6> All ingame names used so far: &e%s" % get_all_names(player)) except Exception as e: # can throw exceptions such as timeouts when Mojang API is down From 792c8405fb59166956b1b60eecd29a701117cc87 Mon Sep 17 00:00:00 2001 From: jomo Date: Fri, 26 Dec 2014 18:28:59 +0100 Subject: [PATCH 5/5] add license, fixes #1 --- LICENSE.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..d7743f4 --- /dev/null +++ b/LICENSE.md @@ -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