target = false;
this.parentObject.newActiveLine("OUR" + type, extra);
return;
- } else if(window.type == WINDOW_CHANNEL) {
+ } else if(window.type == qwebirc.ui.WINDOW_CHANNEL) {
type = "CHAN" + type;
} else {
type = "PRIV" + type;
var fn = cmdopts[3];
var w = this.parentObject.getActiveWindow();
- if(activewin && w.type == WINDOW_STATUS) {
+ if(activewin && w.type == qwebirc.ui.WINDOW_STATUS) {
w.errorMessage("Can't use this command in this window");
return;
}
this.newTargetLine(target, "NOTICE", message);
}],
cmd_QUERY: [false, 2, 1, function(args) {
- this.parentObject.newWindow(args[0], WINDOW_QUERY, true);
+ this.parentObject.newWindow(args[0], qwebirc.ui.WINDOW_QUERY, true);
if((args.length > 1) && (args[1] != ""))
return ["SAY", args[1]];
var host = user.hostToHost();
if((nick == this.nickname) && !this.getWindow(channel))
- this.newWindow(channel, WINDOW_CHANNEL, true);
+ this.newWindow(channel, qwebirc.ui.WINDOW_CHANNEL, true);
this.tracker.addNickToChannel(nick, channel);
if(nick == this.nickname) {
args = "";
if(type == "ACTION") {
- this.newWindow(nick, WINDOW_QUERY);
+ this.newWindow(nick, qwebirc.ui.WINDOW_QUERY);
this.newLine(nick, "PRIVACTION", {"m": args, "x": type, "h": host, "n": nick});
return;
}
var nick = user.hostToNick();
var host = user.hostToHost();
- this.newWindow(nick, WINDOW_QUERY);
+ this.newWindow(nick, qwebirc.ui.WINDOW_QUERY);
this.newLine(nick, "PRIVMSG", {"m": message, "h": host, "n": nick});
},
disconnected: function(message) {
for(var x in this.windows) {
var w = this.windows[x];
- if(w.type == WINDOW_CHANNEL)
+ if(w.type == qwebirc.ui.WINDOW_CHANNEL)
w.close();
}
this.tracker = undefined;