mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-09-29 22:33:40 -05:00
Port /reply to the client (#773)
This commit is contained in:
committed by
Guangcong Luo
parent
f58656cb1b
commit
bce03c4f6e
@@ -148,6 +148,12 @@
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
} else if (app.user.lastPM && (textbox.value === '/reply' || textbox.value === '/r') && e.keyCode === 32) { // '/reply ' is being written
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
var val = '/pm ' + app.user.lastPM + ', ';
|
||||
textbox.value = val;
|
||||
e.setSelectionRange(val.length, val.length);
|
||||
}
|
||||
},
|
||||
clickUsername: function (e) {
|
||||
|
||||
@@ -957,6 +957,9 @@
|
||||
parts = dataLines[i].slice(1).split('|');
|
||||
var message = parts.slice(3).join('|');
|
||||
this.rooms[''].addPM(parts[1], message, parts[2]);
|
||||
if (toUserid(parts[1]) !== app.user.get('userid')) {
|
||||
app.user.lastPM = toUserid(parts[1]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user