libnmdc/AdcProtocol.go

29 lines
568 B
Go
Raw Normal View History

package libnmdc
type AdcProtocol struct {
hc *HubConnection
}
func NewAdcProtocol(hc *HubConnection) *AdcProtocol {
proto := AdcProtocol{}
proto.hc = hc
return &proto
}
var _ Protocol = &AdcProtocol{} // assert interface implementation
func (this *AdcProtocol) ProcessCommand(msg string) {
this.hc.processEvent(HubEvent{EventType: EVENT_DEBUG_MESSAGE, Message: msg})
}
func (this *AdcProtocol) SayPublic(msg string) {
}
func (this *AdcProtocol) SayPrivate(user, message string) {
}
func (this *AdcProtocol) ProtoMessageSeparator() string {
return "\n"
}