+qwebirc.ui.SuppliedArgOptions = new Class({
+ Extends: qwebirc.ui.CookieOptions,
+ initialize: function(ui, arg) {
+ var p = {};
+
+ if($defined(arg) && arg != "") {
+ var decoded = qwebirc.util.b64Decode(arg);
+ if(decoded)
+ p = qwebirc.util.parseURI("?" + decoded);
+ }
+
+ this.parsedOptions = p;
+ this.parent(ui);
+ },
+ _get: function(x) {
+ if(x.settableByURL !== true)
+ return this.parent(x);
+
+ var opt = this.parsedOptions[x.optionId];
+ if(!$defined(opt))
+ return this.parent(x);
+
+ return opt;
+ },
+ serialise: function() {
+ var result = [];
+ this.getOptionList().forEach(function(x) {
+ if(x.settableByURL && x.default_ != x.value)
+ result.push(x.optionId + "=" + x.value);
+ }.bind(this));
+
+ return qwebirc.util.b64Encode(result.join("&")).replaceAll("=", "");
+ }
+});
+