Bug 955366 - Use Maps and Sets in IRC code, fix when topics are settable. r=aleth
authorPatrick Cloke <clokep@gmail.com>
Mon, 19 May 2014 13:19:56 -0400
changeset 16205 bcd505d238393fe60d7c9ffe0c452d267ef75d9d
parent 16204 8297e3902054305269e88aa1a501ca210394fa6a
child 16206 6ee809fb4c458bbbf0b4c946c418c00d085c986e
push id10134
push userclokep@gmail.com
push dateMon, 19 May 2014 17:20:23 +0000
treeherdercomm-central@3cb370e6812d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaleth
bugs955366
Bug 955366 - Use Maps and Sets in IRC code, fix when topics are settable. r=aleth
chat/protocols/irc/irc.js
--- a/chat/protocols/irc/irc.js
+++ b/chat/protocols/irc/irc.js
@@ -540,17 +540,17 @@ ircChannel.prototype = {
   get topicSettable() {
     // If we're not in the room yet, we don't exist.
     if (!this._participants.has(this.nick))
       return false;
 
     // If the channel mode is +t, hops and ops can set the topic; otherwise
     // everyone can.
     let participant = this.getParticipant(this.nick);
-    return this._modes.has("t") || participant.op || participant.halfOp;
+    return !this._modes.has("t") || participant.op || participant.halfOp;
   }
 };
 copySharedBaseToPrototype(GenericIRCConversation, ircChannel.prototype);
 
 function ircParticipant(aName, aConv) {
   this._name = aName;
   this._conv = aConv;
   this._account = aConv._account;