Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing comparison and adding comments, as per #194

  • Loading branch information...
commit cd7ea223e10fcc5648f6224de4c25d29eaaa7dd4 1 parent 51eaec4
@SpenserJ SpenserJ authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 assets/js/client.js
View
5 assets/js/client.js
@@ -425,9 +425,10 @@ $(function() {
});
irc.commands.add('topic', function(args){
- if (args[0].indexOf('#') == 0 || args[0].indexOf('&') == 0) {
+ // If args[0] starts with # or &, a topic name has been provided
+ if (args[0].indexOf('#') === 0 || args[0].indexOf('&') === 0) {
irc.socket.emit('topic', {name: args.shift(), topic: args.join(' ')});
- } else {
+ } else { // Otherwise, assume we're changing the current channel's topic
irc.socket.emit('topic', {name: irc.chatWindows.getActive().get('name'),
topic: args.join(' ')});
}
Please sign in to comment.
Something went wrong with that request. Please try again.