]> jfr.im git - irc/quakenet/qwebirc.git/commitdiff
Refactor command parser, add meeb!
authorChris Porter <redacted>
Sat, 8 Nov 2008 09:25:34 +0000 (09:25 +0000)
committerChris Porter <redacted>
Sat, 8 Nov 2008 09:25:34 +0000 (09:25 +0000)
js/irc/commandparser.js

index f9fb33ed51633cfa69ea0caad496c7fe75c9feb3..f1de9003ab293b3b5c7d332aa6bd1e0b7108e369 100644 (file)
@@ -1,14 +1,5 @@
-qwebirc.irc.CommandParser = new Class({
+qwebirc.irc.BaseCommandParser = new Class({
   initialize: function(parentObject) {
-    this.aliases = {
-      "J": "JOIN",
-      "K": "KICK",
-      "MSG": "PRIVMSG",
-      "Q": "QUERY",
-      "BACK": "AWAY",
-      "HOP": "CYCLE"
-    };
-    
     this.send = parentObject.send;
     this.parentObject = parentObject;
   },
@@ -91,7 +82,24 @@ qwebirc.irc.CommandParser = new Class({
       command = ret[0];
       args = ret[1];
     }
+  }
+});
+
+qwebirc.irc.CommandParser = new Class({
+  Extends: qwebirc.irc.BaseCommandParser,
+  initialize: function(parentObject) {
+    this.parent(parentObject);
+    
+    this.aliases = {
+      "J": "JOIN",
+      "K": "KICK",
+      "MSG": "PRIVMSG",
+      "Q": "QUERY",
+      "BACK": "AWAY",
+      "HOP": "CYCLE"
+    };
   },
+  
   /* [require_active_window, splitintoXargs, minargs, function] */
   cmd_ME: [true, undefined, undefined, function(args) {
     if(args == undefined)
@@ -155,11 +163,15 @@ qwebirc.irc.CommandParser = new Class({
       "qwebirc v" + qwebirc.VERSION,
       "Copyright (C) 2008 Chris Porter. All rights reserved.",
       "http://webchat.quakenet.org/",
+      "",
+      "For licensing questions please contact slug@quakenet.org.",
+      "",
       "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
       "",
       "This software contains portions by the following third parties:",
       "- MooTools v1.2 -- http://mootools.net/",
       "  Copyright (C) 2006-2008 Valerio Proietti, MIT license.",
+      "- qwebirc icon -- http://meeb.org/",
       "",
       "Thank you for flying QuakeNet!",
       "",