Merge lp://staging/~widelands-dev/widelands-metaserver/ircbridge into lp://staging/widelands-metaserver
Proposed by
Tino
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 47 | ||||
Proposed branch: | lp://staging/~widelands-dev/widelands-metaserver/ircbridge | ||||
Merge into: | lp://staging/widelands-metaserver | ||||
Diff against target: |
291 lines (+127/-15) 6 files modified
.bzrignore (+1/-0) wlms/client.go (+1/-0) wlms/ircbridge.go (+71/-0) wlms/main.go (+14/-3) wlms/server.go (+34/-11) wlms/server_test.go (+6/-1) |
||||
To merge this branch: | bzr merge lp://staging/~widelands-dev/widelands-metaserver/ircbridge | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tino | Needs Resubmitting | ||
SirVer | Needs Fixing | ||
Review via email: mp+203277@code.staging.launchpad.net |
Description of the change
A first draft of a irce bridge. Lets the metaserver connect to a irc channel an mirrors messages between the channel and the metaserver lobby.
To post a comment you must log in.
Nice. That is a really good idea and I think the implementation looks reasonable too. It is a bit drafty still, though (see comments below). Was this the first time you did something with go? How did you like it?
Some comments:
- func NewIRCBridge() IRCBridge should read its configuration from the same json file where we read the data from right now too (see main.go).
- I think the design is a little fragile - if something goes wrong with the IRC connection the whole metaserver comes down. How about running the IRC bridge in a go routine that gets a (buffered) channel of stuff to send and also sends stuff into a channel that the metaserver then displays? That way if the bridge is disconnected it can just discard the messages and the whole design is a bit decoupled. Also you can fake some IRC messages in a test and test the whole thing.
- +func (s *Server) Motd() string - I do not agree with this change. When a method is not changing a struct, it should not be a pointer receiver. There are only a few exceptions to this rule as far as I understood go so far (not an expert by any means).
- Please add some tests. Feel free to add end to end tests, there are already a few in the metaserver.