libnmdc/AdcProtocol.go
mappu f5e516fe01 adc: initial handshake
--HG--
branch : adc
2017-11-22 20:02:21 +13:00

30 lines
553 B
Go

package libnmdc
type AdcProtocol struct {
hc *HubConnection
}
func NewAdcProtocol(hc *HubConnection) Protocol {
proto := AdcProtocol{}
proto.hc = hc
// Start logging in
hc.SayRaw("HSUP ADBASE ADTIGR\n")
return &proto
}
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"
}