Skip to content
Browse files

Remove irc pseudo-namespace. Didn't have it applied to all of the eve…

…nts anyway.
  • Loading branch information...
1 parent b784007 commit 5d3e5b90e1e010312544911bf13efa55fd587229 @akavlie committed Nov 11, 2011
Showing with 5 additions and 5 deletions.
  1. +4 −4 public/app.js
  2. +1 −1 server.js
View
8 public/app.js
@@ -545,14 +545,14 @@ $(function() {
});
// Set topic event
- socket.on('irc:topic', function(data) {
+ socket.on('topic', function(data) {
var channel = frames.getByName(data.channel);
channel.set({topic: data.topic});
// TODO: Show this was changed by data.nick in the channel stream
});
// Nick change event
- socket.on('irc:nick', function(data) {
+ socket.on('nick', function(data) {
// Update my info, if it's me
if (data.oldNick == irc.me.get('nick')) {
irc.me.set({nick: data.newNick});
@@ -574,15 +574,15 @@ $(function() {
});
});
- socket.on('irc:names', function(data) {
+ socket.on('names', function(data) {
var frame = frames.getByName(data.channel);
console.log(data);
for (var nick in data.nicks) {
frame.participants.add({nick: nick, opStatus: data.nicks[nick]});
}
});
- socket.on('irc:error', function(data) {
+ socket.on('error', function(data) {
console.log(data.message);
frame = frames.getActive();
error = humanizeError(data.message);
View
2 server.js
@@ -66,7 +66,7 @@ io.sockets.on('connection', function(socket) {
args[arg] = callbackArgs[index];
});
console.log(args);
- socket.emit('irc:' + event, args);
+ socket.emit(event, args);
});
};

0 comments on commit 5d3e5b9

Please sign in to comment.
Something went wrong with that request. Please try again.