mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-06-02 22:08:36 -05:00
Added single Faq link for !faq, staff faq
Added a single FAQ link for !faq and the main link for !faq all as well as staff faq.
This commit is contained in:
parent
48cf4df85f
commit
8c9f833f73
|
|
@ -1062,9 +1062,13 @@ function parseCommandLocal(user, cmd, target, room, socket, message) {
|
|||
|
||||
case 'faq':
|
||||
case '!faq':
|
||||
target = target.toLowerCase() || 'all';
|
||||
target = target.toLowerCase();
|
||||
var buffer = '<div style="border:1px solid #6688AA;padding:2px 4px">';
|
||||
var matched = false;
|
||||
if (!target || target === 'all') {
|
||||
matched = true;
|
||||
buffer += '<a href="http://www.smogon.com/sim/faq" target="_blank">Frequently Asked Questions</a><br />';
|
||||
}
|
||||
if (target === 'all' || target === 'deviation') {
|
||||
matched = true;
|
||||
buffer += '<a href="http://www.smogon.com/sim/faq#deviation" target="_blank">Why did this user gain or lose so many points?</a><br />';
|
||||
|
|
@ -1081,6 +1085,10 @@ function parseCommandLocal(user, cmd, target, room, socket, message) {
|
|||
matched = true;
|
||||
buffer += '<a href="http://www.smogon.com/sim/faq#restarts" target="_blank">Why is the server restarting?</a><br />';
|
||||
}
|
||||
if (target === 'all' || target === 'staff') {
|
||||
matched = true;
|
||||
buffer += '<a href="http://www.smogon.com/sim/staff_faq" target="_blank">Staff FAQ</a><br />';
|
||||
}
|
||||
if (!matched) {
|
||||
emit(socket, 'console', 'The FAQ entry "'+target+'" was not found. Try /faq for general help.');
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user