More cleanup, merged pymumble into the project so I don't have to maintain 2 separate things, tested working version.

This commit is contained in:
Storm Dragon
2025-06-14 00:23:09 -04:00
parent bfbfe30be4
commit 947ec68754
36 changed files with 5861 additions and 551 deletions

42
pymumble_py3/blobs.py Normal file
View File

@@ -0,0 +1,42 @@
# -*- coding: utf-8 -*-
import struct
from .constants import *
from .mumble_pb2 import RequestBlob
class Blobs(dict):
"""
Manage the Blob library
"""
def __init__(self, mumble_object):
self.mumble_object = mumble_object
def get_user_comment(self, hash):
"""Request the comment of a user"""
if hash in self:
return
request = RequestBlob()
request.session_comment.extend(struct.unpack("!5I", hash))
self.mumble_object.send_message(PYMUMBLE_MSG_TYPES_REQUESTBLOB, request)
def get_user_texture(self, hash):
"""Request the image of a user"""
if hash in self:
return
request = RequestBlob()
request.session_texture.extend(struct.unpack("!5I", hash))
self.mumble_object.send_message(PYMUMBLE_MSG_TYPES_REQUESTBLOB, request)
def get_channel_description(self, hash):
"""Request the description/comment of a channel"""
if hash in self:
return
request = RequestBlob()
request.channel_description.extend(struct.unpack("!5I", hash))
self.mumble_object.send_message(PYMUMBLE_MSG_TYPES_REQUESTBLOB, request)