somefriggnidiot / incobot-ts3 Goto Github PK
View Code? Open in Web Editor NEWInteractive console application for TS3 server administration.
License: GNU General Public License v3.0
Interactive console application for TS3 server administration.
License: GNU General Public License v3.0
The Config class and the configuration setup in general is not sustainable or scaleable. A better solution needs to be implemented.
As a project developer
I want organized lists of messages
So that I can more easily determine which messages are used for which cases.
Messages will be split based on use. I.E: Error messages, logging messages, messages sent to users.
We'll need a new folder under util
for the messages. We will continue to use public final static String
for each new class.
Need to write JavaDocs for SCM class.
https://github.com/somefriggnidiot/conbot/blob/master/src/main/server/ServerConnectionManager.java
Idlechecker can be started while already running, creating multiple simultaneous checkers.
A class-level boolean for the IdleChecker function class to be used as a isRunning
indicator. start
and stop
should check to see if the IdleChecker is running, and disable it if so.
As a bot manager
I want to control whether logs are sent to the console
So that I can control the flow of information
Config fields are added to indicate whether or not we should log messages to the console.
Messages are sent to the console only when we opt for it in the config.
Manual testing has been done to ensure changes work and do not affect other changes.
Unit testing is added as necessary.
A new configuration field should be added per component. (JoinHandler, LeaveHandler, MessageHandler, basic logging, etc.)
All logging messages should belong to a component.
As a project owner
I want unit tests for existing and future functionality
So that I can better ensure the quality of code changes.
Unit tests are created for all existing classes that contain logic.
All existing issues requirements are updated to include adding/updating unit tests as necessary.
Formatting for "Connection" messages in the console log are not being formatted correctly.
Current Example:
2017-12-17 21:13:09[CONNECTION] somefriggnidiot (uid) connected to "Default Channel"
Ideal Example:
[2017-12-17 21:13:09] [CONNECTION] somefriggnidiot (uid) connected to "Default Channel"
Because of the nature of this issue, it is likely that ClientJoinHandler is not utilizing MessageHandler.
As a bot developer
I want to abstract common, repeated code sequences into functions
So that I can create cleaner, less error-prone commands.
As a developer
I want to cache commonly used information about clients
So that I can better streamline the use of that information.
New object created to store info about connected clients.
All references to online or connected client information are uplifted to use the new object.
Manual testing has been done to ensure changes work and do not affect other changes.
Unit testing is added as necessary.
A "Client" (name TBD) object is created that stores ClientInfo and current channel of that client.
connectedUserList in SCM is uplifted to using new "Client" object.
Create a functionality for the bot to accept and handle chat commands.
As a server administrator
I want to limit access to commands on a per-user basis
So that I can better restrict the usage of admin actions.
Configuration updated to store access lists.
Unit test updated and/or created as necessary.
README updated.
Permissions should be checked between receiving the command and handling it.
User-level access should override group-level access.
There will be a new config files, storing UIDs of users. Config will act as a whitelist, storing the values as lists. Each list will correspond to a different access level. The access levels will be broken down as follows, from most to least power:
See #23 for similar story for groups.
"Normal" will not be in any list; any user without a role is assumed to be a normal user.
ServerConfigBuilder.java is missing JavaDocs.
When sending a message over 1024 characters long to aserver/channel/user.
The message cuts off.
The message should be send in multiple pieces.
As a server administrator
I want a log of when and where to clients move within the server
So that I can better understand the happenings of the server.
A message is displayed in the console when clients change channels or are moved within the server.
The message displayed is dependent on the circumstances of their moving.
Manual testing has been done to ensure changes work and do not affect other changes.
Unit testing is added as necessary.
Listener and Handler will need to be created for ClientMovedEvent.
Handler should include cases for whether there was an invoker or not.
As a client administrator
I want a chat command that lists connected user information
So that I can determine the target of future commands.
Command added to list UID, ClientID, and username of target(s).
Manual testing has been done to ensure command works both on front end and back end.
README updated with information about command usage.
Command should be able to be triggered from the client and the back-end.
Command should receive the following params: target (optional)
'Target' param should accept the following options:
User: somefriggnidiot | Client ID: 1 | UID: wuNgAy99zFpiNSmnS6i/lKHekLs=
UserInfoCommand.java created.
Command support added to handler in Commands.java
As a server administrator
I want to manage access lists from the TeamSpeak client
So that I can better restrict the usage of admin actions.
Chat command created to add or remove users to and from access roles.
Unit test updated and/or created as necessary.
README updated.
Command should only be accessible by Owner and Super Admins.
Command should take three arguments: action (add/remove), target, access group.
Command should work on users as well as groups.
As a bot owner
I want to know why my bot fails to connect to my server
So that so that I can better troubleshoot the issue.
Error messages should be used to concisely describe the source of the issue.
"Could not resolve host.", "You are banned from this server.", etc.
Tries and catches.
There appear to be missing messages from disconnections.
From general live testing, this appears to be mostly when clients lose connection.
As a server administrator
I want a log of when and why clients leave
So that I can better understand the circumstances of their leaving.
A message is displayed in the console when clients disconnect from the server, as well as whether or not the disconnect was forced for voluntary.
Manual testing has been done to ensure changes work and do not affect other changes.
Listener and Handler will need to be created for ClientLeaveEvent.
Handler should include cases for whether there was an invoker or not.
Configure build on Travis and ensure all is working.
https://docs.travis-ci.com/user/languages/java/
As a bot owners
I want to save log messages to a file
So that I can review server activity at a later date.
A new logging file should be created for each day the bot is running (starting at system/environment 00:00), with each message on its own line.
Messages should use the same format and timestamp granularity as those logged to the console.
logToFile()
method should be added to MessageHandler; should take care of actual logging of message.
As a client administrator
I want a chat command that allows me to remove users from the server
So that I can better moderate my server.
Command added to kick a player from the server.
Manual testing has been done to ensure command works both on front end and back end.
README updated with information about command usage.
Command should be able to be triggered from the client and the back-end.
Command should receive the following params: target (required), reason (required)
'Target' param should accept the numeric clientId of the target.
'Reason' should contain any string following the clientId.
KickUserCommand.java created.
Command support added to handler in Commands.java
As a bot owner/administrator
I want family friendly humor added to the bot
So that I can better entertain my server users.
Command should enable or disable the dad mode functionality.
When dad mode is enabled, bot respond to any message that starts with "I'm X", "I am X", "Im X" with "Hi, X. I'm Dad!"
Will need to add command to manage module.
Will need to add check in TextMessageEventHandler to see if message applies to dad mode.
As a developer
I want a flexible message handler
So that I can more easily send a message to multiple sources.
MessageHandler constructor accepts attributes common to all message types.
MessageHandler methods are chain-able to provide multiple messaging methods in one line.
Common Attributes: Message
Specific Attributes:
As a developer
I want a list of logging message prefixes
So that I can increase consistency in program output..
SCM should check to ensure config params are present before continuing.
SCM should allow storage of instance name.
This issue requires more information before work begins.
As a server administrator
I want to limit access to commands to specific groups
So that I can better restrict the usage of admin actions.
Configuration updated to store access lists.
Unit test updated and/or created as necessary.
README updated.
Permissions should be checked between receiving the command and handling it.
Commands should be categorized based on required access levels.
There will be a new config files, storing IDs of server groups. Config will act as a whitelist, storing the values as lists. Each list will correspond to a different access level. The access levels will be broken down as follows, from most to least power:
"Normal" will not be in any list; any user without a role is assumed to be a normal user.
As a client administrator
I want idle users to be automatically moved after some time
So that I can better judge the server's activity.
Configurable idle-checker/mover is created.
Manual testing has been done to ensure command works both on front end and back end.
README updated with information about functionality usage.
Functionality should include commands to change configuration.
Commands required:
A config file will need to be created for storage of the different options available.
All commands should operate as functions of a parent command. (I.E. !idlecheck on, !idlecheck set-time 30 minutes, !idlecheck add-ignore group, !idlecheck set-action kick)
Create command and config file, as well as a class that contains the logic for checking/moving idle users.
Logic class will run on a timer to continuously check for idle users when enabled.
In some rare cases, the bot will continuously move a user to AFK while idlechecker is active, even if the user is not above the activation threshold.
It's possible that this is happening due to an error in the bot's running environment or from a connection issue. There was no console output during this occurring.
As a bot administrator
I want to know if IdleChecker is running and what its MO is
So that I can better understand what features are active.
Command should be !idlechecker status
or default response for !idlechecker
without params.
Response should include whether or not IdleChecker is running, as well as the idle time threshold.
No new command class is necessary; this logic can go into IdleCheckerCommand#handle(String)
.
As a bot developer
I want to be able to easily return messages received from TextMessageEvents to their received target
So that I can more efficiently control the flow of messages and lessen the occurrence of errors.
Method should go into MessageHandler.java as another possible command to be tacked onto a MessageHandler object.
Method should receive a TextMessageEvent, check the target of that event, then return it to that target. If the target was CLIENT, the message should be sent to the invoker.
Create console command that allows connection to instance (by matching config instance name) and disconnection. Allow disconnection from console and client.
THIS REQUIRES MORE INFORMATION AND DESIGN BEFORE WORK IS READY
As a bot admin on a server
I want to be able to call the bot to my channel
So that I can use channel chat for commands and be less disruptive to the server.
Command should not take any parameters. When triggered, the bot should move to the channel of the invoker and announce itself in channel chat.
Commands.java will need to include new case for this command.
New command class will need to be created for handling this command.
As a bot administrator
I want to easily access IdleChecker functionalities without having to remember exact command names
So that less time is spent retyping closely related commands.
Base command (idlechecker
) should accept the following aliases: idlecheck
, idle
Argument enable
should accept: on
Argument disable
should accept: off
No new command class is necessary; this logic can go into IdleCheckerCommand
and Commands
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.