mirror of
https://github.com/azlux/pymumble
synced 2024-11-23 13:56:26 +00:00
Compare commits
2 Commits
d37c4c721c
...
790a5262b0
Author | SHA1 | Date | |
---|---|---|---|
790a5262b0 | |||
|
58ccdcc146 |
@ -695,6 +695,10 @@ class Mumble(threading.Thread):
|
||||
userstate.user_id = cmd.parameters["user_id"]
|
||||
if "plugin_context" in cmd.parameters:
|
||||
userstate.plugin_context = cmd.parameters["plugin_context"]
|
||||
if "listening_channel_add" in cmd.parameters:
|
||||
userstate.listening_channel_add.extend(cmd.parameters["listening_channel_add"])
|
||||
if "listening_channel_remove" in cmd.parameters:
|
||||
userstate.listening_channel_remove.extend(cmd.parameters["listening_channel_remove"])
|
||||
|
||||
self.send_message(PYMUMBLE_MSG_TYPES_USERSTATE, userstate)
|
||||
cmd.response = True
|
||||
|
@ -265,3 +265,19 @@ class User(dict):
|
||||
|
||||
cmd = messages.RemoveUser(self.mumble_object.users.myself_session, params)
|
||||
self.mumble_object.execute_command(cmd)
|
||||
|
||||
def add_listening_channels(self, channel):
|
||||
"""Add user to listening channel"""
|
||||
params = {"session": self["session"],
|
||||
"listening_channel_add": channel}
|
||||
|
||||
cmd = messages.ModUserState(self.mumble_object.users.myself_session, params)
|
||||
self.mumble_object.execute_command(cmd)
|
||||
|
||||
def remove_listening_channels(self, channel):
|
||||
"""Remove user from listening channel"""
|
||||
params = {"session": self["session"],
|
||||
"listening_channel_remove": channel}
|
||||
|
||||
cmd = messages.ModUserState(self.mumble_object.users.myself_session, params)
|
||||
self.mumble_object.execute_command(cmd)
|
||||
|
Loading…
Reference in New Issue
Block a user