tet
This commit is contained in:
parent
9e060d5a64
commit
c7130dffe6
6
main.go
6
main.go
@ -194,9 +194,11 @@ func main() {
|
||||
if ok {
|
||||
clt := Client{}
|
||||
r, _ := regexp.Compile("Client #(?P<ClientID>[0-9]+) name: '(?P<Name>.*)' company: (?P<CompanyID>[0-9]+) IP: (?P<Address>.*)")
|
||||
clt.ClientID, _ = strconv.ParseInt(r.ReplaceAllString(sp.Output, "${ClientID}"), 10, 32)
|
||||
ID64, _ := strconv.ParseInt(r.ReplaceAllString(sp.Output, "${ClientID}"), 10, 32)
|
||||
clt.ClientID = uint32(ID64)
|
||||
clt.Name = r.ReplaceAllString(sp.Output, "${ClientID}")
|
||||
clt.CompanyID, _ = strconv.ParseInt(r.ReplaceAllString(sp.Output, "${CompanyID}"), 10, 8)
|
||||
ID64, _ = strconv.ParseInt(r.ReplaceAllString(sp.Output, "${CompanyID}"), 10, 8)
|
||||
clt.CompanyID = uint8(ID64)
|
||||
clt.Address = r.ReplaceAllString(sp.Output, "${Address}")
|
||||
clients[clt.ClientID] = clt
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user