We are migrating towards a new forum system located at community.teamspeak.com, as such this forum will become read-only on January 29, 2020
Hi
Will it be possible to make the bot kick ONE person if server is full?
i.e
I got a 32 slot server.
I already make the bot move clients to channel AFK after 60 minutes Idle.
This works like a charm
If the slot count is 32/32 the bot will kick the client that has been Idle for the longest time in channel AFK.
This mean the server will always have 1 slot available.
OR more ideal solution: The bot will kick if server is full AND one client try to join.
1-3 slots are enough, depending on the server size. This is not a licensing fee avoidance feature, this is a security and maintenance feature.
I notice the system, of an error, and in log this
Code:2018-09-18 21:26:54 Function BadNick INFO Client "TeamSpeakUser" (db id: 1938) was kicked, nickname matched bad nickname rules! 2018-09-18 21:26:54 Function ServerGroupNotify ERROR Exception in handleTS3Events()! 2018-09-18 21:26:54 Function ServerGroupNotify EXCEPTION java.util.ConcurrentModificationException
i cant find the failure, in the away funftion the channel id numder is set and in the idle funktion all parameters are set, why i have to become this failures? can someone help please?Code:2018-12-06 14:05:36 JTS3ServerMod STATUS Virtual bot instance "bot1" starts now (build 6501) 2018-12-06 14:05:36 JTS3ServerMod STATUS Activate log level: DEBUG 2018-12-06 14:05:36 JTS3ServerMod INFO Successfully loaded function: AwayMover / AwayMover 2018-12-06 14:05:36 JTS3ServerMod INFO Successfully loaded function: BadChannelNameCheck / BadChannelName 2018-12-06 14:05:36 JTS3ServerMod INFO Successfully loaded function: BadNicknameCheck / BadNickname 2018-12-06 14:05:36 JTS3ServerMod INFO Successfully loaded function: IdleCheck / IdleCheck 2018-12-06 14:05:36 JTS3ServerMod INFO Successfully loaded function: MuteMover / MuteMover 2018-12-06 14:05:36 JTS3ServerMod INFO Successfully loaded function: RecordCheck / RecordCheck 2018-12-06 14:05:36 Function AwayMover ERROR Exception in loadConfig(), disable() or activate()! 2018-12-06 14:05:36 Function AwayMover EXCEPTION Bot Version: 6.5.0 (20.08.2018) java.lang.NumberFormatException: Config value of "AwayMover_channel_id" is not a number! Current value: not set at de.stefan1200.jts3servermod.functions.AwayMover.loadConfig(Unknown Source) at de.stefan1200.jts3servermod.JTS3ServerMod.a(Unknown Source) at de.stefan1200.jts3servermod.JTS3ServerMod.b(Unknown Source) at de.stefan1200.jts3servermod.JTS3ServerMod.b(Unknown Source) at de.stefan1200.jts3servermod.h.run(Unknown Source) at java.lang.Thread.run(Unknown Source) 2018-12-06 14:05:36 Function IdleCheck INFO All idle time limits are disabled, Idle Check function will be disabled now! 2018-12-06 14:05:36 Function MuteMover ERROR Exception in loadConfig(), disable() or activate()! 2018-12-06 14:05:36 Function MuteMover EXCEPTION Bot Version: 6.5.0 (20.08.2018) de.stefan1200.jts3servermod.BotConfigurationException: Headphone and Microphone detection in config disabled! at de.stefan1200.jts3servermod.functions.MuteMover.loadConfig(Unknown Source) at de.stefan1200.jts3servermod.JTS3ServerMod.a(Unknown Source) at de.stefan1200.jts3servermod.JTS3ServerMod.b(Unknown Source) at de.stefan1200.jts3servermod.JTS3ServerMod.b(Unknown Source) at de.stefan1200.jts3servermod.h.run(Unknown Source) at java.lang.Thread.run(Unknown Source) 2018-12-06 14:05:37 JTS3ServerMod INFO Successful connected to *********! 2018-12-06 14:05:37 JTS3ServerMod INFO Login as "Server" successful! 2018-12-06 14:05:37 JTS3ServerMod INFO Successful selected virtual server on port ****! 2018-12-06 14:05:38 JTS3ServerMod INFO Server connection log is activated and will be written into the file: C:\JTS3ServerMod_6.5.0\JTS3ServerMod\JTS3ServerMod_server1_login.csv 2018-12-06 14:05:38 JTS3ServerMod INFO Creating client database cache... 2018-12-06 14:05:38 Function BadChannelName INFO Bad Channel Name Check is enabled, 3 rules loaded and matching channel names will be deleted, if rename is not possible! 2018-12-06 14:05:38 Function BadNickname INFO Bad Nickname Check is enabled, 3 rules loaded (client will be kicked) 2018-12-06 14:05:38 Function RecordCheck INFO Client get kicked from Server after start recording 2018-12-06 14:05:38 JTS3ServerMod INFO Bot started and connected successful, write !botinfo in server chat to get an answer! 2018-12-06 14:05:43 JTS3ServerMod INFO Client database cache created, 36 clients in cache.
Last edited by blackangel1986; December 6th, 2018 at 02:23 PM.
Just fix this errors in your JTS3ServerMod server config file:
- MuteMover: Headphone and Microphone detection in config disabled!
- AwayMover: Config value of "AwayMover_channel_id" is not a number! Current value: not set
- IdleCheck: All idle time limits are disabled, Idle Check function will be disabled now!
here the config fileCode:# Config file of the JTS3ServerMod # http://www.stefan1200.de # This file must be saved with the ANSI encoding ISO-8859-1! # Teamspeak 3 server address ts3_server_address = ****** # Teamspeak 3 server query port, default is 10011 (raw) and 10022 (ssh) ts3_server_query_port = 10011 # Teamspeak 3 server query admin account name ts3_server_query_login = ****** # Teamspeak 3 server query admin password ts3_server_query_password = ****** # Teamspeak 3 server query mode, possible values: raw and ssh # raw = The default unencrypted way to connect to the TS3 server. # ssh = The communication to the TS3 server will be encrypted. Possible since TS3 server version 3.3.0 and needs to be activated at the TS3 server. ts3_server_query_mode = raw # Teamspeak 3 virtual server ID or -1 to use ts3_virtualserver_port ts3_virtualserver_id = -1 # Teamspeak 3 virtual server port, only needed if ts3_virtualserver_id is set to -1 ts3_virtualserver_port = **** # Channel id, the bot will join into it after connecting. If not wanted, use a negative number like -1. # Don't set the default channel here, because the bot is already in the default channel after connecting. bot_channel_id = -1 # Activate the slow mode of the bot, 0 = disable, 1 = enable. # If slow mode is activated, the bot connects slower to the server # and disables some bot features to reduce the amount of needed commands. # This feature may allow you to use the bot without whitelist the bot IP address. # Slow mode disables the client database list cache and do not allow the bot check interval to be lower than 3 seconds. bot_slowmode = 0 # Check every X seconds, default is 1. Values between 1 and 30 are allowed. # If slow mode is activated, 3 is the lowest possible value. bot_check_interval = 1 # A different encoding of the messages config files. # Default is UTF-8 which should be good for all EU and US languages. # Change this only if you know what you are doing! # For English or German language you can also use the encoding ISO-8859-1 # A list of all valid ones: http://docs.oracle.com/javase/1.5.0/docs/guide/intl/encoding.doc.html bot_messages_encoding = UTF-8 # This enables the client database list cache. This cache is needed for commands like !searchip or !searchdesc. 1 = Enable, 0 = Disable bot_clientdblist_cache = 1 # This enables the global message variables. See readme file for a list of variables. 1 = Enable, 0 = Disable # If enabled, you can use all server variables in all messages. If not needed, disable this to save performance. bot_global_message_vars = 1 # Server Query name, this will be displayed as name of the connection. bot_server_query_name = Server # Second Server Query name, this will be displayed as name of the connection. # This name will be used, if the first name is already in use. bot_server_query_name_2 = Server # Change the date pattern, which will be used to format a date in chat functions and welcome message. # To get help how to make such a pattern, look here: http://docs.oracle.com/javase/1.5.0/docs/api/java/text/SimpleDateFormat.html bot_date_pattern = yyyy-MM-dd HH:mm:ss # Change the timezone of the bot, which will be used for the date of the chat functions and welcome message. # If nothing is set here, the default timezone of the operating system will be used. # To get a list of valid timezones, look at the TZ column on the following page: # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List bot_timezone = # Should the bot try to connect forever if the Teamspeak server or the bot is offline? 0 = disable, 1 = enable bot_connect_forever = 1 # Minimum log level, how much details you want to be written to the bot log files? Default is 1. # Higher log levels will be also written, as an example: You set log level to 2, level 2, 3 and critical errors will be written to bot log file. # 0 = Debug # 1 = Information (recommended and default) # 2 = Warning (recommended for smaller log files) # 3 = Error (experts only) bot_log_level = 0 # A comma separated list (without spaces) of unique user ids, which should be able to use bot admin commands. # The unique user ids looks like this: mBbHRXwDAG7R19Rv3PorhMwbZW4= bot_admin_list = ***** # A comma separated list (without spaces) of server group ids, which should be able to use the following bot admin commands: # !channellist, !listchannelgroups, !listinactiveclients, !listinactivechannels, !listservergroups, !msgchannelgroup, !msgservergroup, !pokechannelgroup, # !pokeservergroup, !removeservergroups, !removechannelgroups, !searchclient, !searchdesc, !searchip, !setchannelgroup and !setchannelname. # All other bot admin commands are not allowed! bot_lightadmingroup_list = bot_functions = AwayMover:AwayMover,BadChannelNameCheck:BadChannelName,BadNicknameCheck:BadNickname,IdleCheck:IdleCheck,MuteMover:MuteMover,RecordCheck:RecordCheck #Advertising:advertising,AutoMove:automove,AwayMover:away,BadChannelNameCheck:badchannelname,BadNicknameCheck:badnickname,ChannelNotify:channelnotify,IdleCheck:idle,InactiveChannelCheck:icc,InactiveClientsCleaner:cleaner,LastSeen:lastseen,MuteMover:mute,RecordCheck:record,ServerGroupNotify:servergroupnotify,ServerGroupProtection:servergroupprotection,WelcomeMessage:welcome,WelcomeMessage:welcome_guest # Set a comma separated list (without spaces) of needed but disabled bot functions here. # Same format as bot_functions! # All functions you set here are not activated at bot start, but you can switch on functions using chat commands. bot_functions_disabled = # Move client back if not away anymore? Set yes or no here! away_moveback = yes # Channel id to move away clients into it away_channel_id = 115 # Idle time in seconds after the client with away status will be moved to the channel. # Has between 0 and 10000 seconds! away_delay = 600 # A comma separated list (without spaces) of channel ids. # Depends on the given mode, this channels can be ignored or only this channels will be checked! # If no channels should be ignored, set no channels here and select the channel list mode ignore! away_channel_list = 89,122,123,125,120,121,131,108,110,117,128 # Select one of the two modes for the channel list. # ignore = The selected channels will be ignored. # only = Only the selected channels will be checked. away_channel_list_mode = ignore # A comma separated list (without spaces) of server group ids. # Depends on the given mode, this server groups can be ignored or only this server groups will be checked! # If no server groups should be ignored, set no server groups here and select the group list mode ignore! away_group_list = 2,39,42 # Select one of the two modes for the server group list. # ignore = The selected server groups will be ignored. # only = Only the selected server groups will be checked. away_group_list_mode = ignore # Select the message mode, how the client should get the message. # poke, chat or none are valid values! away_message_mode = chat # Path to file which contains the away mover message away_file = %apphome%config/server1/awaymessages.cfg # Instantly kick client that creates a channel with a bad name? Set yes or no here! badchannelname_kick = yes # Instantly delete a channel with a bad name? Set always, onlynew or no here! # onlynew = Try to rename channel back first. Only if that fail (maybe channel is quite new and the old name is unknown) the channel will be deleted! # no = Try to rename channel back, but the channel will not be deleted! badchannelname_delete = onlynew # A comma separated list (without spaces) of channel ids. # This channels will be ignored! badchannelname_channel_list = # Add complain entry to the user? Set yes or no here! badchannelname_add_complain = yes # A comma separated list (without spaces) of server group ids. # Depends on the given mode, this server groups can be ignored or only this server groups will be checked! # If no server groups should be ignored, set no server groups here and select the group list mode ignore! badchannelname_group_list = # Select one of the two modes for the server group list. # ignore = The selected server groups will be ignored and can create channels with bad channel names. # only = Only the selected server groups will be checked. badchannelname_group_list_mode = ignore # Select the message mode, how the client should get the message. # poke, chat or none are valid values! # If client kick is activated, the message will be always used as kick message! badchannelname_message_mode = poke # Path to file which contains the Bad Channel Name Check rules and the message. badchannelname_file = %apphome%config/server1/badchannelname.cfg # Kick client with a bad nickname? Set yes or no here! badnickname_kick = yes # Add complain entry to the user? Set yes or no here! badnickname_add_complain = yes # A comma separated list (without spaces) of server group ids. # Depends on the given mode, this server groups can be ignored or only this server groups will be checked! # If no server groups should be ignored, set no server groups here and select the group list mode ignore! badnickname_group_list = # Select one of the two modes for the server group list. # ignore = The selected server groups will be ignored and can have bad nicknames. # only = Only the selected server groups will be checked. badnickname_group_list_mode = ignore # Select the message mode, how the client should get the message. # poke or chat are valid values! # If client kick is activated, the message will be always used as kick message! badnickname_message_mode = poke # Path to file which contains the bad nickname message and check rules. badnickname_file = %apphome%config/server1/badnickname.cfg # Set the idle warn time in minutes or set -1 to disable this feature. idle_warn_time = 15 # Set the idle group time in minutes or set -1 to disable this feature. # Clients will be added to the specified server group after being idle for this time! idle_group_time = -1 # Set the idle move time in minutes or set -1 to disable this feature. # Clients will be moved to the specified channel after being idle for this time! idle_move_time = 30 # Set the idle kick time in minutes or set -1 to disable this feature. # Clients will be kicked from the server after being idle for this time! idle_kick_time = 60 # If the clients should be put into a temporary server group, set the server group id here. # You should use a server group, which adds the server group name to the client name, so everyone can quickly see, that someone is away. # Notice: That server group only need the following permissions (first three are set by default): # i_group_needed_modify_power, i_group_needed_member_add_power, i_group_needed_member_remove_power and i_group_show_name_in_tree # Important: Make sure, that the specified server group don't has set the permission b_group_is_permanent! # You can also set -6 (sg name on the left side) or -9 (sg name on the right side) to create a new server group with the name AFK. # This will update the bot configuration and the bot needs the permission b_virtualserver_servergroup_create one time! idle_group_id = -1 # If the clients should be moved, set channel id to move idle clients into it. idle_channel_id = 115 # If the clients got moved, move client back if not idle anymore? Set yes or no here! idle_moveback = yes # A comma separated list (without spaces) of channel ids. # Depends on the given mode, this channels can be ignored or only this channels will be checked! # If no channels should be ignored, set no channels here and select the channel list mode ignore! idle_channel_list = 89,122,123,125,120,121,131,108,117,128,110 # Select one of the two modes for the channel list. # ignore = The selected channels will be ignored. # only = Only the selected channels will be checked. idle_channel_list_mode = ignore # A comma separated list (without spaces) of server group ids. # Depends on the given mode, this server groups can be ignored or only this server groups will be checked! # If no server groups should be ignored, set no server groups here and select the group list mode ignore! idle_group_list = 39,42,2 # Select one of the two modes for the server group list. # ignore = The selected server groups will be ignored. # only = Only the selected server groups will be checked. idle_group_list_mode = ignore # A minimum client count to activate the idle check (Query clients are not counted). # If less clients are in the channel or on the server, idle check does nothing. idle_min_clients = 0 # Select if the minimum client count is needed in the channel or on the server. # channel or server are valid values! idle_min_clients_mode = server # Select the message mode, how the client should get the warning message. # poke or chat are valid values! idle_warn_message_mode = chat # If the clients should be put into the specified server group, select the message mode, how the client should get the message. # poke, chat or none are valid values! idle_group_message_mode = chat # If the clients should be moved to the specified channel, select the message mode, how the client should get the message. # poke, chat or none are valid values! idle_move_message_mode = chat # Path to file which contains the idle messages idle_file = %apphome%config/server1/idlecheckmessages.cfg # Move client back if not muted anymore? Set yes or no here! mute_moveback = yes # Enable move, if the headphone was muted using the Teamspeak Client, yes or no mute_headphone = yes # Enable move, if the microphone was muted using the Teamspeak Client, yes or no mute_microphone = yes # Enable move, if the sound output hardware (for speakers/headphone) is missing or a disabled hardware is selected in the client settings. # Set yes or no here! mute_headphone_hardware = yes # Enable move, if the sound input hardware (for a microphone) is missing or a disabled hardware is selected in the client settings. # This also happen, if someone is speaking on another Teamspeak server. Set yes or no here! mute_microphone_hardware = yes # Move the client if the client has all selected conditions or at least one? Set all or one here! mute_condition_mode = one # Channel id to move muted clients into it mute_channel_id = 115 # Idle time in seconds after the client with a specified mute status will be moved to the channel. # Has between 0 and 10000 seconds! mute_delay = 30 # A comma separated list (without spaces) of channel ids. # Depends on the given mode, this channels can be ignored or only this channels will be checked! # If no channels should be ignored, set no channels here and select the channel list mode ignore! mute_channel_list = 89,122,123,125,120,121,131,108,117,128,110 # Select one of the two modes for the channel list. # ignore = The selected channels will be ignored. # only = Only the selected channels will be checked. mute_channel_list_mode = ignore # A comma separated list (without spaces) of server group ids. # Depends on the given mode, this server groups can be ignored or only this server groups will be checked! # If no server groups should be ignored, set no server groups here and select the group list mode ignore! mute_group_list = 39,42,2 # Select one of the two modes for the server group list. # ignore = The selected server groups will be ignored. # only = Only the selected server groups will be checked. mute_group_list_mode = ignore # Select the message mode, how the client should get the message. # poke, chat or none are valid values! mute_message_mode = chat # Path to file which contains the mute mover message mute_file = %apphome%config/server1/mutemessages.cfg # Select the action if a client starts recording, possible values: kick and move record_action = kick # If clients should be moved, set channel id to move recording clients into it record_channel_id = # A comma separated list (without spaces) of channel ids. # Depends on the given mode, this channels can be ignored or only this channels will be checked! # If no channels should be ignored, set no channels here and select the channel list mode ignore! record_channel_list = # Select one of the two modes for the channel list. # ignore = The selected channels will be ignored. # only = Only the selected channels will be checked. record_channel_list_mode = ignore # A comma separated list (without spaces) of server group ids. # Depends on the given mode, this server groups can be ignored or only this server groups will be checked! record_group_list = 39,42,2 # Select one of the two modes for the server group list. # ignore = The selected server groups will be ignored and are allowed to record. # only = Only the selected server groups will be checked and punished, if they start recording. # If no server groups should be ignored, set no server groups here and select the group list mode ignore! record_group_list_mode = ignore # A comma separated list (without spaces) of channel group ids. # Depends on the given mode, this channel groups can be ignored or only this channel groups will be checked! # If no channel groups should be ignored, set no channel groups here and select the group list mode ignore! record_channelgroup_list = # Select one of the two modes for the channel group list. # ignore = The selected channel groups will be ignored and are allowed to record. # only = Only the selected channel groups will be checked and punished, if they start recording. record_channelgroup_list_mode = ignore # Add complain entry to the user? Set yes or no here! record_add_complain = yes # If clients should be moved, select the message mode, how the client should get the message. # poke, chat or none are valid values! record_message_mode = poke # Path to file which contains the record message record_file = %apphome%config/server1/recordmessages.cfg
Well, almost all config value names are wrong. One example:
The bot is looking for the value of AwayMover_channel_id. You said to me, that this contains the number 115. But that is wrong. The name AwayMover_channel_id does not exists, you only have away_channel_id. But at the bot_functions line you told the bot to look for the configuration with the prefix AwayMover, but in the config you use the prefix away. This is NOT the same!
Fix your configuration based on the manual. The fasted way would be fixing the function names at the bot_functions line.
awaymover is fixed, but the idlecheck and the mutemover are alway with failure
There are currently 1 users browsing this thread. (0 members and 1 guests)