mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-09-12 05:48:32 -05:00
Support client-side chat logging
This commit is contained in:
@@ -95,6 +95,7 @@
|
||||
<script src="//play.pokemonshowdown.com/data/pokedex-mini.js?"></script>
|
||||
<script src="//play.pokemonshowdown.com/js/battle.js?"></script>
|
||||
<script src="//play.pokemonshowdown.com/js/lib/sockjs-0.3.min.js"></script>
|
||||
<script src="//play.pokemonshowdown.com/js/storage.js?"></script>
|
||||
|
||||
<script src="//play.pokemonshowdown.com/js/client.js?"></script>
|
||||
<script src="//play.pokemonshowdown.com/js/client-mainmenu.js?"></script>
|
||||
|
||||
@@ -945,6 +945,7 @@
|
||||
} else {
|
||||
outputChat();
|
||||
}
|
||||
Storage.logChat(this.id, '* '+name+' '+message);
|
||||
} else if (message.substr(0,5) === '/mee ') {
|
||||
message = message.substr(5);
|
||||
if (showme) {
|
||||
@@ -952,8 +953,10 @@
|
||||
} else {
|
||||
outputChat();
|
||||
}
|
||||
Storage.logChat(this.id, '* '+name+message);
|
||||
} else if (message.substr(0,10) === '/announce ') {
|
||||
this.$chat.append(chatDiv + timestamp + '<strong style="' + color + '">' + clickableName + ':</strong> <span class="message-announce">' + Tools.parseMessage(message.substr(10), name) + '</span></div>');
|
||||
Storage.logChat(this.id, ''+name+': /announce '+message);
|
||||
} else if (message.substr(0,6) === '/warn ') {
|
||||
app.addPopup(RulesPopup, {warning: message.substr(6)});
|
||||
} else if (message.substr(0,14) === '/data-pokemon ') {
|
||||
@@ -968,6 +971,7 @@
|
||||
// Normal chat message.
|
||||
if (message.substr(0,2) === '//') message = message.substr(1);
|
||||
outputChat();
|
||||
Storage.logChat(this.id, ''+name+': '+message);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
|
||||
Reference in New Issue
Block a user