Comments (3)
Hey! We agree, and in fact this is something we want to be doing. Unfortunately, the current IRC library we use is not async, meaning the code isn't made to support other transports. The first step towards making this happens is to move libraries, and update the code to be async. Once that's done, the rest should be relatively easy!
from lykos.
Although I note "pluggable" isn't an explicit goal here; all the transport code would live in the bot itself. There's a fair amount of work to be made to make the game code agnostic to what transport is used, rough sketch as follows:
- Common abstraction layer that all transports must implement, that will call into game code (via Events) and be called by the game code (via async calls)
- Refactor the User and Channel concepts to be more generic; only capturing game-relevant info at the top level and having transport-specific subclasses. Right now both inherit from IRCContext, and while the existing implementations would likely be mostly used as-is for the IRC-specific subclass there would need to be a higher-level abstract User and Channel that exposes a smaller API for gameplay
- Migrate IRC library to something that supports async in order to fit in with the new abstractions created by the above steps. We've already identified a suitable library for this called ircrobots, but no migration work has been made yet.
Once those steps are complete, using a different transport should be a simple matter of changing botconfig; the botconfig aspect is already designed to be transport-agnostic in preparation for the above steps.
from lykos.
Yeah transport agnostic is a much better phrase. I didn't mean explicit pluggeable. Maybe label this issue as feature request?
from lykos.
Related Issues (20)
- votes required to lynch counter doesn't take narcolepsy into account
- !abstain works d1 HOT 1
- werecrow can't pick a new target if the old one idles out
- Server mode changes not tracked
- Masq: vil lynched, WC turned, game ended in wolf win, WC didn't get the win
- Game doesn't end when fool is lynched HOT 1
- piper win condition seems to be broken HOT 1
- Wild child incorrectly turned into wolf and didn't get a win
- !roles shows internal role names
- Idle timeout message happened twice HOT 4
- VG is not told about swaps resulting from exchange totems, leading to confusion
- Master of Teleportation can act multiple times in one night
- !gstats counts Fool wins and Fool wins separately HOT 1
- Information leak swapping via exchange totem
- GA can end night by passing then guarding HOT 1
- !p and !m show tuples for some roles
- Dead VG regains +v if they !swap
- Ping !starters when !start times out
- Special-case PMs of the form foo:/
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lykos.