Skip to content
This repository
Browse code

Merge branch 'refactor'

  • Loading branch information...
commit 7ffb656b9f3695099bc4130984cf001ebc53163d 2 parents 90bfc2b + 430e70a
dj-emberex dj-emberex authored

Showing 2 changed files with 12 additions and 0 deletions. Show diff stats Hide diff stats

  1. +8 0 assets/js/client.js
  2. +4 0 lib/irchandler.js
8 assets/js/client.js
@@ -283,6 +283,14 @@ $(function() {
283 283 irc.appView.channelList.channelTabs[0].setActive();
284 284 }
285 285 break;
  286 + case '/topic':
  287 + if (commandText[2]) {
  288 + irc.socket.emit('topic', {name: commandText[1], topic: commandText[2]});
  289 + } else {
  290 + irc.socket.emit('topic', {name: irc.chatWindows.getActive().get('name'),
  291 + topic: commandText[1]});
  292 + }
  293 + break;
286 294 case '/me':
287 295 irc.socket.emit('action', {
288 296 target: irc.chatWindows.getActive().get('name'),
4 lib/irchandler.js
@@ -197,6 +197,10 @@ var irchandler = exports.irchandler = function(socket) {
197 197 );
198 198 });
199 199
  200 + socket.on('topic', function(data){
  201 + client.send('TOPIC ' + data.name + ' ' + data.topic);
  202 + });
  203 +
200 204 socket.on('command', function(text) { console.log(text); client.send(text); });
201 205
202 206 socket.on('disconnect', function() {

0 comments on commit 7ffb656

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