Skip to content

Commit

Permalink
Merge pull request thedjpetersen#132 from ericbarch/master
Browse files Browse the repository at this point in the history
Separation of IRC and websocket code. Created IRC connection class.
  • Loading branch information
David Petersen committed Jul 3, 2012
2 parents 9e283c5 + 39bce6f commit 239f3bd
Show file tree
Hide file tree
Showing 11 changed files with 365 additions and 393 deletions.
1 change: 1 addition & 0 deletions assets/css/subway.css
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ html { overflow: hidden; }
.userlist_user {
border-bottom: 1px solid #CCCCCC;
display: table;
height: 31px;
width: 100%;
}

Expand Down
10 changes: 8 additions & 2 deletions assets/js/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ $(function() {
});

irc.socket.on('notice', function(data) {
//TODO: make this work
var window = irc.chatWindows.getByName('status');
if(window === undefined){
irc.connected = true;
Expand Down Expand Up @@ -230,7 +229,14 @@ $(function() {
});

irc.socket.on('error', function(data) {
console.log(data.message);
var window = irc.chatWindows.getByName('status');
if(window === undefined){
irc.connected = true;
irc.appView.render();
irc.chatWindows.add({name: 'status', type: 'status'});
window = irc.chatWindows.getByName('status');
}
window.stream.add({sender: 'error', raw: data.text, type: 'notice'});
});

irc.socket.on('netError', function(data) {
Expand Down
2 changes: 2 additions & 0 deletions assets/js/views/overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ var OverviewView = Backbone.View.extend({
var port = $('#connect-port').val();
var secure = $('#connect-secure').is(':checked');
var selfSigned = $('#connect-selfSigned').is(':checked');
var rejoin = $('#connect-rejoin').is(':checked');
var password = $('#connect-password').val();

if (!server) {
Expand All @@ -74,6 +75,7 @@ var OverviewView = Backbone.View.extend({
port: port,
secure: secure,
selfSigned: selfSigned,
rejoin: rejoin,
password: password
};

Expand Down
277 changes: 0 additions & 277 deletions lib/irchandler.js

This file was deleted.

Loading

0 comments on commit 239f3bd

Please sign in to comment.