]> jfr.im git - irc/quakenet/qwebirc.git/commitdiff
Allow @+ in /me and other commands, even if not used currently.
authorChris Porter <redacted>
Fri, 5 Dec 2008 00:08:29 +0000 (00:08 +0000)
committerChris Porter <redacted>
Fri, 5 Dec 2008 00:08:29 +0000 (00:08 +0000)
Make nickname in use go to active window.

TODO.txt
js/irc/baseircclient.js
js/irc/commandparser.js
js/irc/ircclient.js

index 59ab58905a0689869f6a501113b49b5d66f1d737..62f7be66475c1712c254a1aa790bb37ea7c11ef0 100644 (file)
--- a/TODO.txt
+++ b/TODO.txt
@@ -1,30 +1,27 @@
 UI:\r
-  tab dragging\r
-  [ ] style flashing\r
-  block backspace\r
-  scrolling is broken\r
-  [enter] in text box should trigger event instead of having a form there?\r
-  about DIALOG?\r
-  Save last nick in cookies.\r
+  FEAT: tab dragging\r
+  FEAT: [ ] style flashing\r
+  FEAT: block backspace\r
+  TIDY: [enter] in text box should trigger event instead of having a form there?\r
+  FEAT: about DIALOG?\r
+  FEAT: Save last nick in cookies.\r
   \r
 Authing:\r
-  Finish integration (notably login button on non-autoconnect page).\r
-  Login button should save state on form.\r
-  Fix up state inconsistency if backend is restarted (state is stored in user cookie and not refreshed except on login).\r
+  TIDY: Finish integration (notably login button on non-autoconnect page).\r
+  TIDY: Login button should save state on form.\r
+  TIDY: Fix up state inconsistency if backend is restarted (state is stored in user cookie and not refreshed except on login).\r
   \r
 IRC:  \r
-  /msg $ goes to status, as does /notice $\r
-  Nick in use should go to active window.\r
+  TIDY: /msg $ goes to status, as does /notice $, should go to active.\r
   \r
 Options pane:\r
-  motd and possibly linked somewhere else.\r
-  same with embedded wizard\r
-  Various options:\r
-    - notices going to active window\r
-  Sound\r
-  Last position line\r
-  Store options server side when logged in.\r
+  TIDY: motd and possibly linked somewhere else.\r
+  FEAT: same with embedded wizard\r
+  FEAT: Sound\r
+  FEAT: Last position line\r
+  FEAT: Store options server side when logged in.\r
   \r
 Other:\r
-  IE7 seems to be broke\r
+  BUG: IE7 seems to be broke\r
+  BUG: Queries: upper/lowercase issues.\r
   
\ No newline at end of file
index 9c77b873356ef6385945208c250258e296e53ad6..df434850ab4b499abd99272c703a2a3c38098515 100644 (file)
@@ -75,15 +75,18 @@ qwebirc.irc.BaseIRCClient = new Class({
     this.signedOn(this.nickname);
   },
   irc_ERR_NICKNAMEINUSE: function(prefix, params) {
+    this.genericError(params[1], params.indexFromEnd(-1).replace("in use.", "in use"));
+    
     if(this.__signedOn)
-      return;
+      return true;
     
     var newnick = params[1] + "_";
     if(newnick == this.lastnick)
-      newnick = "webchat" + Math.floor(Math.random() * 1024 * 1024);
+      newnick = "qwebirc" + Math.floor(Math.random() * 1024 * 1024);
 
     this.send("NICK " + newnick);
     this.lastnick = newnick;
+    return true;
   },
   irc_NICK: function(prefix, params) {
     var user = prefix;
index 57a57ec747b4a69e7ee502f69612dcdc8e87bef3..04070cd415c898bb45755407476a5f9c65bad15e 100644 (file)
@@ -137,7 +137,7 @@ qwebirc.irc.CommandParser = new Class({
     if(!this.send("PRIVMSG " + target + " :\x01ACTION " + args + "\x01"))
       return;
 
-    this.newQueryLine(target, "ACTION", args);
+    this.newQueryLine(target, "ACTION", args, {"@": this.parentObject.getNickStatus(target, this.parentObject.nickname)});
   }],
   cmd_CTCP: [false, 3, 2, function(args) {
     var target = args[0];
@@ -170,8 +170,13 @@ qwebirc.irc.CommandParser = new Class({
     var target = args[0];
     var message = args[1];
 
-    if(this.send("NOTICE " + target + " :" + message))
-      this.newTargetLine(target, "NOTICE", message);
+    if(this.send("NOTICE " + target + " :" + message)) {
+      if(this.parentObject.isChannel(target)) {
+        this.newTargetLine(target, "NOTICE", message, {"@": this.parentObject.getNickStatus(target, this.parentObject.nickname)});
+      } else {
+        this.newTargetLine(target, "NOTICE", message);
+      }
+    }
   }],
   cmd_QUERY: [false, 2, 1, function(args) {
     this.parentObject.newWindow(args[0], qwebirc.ui.WINDOW_QUERY, true);
index 7aebca27fb81653e5c91043e03f530b1b30d7b9e..47c83616e5c4947b38fa33e1da656adc401333a4 100644 (file)
@@ -297,11 +297,11 @@ qwebirc.irc.IRCClient = new Class({
 
     if(type == "ACTION") {
       this.tracker.updateLastSpoke(user.hostToNick(), channel, new Date().getTime()); 
-      this.newChanLine(channel, "CHANACTION", user, {"m": args, "c": channel});
+      this.newChanLine(channel, "CHANACTION", user, {"m": args, "c": channel, "@": this.getNickStatus(channel, nick)});
       return;
     }
     
-    this.newChanLine(channel, "CHANCTCP", user, {"x": type, "m": args, "c": channel});
+    this.newChanLine(channel, "CHANCTCP", user, {"x": type, "m": args, "c": channel, "@": this.getNickStatus(channel, nick)});
   },
   userCTCP: function(user, type, args) {
     var nick = user.hostToNick();
@@ -342,7 +342,7 @@ qwebirc.irc.IRCClient = new Class({
     this.newChanLine(channel, "CHANMSG", user, {"m": message, "@": this.getNickStatus(channel, nick)});
   },
   channelNotice: function(user, channel, message) {
-    this.newChanLine(channel, "CHANNOTICE", user, {"m": message});
+    this.newChanLine(channel, "CHANNOTICE", user, {"m": message, "@": this.getNickStatus(channel, nick)});
   },
   userPrivmsg: function(user, message) {
     var nick = user.hostToNick();