Created
July 19, 2011 18:43
-
-
Save MostAwesomeDude/1093382 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit a50f7aee7c792c7deac811e592eead151e2170e4 | |
Author: Corbin Simpson <[email protected]> | |
Date: Thu May 26 05:33:07 2011 -0700 | |
identify: Add the login handler class. | |
To get at the protocol version. | |
diff --git a/burger/toppings/identify.py b/burger/toppings/identify.py | |
index 3cc0717..c636578 100644 | |
--- a/burger/toppings/identify.py | |
+++ b/burger/toppings/identify.py | |
@@ -94,7 +94,17 @@ def identify(buff): | |
) | |
if const: | |
- return ("item.superclass", cf.this) | |
+ return ("item.superclass", cf.this) | |
+ | |
+ # Packet-handler class for login. This contains the current protocol | |
+ # version. | |
+ const = cf.constants.find_one( | |
+ ConstantType.STRING, | |
+ lambda const: "Outdated" in const["string"]["value"] | |
+ ) | |
+ | |
+ if const: | |
+ return "handler.login", cf.this | |
class IdentifyTopping(Topping): | |
PROVIDES = [ | |
@@ -104,6 +114,7 @@ class IdentifyTopping(Topping): | |
"identify.recipe.inventory", | |
"identify.recipe.cloth", | |
"identify.item.superclass" | |
+ "identify.handler.login", | |
] | |
DEPENDS = [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Burger?