Skip to content

Commit a728310

Browse files
committed
fix for event documentation
1 parent 7388980 commit a728310

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

docs/events.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ server.on('listen', (data) => console.log(`${data.protocol} on ${data.address}:$
6262

6363
This event will fire when a user logs into the server. Executing function needs to take one arugment of type `object`. The `object` contains the following information:
6464

65-
**username: `string` the user who has logged in**\
65+
**user: `string` the user who has logged in**\
6666
**address: `string` remote address from where the user logged in**\
6767
**total: `number` total amount of open sessions**
6868

6969
```{code-block} javascript
70-
server.on('login', (data) => console.log(`${data.username} logged in from ${data.address} total users ${data.total}))
70+
server.on('login', (data) => console.log(`${data.user} logged in from ${data.address} total users ${data.total}))
7171
```
7272

7373
### logoff
@@ -77,10 +77,10 @@ server.on('login', (data) => console.log(`${data.username} logged in from ${data
7777

7878
This event will fire when a user logs off from the server. Executing function needs to take one arugment of type `object`. The `object` contains the following information:
7979

80-
**username: `string` the user who has logged off**\
80+
**user: `string` the user who has logged off**\
8181
**address: `string` remote address from where the user was logged in**\
8282
**total: `number` total amount of open sessions**
8383

8484
```{code-block} javascript
85-
server.on('logoff', (data) => console.log(`${data.username} logged off from ${data.address} total users ${data.total}))
85+
server.on('logoff', (data) => console.log(`${data.user} logged off from ${data.address} total users ${data.total}))
8686
```

0 commit comments

Comments
 (0)