aboutsummaryrefslogtreecommitdiff
path: root/hotline/client_conn.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2022-06-24 19:03:49 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2022-06-24 19:03:49 -0700
commita7216f677e7b02831328293224730f6f06f2d38a (patch)
tree0694960361d7723b7ab77e76fb1f4a1f6db9de9e /hotline/client_conn.go
parent590974641fde819128297803a12cfd4c744283a8 (diff)
Remove unnecessary use of pointers
Diffstat (limited to 'hotline/client_conn.go')
-rw-r--r--hotline/client_conn.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/hotline/client_conn.go b/hotline/client_conn.go
index 41810a8..076919f 100644
--- a/hotline/client_conn.go
+++ b/hotline/client_conn.go
@@ -31,13 +31,13 @@ type ClientConn struct {
Connection io.ReadWriteCloser
RemoteAddr string
ID *[]byte
- Icon *[]byte
- Flags *[]byte
+ Icon []byte
+ Flags []byte
UserName []byte
Account *Account
IdleTime int
Server *Server
- Version *[]byte
+ Version []byte
Idle bool
AutoReply []byte
@@ -102,17 +102,17 @@ func (cc *ClientConn) handleTransaction(transaction Transaction) error {
// if user was previously idle, mark as not idle and notify other connected clients that
// the user is no longer away
if cc.Idle {
- flagBitmap := big.NewInt(int64(binary.BigEndian.Uint16(*cc.Flags)))
+ flagBitmap := big.NewInt(int64(binary.BigEndian.Uint16(cc.Flags)))
flagBitmap.SetBit(flagBitmap, userFlagAway, 0)
- binary.BigEndian.PutUint16(*cc.Flags, uint16(flagBitmap.Int64()))
+ binary.BigEndian.PutUint16(cc.Flags, uint16(flagBitmap.Int64()))
cc.Idle = false
cc.sendAll(
tranNotifyChangeUser,
NewField(fieldUserID, *cc.ID),
- NewField(fieldUserFlags, *cc.Flags),
+ NewField(fieldUserFlags, cc.Flags),
NewField(fieldUserName, cc.UserName),
- NewField(fieldUserIconID, *cc.Icon),
+ NewField(fieldUserIconID, cc.Icon),
)
}
}