FEAT: branding\r
TIDY: warning/info messages should have their colour decided by CSS\r
FEAT: privacy policy\r
- FEAT: +x\r
TIDY: connect dialog offset looks non-centred\r
\r
Authing:\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
+ FEAT: bind qticket to session to prevent ticket reuse within time limit.\r
\r
IRC: \r
TIDY: /msg $ goes to status, as does /notice $, should go to active.\r
cmd_UMODE: [false, 1, 0, function(args) {
this.send("MODE " + this.parentObject.getNickname() + (args?(" " + args[0]):""));
}],
+ cmd_AUTOJOIN: [false, undefined, undefined, function(args) {
+ var realargs = this.parentObject.options.autojoin.splitMax(" ", 2);
+ return ["JOIN", realargs[0], realargs[1]];
+ }],
cmd_CLEAR: [false, undefined, undefined, function(args) {
var w = this.getActiveWindow().lines;
while(w.childNodes.length > 0)
this.nickname = nickname;
this.newServerLine("SIGNON");
- if(this.options.autojoin)
- this.commandparser.dispatch("/JOIN " + this.options.autojoin);
+ /* we guarantee that +x is sent out before the joins */
+ if(this.ui.uiOptions.USE_HIDDENHOST)
+ this.exec("/UMODE +x");
+
+ if(qwebirc.auth.loggedin && this.options.autojoin) {
+ if(this.ui.uiOptions.USE_HIDDENHOST) {
+ var d = function() {
+ if($defined(this.activeTimers.autojoin))
+ this.ui.getActiveWindow().infoMessage("Waiting for login before joining channels...");
+ }.delay(5, this);
+ this.activeTimers.autojoin = function() {
+ var w = this.ui.getActiveWindow();
+ w.errorMessage("No login response in 10 seconds.");
+ w.errorMessage("You may want to try authing to Q and then type: /autojoin (if you don't auth your host may be visible).");
+ }.delay(10000, this);
+ } else {
+ this.exec("/AUTOJOIN");
+ }
+ }
},
userJoined: function(user, channel) {
var nick = user.hostToNick();
userPrivmsg: function(user, message) {
var nick = user.hostToNick();
var host = user.hostToHost();
-
this.newQueryWindow(nick, true);
this.pushLastNick(nick);
this.newQueryLine(nick, "PRIVMSG", {"m": message, "h": host, "n": nick}, true);
+
+ this.checkLogin(user, message);
+ },
+ checkLogin: function(user, message) {
+ if(this.isNetworkService(user) && $defined(this.activeTimers.autojoin)) {
+ if(message.match(/^You are now logged in as [^ ]+\.$/)) {
+ $clear(this.activeTimers.autojoin);
+ delete this.activeTimers["autojoin"];
+ this.ui.getActiveWindow().infoMessage("Joining channels...");
+ this.exec("/AUTOJOIN");
+ }
+ }
},
serverNotice: function(user, message) {
if(user == "") {
} else {
this.newTargetOrActiveLine(nick, "PRIVNOTICE", {"m": message, "h": host, "n": nick});
}
+
+ this.checkLogin(user, message);
},
isNetworkService: function(user) {
/* TODO: refactor */
[4, "DEDICATED_NOTICE_WINDOW", "Send notices to dedicated message window", false],
[3, "NICK_OV_STATUS", "Show status (@/+) before nicknames", true],
[5, "ACCEPT_SERVICE_INVITES", "Automatically join channels when invited by Q", true],
+ [6, "USE_HIDDENHOST", "Hide your hostmask when authed to Q (+x)", true],
];
qwebirc.config.DefaultOptions = null;