Add channel whitelist for excluding channels from idle handling
This adds a new channel_whitelist variable that can be used to specify channels that players won't be moved from even if they are idle. Fixes: #8
This commit is contained in:
committed by
Stefan Hacker
parent
0361021fbd
commit
e595ea861b
@@ -28,9 +28,11 @@ channel = 0
|
|||||||
;source_channel = -1
|
;source_channel = -1
|
||||||
; Comma seperated list of player names that will not be moved when idle (such as bots)
|
; Comma seperated list of player names that will not be moved when idle (such as bots)
|
||||||
whitelist =
|
whitelist =
|
||||||
|
; Comma seperated list of channel ids from which players will not be moved even when idle.
|
||||||
|
; channel_whitelist =
|
||||||
|
|
||||||
; For every server you want to override the [all] section for create
|
; For every server you want to override the [all] section for create
|
||||||
; a [server_<serverid>] section. For example:
|
; a [server_<serverid>] section. For example:
|
||||||
|
|
||||||
; Overriding [all] for server with the id 1 would look like this
|
; Overriding [all] for server with the id 1 would look like this
|
||||||
;[server_1]
|
;[server_1]
|
||||||
;threshold = 60
|
;threshold = 60
|
||||||
|
|||||||
@@ -59,7 +59,8 @@ class idlemove(MumoModule):
|
|||||||
('deafen', commaSeperatedBool, [False]),
|
('deafen', commaSeperatedBool, [False]),
|
||||||
('channel', commaSeperatedIntegers, [1]),
|
('channel', commaSeperatedIntegers, [1]),
|
||||||
('source_channel', commaSeperatedIntegers, [-1]),
|
('source_channel', commaSeperatedIntegers, [-1]),
|
||||||
('whitelist', commaSeperatedStrings, [])
|
('whitelist', commaSeperatedStrings, []),
|
||||||
|
('channel_whitelist', commaSeperatedIntegers, [])
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,6 +160,7 @@ class idlemove(MumoModule):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
if user.idlesecs > threshold and\
|
if user.idlesecs > threshold and\
|
||||||
|
user.channel not in scfg.channel_whitelist and\
|
||||||
(source_channel == -1 or\
|
(source_channel == -1 or\
|
||||||
user.channel == source_channel or\
|
user.channel == source_channel or\
|
||||||
user.channel == channel):
|
user.channel == channel):
|
||||||
|
|||||||
Reference in New Issue
Block a user