Skip to content

Commit

Permalink
actually, only print 'Incoming' messages to stdout and not errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nwwells committed Feb 21, 2017
1 parent f9e5437 commit a497760
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/wscat
Expand Up @@ -49,7 +49,7 @@ Console.Colors = {
Red: '\033[31m',
Green: '\033[32m',
Yellow: '\033[33m',
Blue: '\033[34m',
Blue: '\033[37m',
Default: '\033[39m'
};

Expand All @@ -69,7 +69,7 @@ Console.prototype.print = function print(type, msg, color) {
color = color || Console.Colors.Default;
this.stdout.write(color + type + msg + Console.Colors.Default + '\n');
this.prompt();
} else if (type !== Console.Types.Control) {
} else if (type === Console.Types.Incoming) {
this.stdout.write(msg + '\n');
} else {
// is a control message and we're not in a tty... drop it.
Expand Down

0 comments on commit a497760

Please sign in to comment.