]> jfr.im git - irc/quakenet/qwebirc.git/blobdiff - js/ui/menuitems.js
notifier now uses themes
[irc/quakenet/qwebirc.git] / js / ui / menuitems.js
index 05bc92157346578eca98897736be0a2a7e40909f..82ecb5f2653e80e57c9b0263d8f1202db36bdde9 100644 (file)
@@ -3,7 +3,7 @@ qwebirc.ui.UI_COMMANDS = [
   ["Add webchat to your site", "embedded"],
   ["Privacy policy", "privacy"],
   ["Feedback", "feedback"],
-  ["Frequently asked questions", "faq"],
+  ["Help!", "help"],
   ["About qwebirc", "about"]
 ];
 
@@ -12,7 +12,7 @@ qwebirc.ui.MENU_ITEMS = function() {
     var channel = this.name; /* window name */
     var myNick = this.client.nickname;
 
-    return this.client.nickOnChanHasPrefix(myNick, channel, "@");
+    return this.client.nickOnChanHasAtLeastPrefix(myNick, channel, "@");
   };
 
   var isVoiced = function(nick) {
@@ -32,6 +32,10 @@ qwebirc.ui.MENU_ITEMS = function() {
     return this.client.nickOnChanHasPrefix(nick, channel, "+");
   };
 
+  var isIgnored = function(nick) {
+    return this.client.isIgnored(nick);
+  };
+
   var invert = qwebirc.util.invertFn, compose = qwebirc.util.composeAnd;
   
   var command = function(cmd) {
@@ -78,6 +82,16 @@ qwebirc.ui.MENU_ITEMS = function() {
       text: "devoice",
       fn: command("devoice"),
       predicate: compose(isOpped, targetVoiced)
+    },
+    {
+      text: "ignore",
+      fn: command("ignore"),
+      predicate: invert(isIgnored)
+    },
+    {
+      text: "unignore",
+      fn: command("unignore"),
+      predicate: isIgnored
     }
   ];
 }();