aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Kavlie <akavlie@gmail.com>2011-11-11 22:28:52 -0700
committerAaron Kavlie <akavlie@gmail.com>2011-11-11 22:28:52 -0700
commit5d3e5b90e1e010312544911bf13efa55fd587229 (patch)
treee13d5c74ac6f730aea0715a70c56453c193d8e95
parentb78400790109a88f2b4a7ef2ca8a3c096f8663a5 (diff)
downloadreevo-webirc-5d3e5b90e1e010312544911bf13efa55fd587229.tar.gz
reevo-webirc-5d3e5b90e1e010312544911bf13efa55fd587229.zip
Remove irc pseudo-namespace. Didn't have it applied to all of the events anyway.
-rw-r--r--public/app.js8
-rw-r--r--server.js2
2 files changed, 5 insertions, 5 deletions
diff --git a/public/app.js b/public/app.js
index 788a20d..fe8a03b 100644
--- a/public/app.js
+++ b/public/app.js
@@ -545,14 +545,14 @@ $(function() {
545 }); 545 });
546 546
547 // Set topic event 547 // Set topic event
548 socket.on('irc:topic', function(data) { 548 socket.on('topic', function(data) {
549 var channel = frames.getByName(data.channel); 549 var channel = frames.getByName(data.channel);
550 channel.set({topic: data.topic}); 550 channel.set({topic: data.topic});
551 // TODO: Show this was changed by data.nick in the channel stream 551 // TODO: Show this was changed by data.nick in the channel stream
552 }); 552 });
553 553
554 // Nick change event 554 // Nick change event
555 socket.on('irc:nick', function(data) { 555 socket.on('nick', function(data) {
556 // Update my info, if it's me 556 // Update my info, if it's me
557 if (data.oldNick == irc.me.get('nick')) { 557 if (data.oldNick == irc.me.get('nick')) {
558 irc.me.set({nick: data.newNick}); 558 irc.me.set({nick: data.newNick});
@@ -574,7 +574,7 @@ $(function() {
574 }); 574 });
575 }); 575 });
576 576
577 socket.on('irc:names', function(data) { 577 socket.on('names', function(data) {
578 var frame = frames.getByName(data.channel); 578 var frame = frames.getByName(data.channel);
579 console.log(data); 579 console.log(data);
580 for (var nick in data.nicks) { 580 for (var nick in data.nicks) {
@@ -582,7 +582,7 @@ $(function() {
582 } 582 }
583 }); 583 });
584 584
585 socket.on('irc:error', function(data) { 585 socket.on('error', function(data) {
586 console.log(data.message); 586 console.log(data.message);
587 frame = frames.getActive(); 587 frame = frames.getActive();
588 error = humanizeError(data.message); 588 error = humanizeError(data.message);
diff --git a/server.js b/server.js
index 46801e0..21aa2ca 100644
--- a/server.js
+++ b/server.js
@@ -66,7 +66,7 @@ io.sockets.on('connection', function(socket) {
66 args[arg] = callbackArgs[index]; 66 args[arg] = callbackArgs[index];
67 }); 67 });
68 console.log(args); 68 console.log(args);
69 socket.emit('irc:' + event, args); 69 socket.emit(event, args);
70 }); 70 });
71 }; 71 };
72 72