Skip to content

Commit 9610490

Browse files
committed
Using clearer hex instead of octals
1 parent 7396107 commit 9610490

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/commands/handlers/messaging.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var handlers = {
99
var target_group;
1010
var notice_from_server = false;
1111

12-
if ((message.charAt(0) === '\01') && (message.charAt(message.length - 1) === '\01')) {
12+
if ((message.charAt(0) === '\x01') && (message.charAt(message.length - 1) === '\x01')) {
1313
// It's a CTCP response
1414
this.emit('ctcp response', {
1515
nick: command.nick,
@@ -68,7 +68,7 @@ var handlers = {
6868
return true;
6969
});
7070

71-
if ((message.charAt(0) === '\01') && (message.charAt(message.length - 1) === '\01')) {
71+
if ((message.charAt(0) === '\x01') && (message.charAt(message.length - 1) === '\x01')) {
7272
// CTCP request
7373
var ctcp_command = message.slice(1, -1).split(' ')[0].toUpperCase();
7474
if (ctcp_command === 'ACTION') {
@@ -86,14 +86,14 @@ var handlers = {
8686

8787
} else if (ctcp_command === 'VERSION') {
8888
this.connection.write(util.format(
89-
'NOTICE %s :\01VERSION %s\01',
89+
'NOTICE %s :\x01VERSION %s\x01',
9090
command.nick,
9191
this.connection.options.version
9292
));
9393

9494
} else if (ctcp_command === 'CLIENTINFO') {
9595
this.connection.write(util.format(
96-
'NOTICE %s :\01CLIENTINFO VERSION\01',
96+
'NOTICE %s :\x01CLIENTINFO VERSION\x01',
9797
command.nick
9898
));
9999

0 commit comments

Comments
 (0)