Created
December 21, 2010 00:13
-
-
Save TkTech/749274 to your computer and use it in GitHub Desktop.
This file contains 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
# encoding: utf-8 | |
# | |
# handshake.py | |
# pymc | |
# | |
# Created by Tyler Kennedy on 2010-12-20. | |
# Copyright 2010 Tyler Kennedy. All rights reserved. | |
# | |
from pymc.core.packets import Packets | |
from pymc.client.client import Client | |
from pymc.services.mcnet import User | |
@Client.add_handler(0x02) | |
def HandshakeHandler(sender): | |
token = sender.reader.read_utf8() | |
if token not in ['-', '+']: | |
user = User(sender.username, sender.password) | |
user.join_server(token) | |
Packets.Login(sender.writer, 0x07, sender.username, 'Password', 0, 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment