Skip to content

Commit a609363

Browse files
authored
Merge pull request #360 from progval/account
Add missing 'account' property on 'ctcp response' and 'tagmsg'
2 parents 8098298 + 15144f4 commit a609363

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

docs/events.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,8 @@ sent from the server or a user.
355355
group: '@',
356356
message: 'A message to all channel ops',
357357
tags: [],
358-
time: 000000000
358+
time: 000000000,
359+
account: 'account_name'
359360
}
360361
~~~
361362

@@ -371,7 +372,8 @@ Also triggers a **message** event with .type = 'action'
371372
target: '#channel',
372373
message: 'slaps someuser around a bit with a large trout',
373374
tags: [],
374-
time: 000000000
375+
time: 000000000,
376+
account: 'account_name'
375377
}
376378
~~~
377379

@@ -387,7 +389,8 @@ Also triggers a **message** event with .type = 'privmsg'
387389
target: '#channel',
388390
message: 'Hello everybody',
389391
tags: [],
390-
time: 000000000
392+
time: 000000000,
393+
account: 'account_name'
391394
}
392395
~~~
393396

@@ -402,7 +405,8 @@ Also triggers a **message** event with .type = 'privmsg'
402405
tags: {
403406
example: 'hello'
404407
},
405-
time: 000000000
408+
time: 000000000,
409+
account: 'account_name'
406410
}
407411
~~~
408412

@@ -414,7 +418,8 @@ Also triggers a **message** event with .type = 'privmsg'
414418
hostname: 'manchester.isp.net',
415419
target: 'someuser',
416420
message: 'VERSION kiwiirc',
417-
time: 000000000
421+
time: 000000000,
422+
account: 'account_name'
418423
}
419424
~~~
420425

@@ -431,7 +436,8 @@ The `VERSION` CTCP is handled internally and will not trigger this event, unless
431436
target: 'someuser',
432437
type: 'VERSION',
433438
message: 'VERSION and remaining text',
434-
time: 000000000
439+
time: 000000000,
440+
account: 'account_name'
435441
}
436442
~~~
437443

@@ -443,7 +449,8 @@ The `VERSION` CTCP is handled internally and will not trigger this event, unless
443449
nick: 'prawnsalad',
444450
ident: 'prawn',
445451
hostname: 'manchester.isp.net',
446-
message: 'This is a server-wide message'
452+
message: 'This is a server-wide message',
453+
account: 'account_name'
447454
}
448455
~~~
449456

src/commands/handlers/messaging.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const handlers = {
2323
type: (message.substring(1, message.length - 1).split(' ') || [null])[0],
2424
message: message.substring(1, message.length - 1),
2525
time: time,
26+
account: command.getTag('account'),
2627
tags: command.tags
2728
});
2829
} else {
@@ -125,6 +126,7 @@ const handlers = {
125126
target: target,
126127
tags: command.tags,
127128
time: time,
129+
account: command.getTag('account'),
128130
batch: command.batch
129131
});
130132
},

0 commit comments

Comments
 (0)