Function optimization.
This commit is contained in:
parent
e91b584219
commit
f57ef16912
1 changed files with 1 additions and 6 deletions
|
|
@ -196,12 +196,7 @@ def get_cwho_list(channel_name, return_muted=False):
|
|||
return_muted: (bool) Return those who have the channel muted if True.
|
||||
"""
|
||||
sess_list = session_mgr.get_session_list()
|
||||
result_list = []
|
||||
for sess in sess_list:
|
||||
if plr_has_channel(sess, channel_name, return_muted):
|
||||
result_list.append(sess)
|
||||
|
||||
return result_list
|
||||
return [sess for sess in sess_list if plr_has_channel(sess, channel_name, return_muted)]
|
||||
|
||||
def send_cmessage(channel_name, message):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue