diff --git a/mumble-bot/bot.py b/mumble-bot/bot.py index 2df1500..f5be254 100644 --- a/mumble-bot/bot.py +++ b/mumble-bot/bot.py @@ -54,6 +54,12 @@ def get_parser(): help="Set tokens list", nargs="*" ) + parser.add_argument( + "--ignore", + help="List of ignored users", + nargs="*", + default=[] + ) return parser @@ -71,7 +77,8 @@ def main(): tokens = args.tokens is_streaming = False stream_always = args.stream - + ignored_users = args.ignore + # Spin up a client and connect to mumble server mumble = pymumble.Mumble(server, nick, password=pwd, port=port, tokens=tokens) @@ -102,7 +109,7 @@ def main(): try: for user in mumble.users.values(): # check the audio queue of each user - if user.sound.is_sound(): + if user.sound.is_sound() and user["name"] not in ignored_users: # available sound is to be treated now and not later sound = user.sound.get_sound(FLOAT_RESOLUTION) stereo_pcm = audioop.tostereo(sound.pcm, 2, 1, 1)