summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
inline | side by side (from parent 1:
531be34)
bigger more obvious input box, with placeholder text
input box now activates on connect
# in status window now tells user to type join
better connection messages
fixes:
can now type "/ /wibble" to say "/wibble"
/topic now accepts a channel as first arg
- background-color: #9090ff;
+ background-color: #d6d6ff;
.qwebirc-qui .input input.keyboard-input {
border: 0px;
.qwebirc-qui .input input.keyboard-input {
border: 0px;
- margin: 2px 0px 0px 0px;
+ margin: 0px 0px 0px 0px;
+ font-size: 1.2em;
+ padding-left: 4px;
+ padding-top: 3px;
+ padding-bottom: 3px;
+.qwebirc-qui .input-flash {
+ background: #ffdddd;
+}
+
.qwebirc-qui .input input.mobile-input {
border: 0px;
margin: 2px 0px 0px 0px;
.qwebirc-qui .input input.mobile-input {
border: 0px;
margin: 2px 0px 0px 0px;
};
qwebirc.irc.BaseIRCClient = new Class({
};
qwebirc.irc.BaseIRCClient = new Class({
+ Implements: [Options, Events],
options: {
nickname: "qwebirc"
},
options: {
nickname: "qwebirc"
},
});
this.send = this.connection.send.bind(this.connection);
});
this.send = this.connection.send.bind(this.connection);
- this.connect = this.connection.connect.bind(this.connection);
this.disconnect = this.connection.disconnect.bind(this.connection);
this.setupGenericErrors();
},
this.disconnect = this.connection.disconnect.bind(this.connection);
this.setupGenericErrors();
},
+ connect: function() {
+ this.connection.connect.apply(this.connection);
+ },
dispatch: function(data) {
var message = data[0];
if(message == "connect") {
dispatch: function(data) {
var message = data[0];
if(message == "connect") {
if(line.length == 0)
return;
if(line.length == 0)
return;
- if(line.charAt(0) != "/")
+ if(line.charAt(0) != "/") {
+ if (this.getActiveWindow().type == qwebirc.ui.WINDOW_STATUS) {
+ if(line.charAt(0) != "#")
+ line = "#" + line;
+
+ this.getActiveWindow().errorMessage("To join a channel type: /JOIN " + line);
+ return;
+ }
var line = line.substr(1);
var allargs = line.splitMax(" ", 2);
var line = line.substr(1);
var allargs = line.splitMax(" ", 2);
"Q": "QUERY",
"BACK": "AWAY",
"PRIVACY": "PRIVACYPOLICY",
"Q": "QUERY",
"BACK": "AWAY",
"PRIVACY": "PRIVACYPOLICY",
+ "HOP": "CYCLE",
+ "": "SAY"
this.automode("-", "v", args);
}],
cmd_TOPIC: [true, 1, 1, function(args) {
this.automode("-", "v", args);
}],
cmd_TOPIC: [true, 1, 1, function(args) {
- this.send("TOPIC " + this.getActiveWindow().name + " :" + args[0]);
+ var w = this.getActiveWindow();
+ if(w.client.isChannel(args[0])) {
+ this.send("TOPIC " + args[0]);
+ } else {
+ this.send("TOPIC " + w.name + " :" + args[0]);
+ }
}],
cmd_AWAY: [false, 1, 0, function(args) {
this.send("AWAY :" + (args?args[0]:""));
}],
cmd_AWAY: [false, 1, 0, function(args) {
this.send("AWAY :" + (args?args[0]:""));
this.loginRegex = new RegExp(this.ui.options.loginRegex);
this.tracker = new qwebirc.irc.IRCTracker(this);
},
this.loginRegex = new RegExp(this.ui.options.loginRegex);
this.tracker = new qwebirc.irc.IRCTracker(this);
},
+ connect: function() {
+ this.parent();
+ this.newServerInfoLine("CONNECTING", "");
+ },
newLine: function(window, type, data) {
if(!data)
data = {};
newLine: function(window, type, data) {
if(!data)
data = {};
newServerLine: function(type, data) {
this.statusWindow.addLine(type, data);
},
newServerLine: function(type, data) {
this.statusWindow.addLine(type, data);
},
+ newServerInfoLine: function(type, data) {
+ this.statusWindow.infoMessage(type, data);
+ },
newActiveLine: function(type, data) {
this.getActiveWindow().addLine(type, data);
},
newActiveLine: function(type, data) {
this.getActiveWindow().addLine(type, data);
},
/* we guarantee that +x is sent out before the joins */
if(this.ui.uiOptions.USE_HIDDENHOST)
this.exec("/UMODE +x");
/* we guarantee that +x is sent out before the joins */
if(this.ui.uiOptions.USE_HIDDENHOST)
this.exec("/UMODE +x");
if(this.options.autojoin) {
if(qwebirc.auth.loggedin() && this.ui.uiOptions.USE_HIDDENHOST) {
var d = function() {
if(this.options.autojoin) {
if(qwebirc.auth.loggedin() && this.ui.uiOptions.USE_HIDDENHOST) {
var d = function() {
}
this.exec("/AUTOJOIN");
}
this.exec("/AUTOJOIN");
+ } else {
+ var d = function() { this.newServerInfoLine("CONNECTED", ""); }.delay(1000, this);
+
+ this.fireEvent("signedOn");
},
userJoined: function(user, channel) {
var nick = user.hostToNick();
},
userJoined: function(user, channel) {
var nick = user.hostToNick();
},
connected: function() {
qwebirc.connected = true;
},
connected: function() {
qwebirc.connected = true;
- this.newServerLine("CONNECT");
+ this.newServerInfoLine("CONNECT", "");
},
serverError: function(message) {
this.newServerLine("ERROR", {"m": message});
},
serverError: function(message) {
this.newServerLine("ERROR", {"m": message});
newClient: function(client) {
client.id = this.clientId++;
client.hilightController = new qwebirc.ui.HilightController(client);
newClient: function(client) {
client.id = this.clientId++;
client.hilightController = new qwebirc.ui.HilightController(client);
+ client.addEvent("signedOn", function() {
+ this.fireEvent("signedOn", client);
+ }.bind(this));
this.windows[client.id] = {}
this.clients[client.id] = client;
var w = this.newWindow(client, qwebirc.ui.WINDOW_STATUS, "Status");
this.windows[client.id] = {}
this.clients[client.id] = client;
var w = this.newWindow(client, qwebirc.ui.WINDOW_STATUS, "Status");
errorMessage: function(message) {
this.addLine("", message, "warncolour");
},
errorMessage: function(message) {
this.addLine("", message, "warncolour");
},
- infoMessage: function(message) {
- this.addLine("", message, "infocolour");
+ infoMessage: function(type, message) {
+ if(message === undefined) {
+ this.addLine("", type, "infocolour");
+ } else {
+ this.addLine(type, message, "infocolour");
+ }
},
setHilighted: function(state) {
if(state == qwebirc.ui.HILIGHT_NONE || state >= this.hilighted)
},
setHilighted: function(state) {
if(state == qwebirc.ui.HILIGHT_NONE || state >= this.hilighted)
form.addClass("input");
var inputbox = new Element("input");
form.addClass("input");
var inputbox = new Element("input");
+ this.addEvent("signedOn", function() {
+ inputbox.placeholder = "type commands here, for example: /JOIN #channel";
+ inputbox.addClass("input-flash");
+ var d = function() {
+ inputbox.removeClass("input-flash");
+ }.delay(250);
+ var d = function() {
+ inputbox.addClass("input-flash");
+ }.delay(500);
+ var d = function() {
+ inputbox.removeClass("input-flash");
+ }.delay(1250);
+ });
form.appendChild(inputbox);
this.inputbox = inputbox;
this.inputbox.maxLength = 470;
form.appendChild(inputbox);
this.inputbox = inputbox;
this.inputbox.maxLength = 470;
this.resetTabComplete();
this.getActiveWindow().historyExec(inputbox.value);
inputbox.value = "";
this.resetTabComplete();
this.getActiveWindow().historyExec(inputbox.value);
inputbox.value = "";
+ inputbox.placeholder = "";
}.bind(this);
if(!qwebirc.util.deviceHasKeyboard()) {
}.bind(this);
if(!qwebirc.util.deviceHasKeyboard()) {
qwebirc.ui.themes.Default = {
"PREFIX": ["$C4==$O "],
"SIGNON": ["Signed on!", true],
qwebirc.ui.themes.Default = {
"PREFIX": ["$C4==$O "],
"SIGNON": ["Signed on!", true],
- "CONNECT": ["Connected to server.", true],
+ "CONNECTING": ["Connecting to server, please wait...", true],
+ "CONNECT": ["Logging in, please wait...", true],
+ "CONNECTED": ["Connected and logged in -- ready to go!", true],
"RAW": ["$m", true],
"DISCONNECT": ["Disconnected from server: $m", true],
"ERROR": ["ERROR: $m", true],
"RAW": ["$m", true],
"DISCONNECT": ["Disconnected from server: $m", true],
"ERROR": ["ERROR: $m", true],