Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # encoding: utf-8
- #
- # packets.py
- # pymc
- #
- # Created by Tyler Kennedy on 2010-12-20.
- # Copyright 2010 Tyler Kennedy. All rights reserved.
- #
- from pymc.core.defines import PacketType
- from pymc.core.decorators import threaded
- class Packets(object):
- @staticmethod
- @threaded
- def Login(writer, version, username, password, seed, dimension):
- with writer.lock:
- writer.write_byte(PacketType.Login)
- writer.write_int(version)
- writer.write_utf8(username)
- writer.write_utf8(password)
- writer.write_long(seed)
- writer.write_byte(dimension)
- @staticmethod
- @threaded
- def Handshake(writer, token_or_user):
- with writer.lock:
- writer.write_byte(PacketType.Handshake)
- writer.write_utf8(token_or_user)
- ....
Add Comment
Please, Sign In to add comment