wildduck/imap-core/lib/commands/logout.js

24 lines
692 B
JavaScript
Raw Normal View History

2017-03-06 05:45:50 +08:00
'use strict';
2017-04-13 16:35:39 +08:00
let quotes = [
'All dreams are but another reality. Never forget...',
'Oh boy, oh boy, oh boy...',
'Cut the dramatics, would yeh, and follow me!',
'Oh ho ho ho, duck hunters is da cwaziest peoples! Ha ha ha.',
'Well, that makes sense. Send a bird to catch a cat!',
'Piccobello!'
];
2017-03-06 05:45:50 +08:00
module.exports = {
handler(command) {
this.session.selected = this.selected = false;
this.state = 'Logout';
this.updateNotificationListener(() => {
this.send('* BYE Logout requested');
2017-04-13 16:35:39 +08:00
this.send(command.tag + ' OK ' + quotes[Math.floor(Math.random() * quotes.length)]);
2017-03-06 05:45:50 +08:00
this.close();
});
}
};