fix parsing connection modes in MyINFO
This commit is contained in:
parent
7e249acd6c
commit
d373e9791a
@ -71,7 +71,7 @@ var rx_myinfo *regexp.Regexp
|
|||||||
var rx_myinfo_notag *regexp.Regexp
|
var rx_myinfo_notag *regexp.Regexp
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// $ALL <nick> <description>$ $<connection><flag>$<e-mail>$<sharesize>$
|
// Format: $ALL <nick> <description>$ $<connection><flag>$<e-mail>$<sharesize>$
|
||||||
|
|
||||||
HEAD := `(?ms)^\$ALL ([^ ]+) `
|
HEAD := `(?ms)^\$ALL ([^ ]+) `
|
||||||
FOOT := `\$.\$([^$]+)\$([^$]*)\$([0-9]*)\$$`
|
FOOT := `\$.\$([^$]+)\$([^$]*)\$([0-9]*)\$$`
|
||||||
@ -106,7 +106,7 @@ func (this *UserInfo) fromMyINFO(protomsg string) error {
|
|||||||
this.Description = NMDCUnescape(matches[2])
|
this.Description = NMDCUnescape(matches[2])
|
||||||
this.ClientTag = NMDCUnescape(matches[3])
|
this.ClientTag = NMDCUnescape(matches[3])
|
||||||
this.ClientVersion = matches[4]
|
this.ClientVersion = matches[4]
|
||||||
this.ConnectionMode = ConnectionMode(matches[4][0])
|
this.ConnectionMode = ConnectionMode(matches[5][0])
|
||||||
maybeParse(matches[6], &this.HubsUnregistered, 0)
|
maybeParse(matches[6], &this.HubsUnregistered, 0)
|
||||||
maybeParse(matches[7], &this.HubsRegistered, 0)
|
maybeParse(matches[7], &this.HubsRegistered, 0)
|
||||||
maybeParse(matches[8], &this.HubsOperator, 0)
|
maybeParse(matches[8], &this.HubsOperator, 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user