Skip to content

Commit

Permalink
add SuggestConfig support
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Cooper committed May 20, 2015
1 parent 04d27a2 commit e12ee33
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gumble/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,8 @@ type ServerConfigEvent struct {
AllowHTML bool
MaximumMessageLength int
MaximumImageMessageLength int

SuggestVersion Version
SuggestPositional bool
SuggestPushToTalk bool
}
11 changes: 11 additions & 0 deletions gumble/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -971,5 +971,16 @@ func (c *Client) handleServerConfig(buffer []byte) error {
}

func (c *Client) handleSuggestConfig(buffer []byte) error {
var packet MumbleProto.SuggestConfig
if err := proto.Unmarshal(buffer, &packet); err != nil {
return err
}
event := ServerConfigEvent{
Client: c,
SuggestVersion: Version{Version: packet.GetVersion()},
SuggestPositional: packet.GetPositional(),
SuggestPushToTalk: packet.GetPushToTalk(),
}
c.listeners.OnServerConfig(&event)
return errUnimplementedHandler
}

0 comments on commit e12ee33

Please sign in to comment.