Skip to content

Commit fec199a

Browse files
committed
Fix example
1 parent 388adda commit fec199a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/bot.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ function MyIrcMiddleware() {
3838

3939
function theMiddleware(command, event, client, next) {
4040
//console.log('[MyMiddleware]', command, event);
41-
if (command === 'message' && event.msg.indexOf('omg') === 0) {
42-
event.msg += '!!!!!';
41+
if (command === 'message' && event.message.indexOf('omg') === 0) {
42+
event.message += '!!!!!';
4343
event.reply('> appended extra points');
4444
}
4545

@@ -72,9 +72,9 @@ bot.on('close', function() {
7272
});
7373

7474
bot.on('message', function(event) {
75-
console.log('<' + event.target + '>', event.msg);
76-
if (event.msg.indexOf('whois') === 0) {
77-
bot.whois(event.msg.split(' ')[1]);
75+
console.log('<' + event.target + '>', event.message);
76+
if (event.message.indexOf('whois') === 0) {
77+
bot.whois(event.message.split(' ')[1]);
7878
}
7979
});
8080

0 commit comments

Comments
 (0)