libnmdc/UserInfo.go

29 lines
649 B
Go

package libnmdc
// This structure represents a user connected to a hub.
type UserInfo struct {
Nick string
Description string
ClientTag string
ClientVersion string
Email string
ShareSize uint64
ConnectionMode ConnectionMode
Flag UserFlag
Slots uint64
Speed string
HubsUnregistered uint64
HubsRegistered uint64
HubsOperator uint64
IsOperator bool
IPAddress string
}
func NewUserInfo(username string) *UserInfo {
return &UserInfo{
Nick: username,
ConnectionMode: CONNECTIONMODE_PASSIVE,
HubsUnregistered: 1,
}
}