Commit Graph

13 Commits

Author SHA1 Message Date
Sebastian Crane 6a594c5ad3 Use strings instead of keywords for game names
This commit changes the internal representation of game names in the
state data to be strings instead of keywords. This fixes a potential
memory leak relating to games that no longer have any players, since
strings, unlike keywords, are garbage collected when no longer in use.

Resolves issue LibreGaming/matchbot#2

Signed-off-by: Sebastian Crane <seabass-labrax@gmx.com>
2022-03-30 12:11:10 +01:00
Sebastian Crane 71deb2c91d Add !help IRC command
Signed-off-by: Sebastian Crane <seabass-labrax@gmx.com>
2022-02-27 21:53:45 +00:00
Sebastian Crane 2f27cb8a86 Omit sender of !match command from players list
Signed-off-by: Sebastian Crane <seabass-labrax@gmx.com>
2022-02-26 23:34:38 +00:00
Sebastian Crane d9dc7acd34 Refactor response functions to use 'as->' macro
Signed-off-by: Sebastian Crane <seabass-labrax@gmx.com>
2022-02-26 23:18:19 +00:00
Sebastian Crane e4df11f12d Use case-insensitive sorting when listing players
Signed-off-by: Sebastian Crane <seabass-labrax@gmx.com>
2022-02-23 21:30:57 +00:00
Sebastian Crane c5a70954c3 Factor out keywordise-game function
Signed-off-by: Sebastian Crane <seabass-labrax@gmx.com>
2022-02-23 21:23:34 +00:00
Sebastian Crane c1572ed121 Use keyword arguments for response functions
Signed-off-by: Sebastian Crane <seabass-labrax@gmx.com>
2022-02-18 22:08:22 +00:00
Sebastian Crane 77b022455e Add !list IRC command to dispatch-command function
Signed-off-by: Sebastian Crane <seabass-labrax@gmx.com>
2022-02-18 22:08:22 +00:00
Sebastian Crane f891299236 Add response function with tests to list games
Signed-off-by: Sebastian Crane <seabass-labrax@gmx.com>
2022-02-09 21:46:07 +00:00
Sebastian Crane 083d51a879 Rename !list IRC command to !players
Signed-off-by: Sebastian Crane <seabass-labrax@gmx.com>
2022-02-09 21:45:03 +00:00
Sebastian Crane 5c0918f990 Add function with tests to dispatch IRC commands
Signed-off-by: Sebastian Crane <seabass-labrax@gmx.com>
2022-02-09 15:47:24 +00:00
Sebastian Crane ac1a8d9c94 Make signatures of response functions match
Signed-off-by: Sebastian Crane <seabass-labrax@gmx.com>
2022-02-09 14:20:06 +00:00
Sebastian Crane 6e0f0237b3 Add functions with tests for generating responses
Signed-off-by: Sebastian Crane <seabass-labrax@gmx.com>
2022-02-09 14:04:30 +00:00