Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement SAYFROM command set (#274) + unify Battle/Channel #282

Merged
merged 76 commits into from
Feb 8, 2019
Merged

implement SAYFROM command set (#274) + unify Battle/Channel #282

merged 76 commits into from
Feb 8, 2019

Conversation

silentwings
Copy link
Contributor

@silentwings silentwings commented Oct 6, 2018

The chat for each battle now takes place in a channel.
Channels use for this purpose have names prefixed by __battle__
When a client joins/leaves a battle, he is auto-joined/left to this channel.
 (-> such channels can register with ChanServ and set a founder, topic, operators, mutes, bans, etc.) 
To speak in a battle, use SAY/SAYEX/SAYFROM into its channel.

-- Changes to protocol -- 
- JOINBATTLE (server) has an extra arg, containing the name of the channel associated to the battle
- removed SAYBATTLEPRIVATE SAYBATTLEPRIVATEEX 
- deprecated SAYBATTLE SAYBATTLEEX (-> use SAY/SAYEX)
- added !registerbattle and !mute/!unmute to ChanServ
- deprecated SETCHANNELKEY and ChanServ !lock/!unlock (-> use !setkey)
- fix #283: LEFT is reflected back to the user who leaves a channel 

Clients should send the 'u' compatibility flag to signal that they are prepared for the above.
Full backwards compatibility exists for clients lacking 'u'.
+ various related cleaning & re-organization
+ various fixes to channel bans/mutes
Copy link
Contributor

@abma abma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure thats a good direction?

chanserv commands are more difficult to parse: IHMO it would be better to try to deprecate ChanServ.

@silentwings
Copy link
Contributor Author

silentwings commented Oct 12, 2018

In the long term - yes, I would want to migrate ChanServ commands to server commands. But, I think what I've done is the best course of action for now.

I think ChanServ !cmds shouldn't be removed until lobbies have GUIs to handle it, which isn't going happen soon. When migration of ChanServ commands to server cmds does happen en masse, imo it makes sense to do it at the same time as fixing #58 & #135, which will require a tonne of changes to the battle/channel parts of the protocol anyway (partly because battles would then be identified by their channel name, and the integer battle_id would be removed). I'm not going to do that as part of this PR, this can wait for the future.

ChanServ has a similar syntax to SPADS (which will also need small changes), so its natural from the users point of view to have them make greater use of ChanServ, when making Battles & Channels into the same thing. (Chanserv is now present in registered battles.)

I've put a lot of work to make ChanServ into a friendlier system, with sensible error messages and cleaner code. My aim here is that game devs can (as channel/battle founder, which is !=host) use ChanServ to control who they set as autohost operators, whilst moderators have the oversight of setting who are the founders. Then bans/mutes/topics will be done server side, and not by SPADS; this is sensible because autohost owners are often long term afk, and the server is on the way to having effective account verification.

@silentwings silentwings mentioned this pull request Oct 13, 2018
@silentwings silentwings changed the title implement SAYFROM command set (#274) implement SAYFROM command set (#274) + unify Battle/Channel Oct 13, 2018
@silentwings
Copy link
Contributor Author

silentwings commented Oct 13, 2018

Re MUTE* specifically, I deprecated them because the servers "ChanServ" versions should be CHANNELMUTE* (and similarly for others) -- or perhaps a JSON MUTE cmd that could be integrated with a mod-only global mute; similarly for others. Not sure which I'd favour, but I want to leave this for the future, and for when lobbies have GUIs for it.

Copy link
Member

@gajop gajop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low effort review :P

Client.py Outdated Show resolved Hide resolved
restores functionality (that was used by SPADS) from SAYBATTLEPRIVATEEX, but now with a sensible command name
warn about all missing/deprecated/unknown flags

deprecate 'm' (does nothing) 
deprecate 'a' (superseded by 'l')
make 'b' optional (only for autohosts)
@silentwings
Copy link
Contributor Author

This is ready for merge / review.

@silentwings silentwings merged commit 22da69c into spring:master Feb 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants