mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-09 12:36:41 -05:00
Consolidate CSS classes
This commit is contained in:
parent
c479f8563f
commit
4e1da7bbb6
|
|
@ -663,12 +663,12 @@ function parseCommandLocal(user, cmd, target, room, socket, message) {
|
|||
break;
|
||||
}
|
||||
if (config.modchat === true) {
|
||||
room.addRaw('<div class="message-modchat-enable"><b>Moderated chat was enabled!</b><br />Only registered users can talk.</div>');
|
||||
room.addRaw('<div class="broadcast-red"><b>Moderated chat was enabled!</b><br />Only registered users can talk.</div>');
|
||||
} else if (!config.modchat) {
|
||||
room.addRaw('<div class="message-modchat-disable"><b>Moderated chat was disabled!</b><br />Anyone may talk now.</div>');
|
||||
room.addRaw('<div class="broadcast-blue"><b>Moderated chat was disabled!</b><br />Anyone may talk now.</div>');
|
||||
} else {
|
||||
var modchat = sanitize(config.modchat);
|
||||
room.addRaw('<div class="message-modchat-group"><b>Moderated chat was set to '+modchat+'!</b><br />Only users of rank '+modchat+' and higher can talk.</div>');
|
||||
room.addRaw('<div class="broadcast-red"><b>Moderated chat was set to '+modchat+'!</b><br />Only users of rank '+modchat+' and higher can talk.</div>');
|
||||
}
|
||||
logModCommand(room,user.name+' set modchat to '+config.modchat,true);
|
||||
return false;
|
||||
|
|
@ -680,7 +680,7 @@ function parseCommandLocal(user, cmd, target, room, socket, message) {
|
|||
emit(socket, 'console', '/declare - Access denied.');
|
||||
return false;
|
||||
}
|
||||
room.addRaw('<div class="message-declare"><b>'+target+'</b></div>');
|
||||
room.addRaw('<div class="broadcast-blue"><b>'+target+'</b></div>');
|
||||
logModCommand(room,user.name+' declared '+target,true);
|
||||
return false;
|
||||
break;
|
||||
|
|
@ -764,7 +764,7 @@ function parseCommandLocal(user, cmd, target, room, socket, message) {
|
|||
}
|
||||
LoginServer.disabled = true;
|
||||
logModCommand(room, 'The ladder was disabled by ' + user.name + '.', true);
|
||||
room.addRaw('<div class="chat-command-message message-disable-ladder"><b>Due to high server load, the ladder has been temporarily disabled</b><br />Rated games will no longer update the ladder. It will be back momentarily.</div>');
|
||||
room.addRaw('<div class="broadcast-red"><b>Due to high server load, the ladder has been temporarily disabled</b><br />Rated games will no longer update the ladder. It will be back momentarily.</div>');
|
||||
return false;
|
||||
break;
|
||||
case 'enableladder':
|
||||
|
|
@ -778,7 +778,7 @@ function parseCommandLocal(user, cmd, target, room, socket, message) {
|
|||
}
|
||||
LoginServer.disabled = false;
|
||||
logModCommand(room, 'The ladder was enabled by ' + user.name + '.', true);
|
||||
room.addRaw('<div class="message-enableladder"><b>The ladder is now back.</b><br />Rated games will update the ladder now.</div>');
|
||||
room.addRaw('<div class="broadcast-green"><b>The ladder is now back.</b><br />Rated games will update the ladder now.</div>');
|
||||
return false;
|
||||
break;
|
||||
|
||||
|
|
@ -964,7 +964,7 @@ function parseCommandLocal(user, cmd, target, room, socket, message) {
|
|||
case '!groups':
|
||||
showOrBroadcastStart(user, cmd, room, socket, message);
|
||||
showOrBroadcast(user, cmd, room, socket,
|
||||
'<div class="message-groups">' +
|
||||
'<div class="infobox">' +
|
||||
'+ <b>Voice</b> - They can use ! commands like !groups, and talk during moderated chat<br />' +
|
||||
'% <b>Driver</b> - The above, and they can also mute users and run tournaments<br />' +
|
||||
'@ <b>Moderator</b> - The above, and they can ban users and check for alts<br />' +
|
||||
|
|
@ -978,7 +978,7 @@ function parseCommandLocal(user, cmd, target, room, socket, message) {
|
|||
case '!opensource':
|
||||
showOrBroadcastStart(user, cmd, room, socket, message);
|
||||
showOrBroadcast(user, cmd, room, socket,
|
||||
'<div class="message-opensource">Pokemon Showdown is open source:<br />- Language: JavaScript<br />- <a href="https://github.com/Zarel/Pokemon-Showdown/commits/master" target="_blank">What\'s new?</a><br />- <a href="https://github.com/Zarel/Pokemon-Showdown" target="_blank">Server source code</a><br />- <a href="https://github.com/Zarel/Pokemon-Showdown-Client" target="_blank">Client source code</a></div>');
|
||||
'<div class="infobox">Pokemon Showdown is open source:<br />- Language: JavaScript<br />- <a href="https://github.com/Zarel/Pokemon-Showdown/commits/master" target="_blank">What\'s new?</a><br />- <a href="https://github.com/Zarel/Pokemon-Showdown" target="_blank">Server source code</a><br />- <a href="https://github.com/Zarel/Pokemon-Showdown-Client" target="_blank">Client source code</a></div>');
|
||||
return false;
|
||||
break;
|
||||
|
||||
|
|
@ -986,7 +986,7 @@ function parseCommandLocal(user, cmd, target, room, socket, message) {
|
|||
case '!avatars':
|
||||
showOrBroadcastStart(user, cmd, room, socket, message);
|
||||
showOrBroadcast(user, cmd, room, socket,
|
||||
'<div class="message-avatars">Want a custom avatar?<br />- <a href="/sprites/trainers/" target="_blank">How to change your avatar</a></div>');
|
||||
'<div class="infobox">Want a custom avatar?<br />- <a href="/sprites/trainers/" target="_blank">How to change your avatar</a></div>');
|
||||
return false;
|
||||
break;
|
||||
|
||||
|
|
@ -996,7 +996,7 @@ function parseCommandLocal(user, cmd, target, room, socket, message) {
|
|||
case '!introduction':
|
||||
showOrBroadcastStart(user, cmd, room, socket, message);
|
||||
showOrBroadcast(user, cmd, room, socket,
|
||||
'<div class="message-intro">New to competitive pokemon?<br />' +
|
||||
'<div class="infobox">New to competitive pokemon?<br />' +
|
||||
'- <a href="http://www.smogon.com/dp/articles/intro_comp_pokemon" target="_blank">An introduction to competitive pokemon</a><br />' +
|
||||
'- <a href="http://www.smogon.com/bw/articles/bw_tiers" target="_blank">What do "OU", "UU", etc mean?</a><br />' +
|
||||
'- <a href="http://www.smogon.com/bw/banlist/" target="_blank">What are the rules for each format? What is "Sleep Clause"?</a>' +
|
||||
|
|
@ -1010,7 +1010,7 @@ function parseCommandLocal(user, cmd, target, room, socket, message) {
|
|||
case '!calculator':
|
||||
showOrBroadcastStart(user, cmd, room, socket, message);
|
||||
showOrBroadcast(user, cmd , room , socket,
|
||||
'<div class="message-calc">Pokemon Showdown! damage calculator. (Courtesy of Honko)<br />' +
|
||||
'<div class="infobox">Pokemon Showdown! damage calculator. (Courtesy of Honko)<br />' +
|
||||
'- <a href="http://pokemonshowdown.com/damagecalc/" target="_blank">Damage Calculator</a><br />' +
|
||||
'</div>');
|
||||
return false;
|
||||
|
|
@ -1020,7 +1020,7 @@ function parseCommandLocal(user, cmd, target, room, socket, message) {
|
|||
case '!cap':
|
||||
showOrBroadcastStart(user, cmd, room, socket, message);
|
||||
showOrBroadcast(user, cmd, room, socket,
|
||||
'<div class="message-cap">An introduction to the Create-A-Pokemon project:<br />' +
|
||||
'<div class="infobox">An introduction to the Create-A-Pokemon project:<br />' +
|
||||
'- <a href="http://www.smogon.com/cap/" target="_blank">CAP project website and description</a><br />' +
|
||||
'- <a href="http://www.smogon.com/forums/showthread.php?t=48782" target="_blank">What Pokemon have been made?</a><br />' +
|
||||
'- <a href="http://www.smogon.com/forums/showthread.php?t=3464513" target="_blank">Talk about the metagame here</a><br />' +
|
||||
|
|
@ -1035,7 +1035,7 @@ function parseCommandLocal(user, cmd, target, room, socket, message) {
|
|||
case '!othermetas':
|
||||
showOrBroadcastStart(user, cmd, room, socket, message);
|
||||
showOrBroadcast(user, cmd, room, socket,
|
||||
'<div class="message-othermetas">Information on the Other Metagames:<br />' +
|
||||
'<div class="infobox">Information on the Other Metagames:<br />' +
|
||||
'- <a href="http://www.smogon.com/forums/showthread.php?t=3463764" target="_blank">Balanced Hackmons</a><br />' +
|
||||
'- <a href="http://www.smogon.com/forums/showthread.php?t=3471810" target="_blank">Dream World OU</a><br />' +
|
||||
'- <a href="http://www.smogon.com/forums/showthread.php?t=3467120" target="_blank">Glitchmons</a><br />' +
|
||||
|
|
@ -1052,7 +1052,7 @@ function parseCommandLocal(user, cmd, target, room, socket, message) {
|
|||
case '!rule':
|
||||
showOrBroadcastStart(user, cmd, room, socket, message);
|
||||
showOrBroadcast(user, cmd, room, socket,
|
||||
'<div class="message-rules">Please follow the rules:<br />' +
|
||||
'<div class="infobox">Please follow the rules:<br />' +
|
||||
'- <a href="http://pokemonshowdown.com/rules" target="_blank">Rules</a><br />' +
|
||||
'</div>');
|
||||
return false;
|
||||
|
|
@ -1061,7 +1061,7 @@ function parseCommandLocal(user, cmd, target, room, socket, message) {
|
|||
case 'faq':
|
||||
case '!faq':
|
||||
target = target.toLowerCase();
|
||||
var buffer = '<div class="message-faq">';
|
||||
var buffer = '<div class="infobox">';
|
||||
var matched = false;
|
||||
if (!target || target === 'all') {
|
||||
matched = true;
|
||||
|
|
@ -1103,7 +1103,7 @@ function parseCommandLocal(user, cmd, target, room, socket, message) {
|
|||
case '!tiers':
|
||||
showOrBroadcastStart(user, cmd, room, socket, message);
|
||||
showOrBroadcast(user, cmd, room, socket,
|
||||
'<div class="message-tiers">Smogon tiers:<br />' +
|
||||
'<div class="infobox">Smogon tiers:<br />' +
|
||||
'- <a href="http://www.smogon.com/bw/banlist/" target="_blank">The banlists for each tier</a><br />' +
|
||||
'- <a href="http://www.smogon.com/bw/tiers/uber" target="_blank">Uber Pokemon</a><br />' +
|
||||
'- <a href="http://www.smogon.com/bw/tiers/ou" target="_blank">Overused Pokemon</a><br />' +
|
||||
|
|
@ -1448,7 +1448,7 @@ function parseCommandLocal(user, cmd, target, room, socket, message) {
|
|||
|
||||
lockdown = true;
|
||||
for (var id in rooms) {
|
||||
rooms[id].addRaw('<div class="message-lockdown"><b>The server is restarting soon.</b><br />Please finish your battles quickly. No new battles can be started until the server resets in a few minutes.</div>');
|
||||
rooms[id].addRaw('<div class="broadcast-red"><b>The server is restarting soon.</b><br />Please finish your battles quickly. No new battles can be started until the server resets in a few minutes.</div>');
|
||||
if (rooms[id].requestKickInactive) rooms[id].requestKickInactive(user, true);
|
||||
}
|
||||
return false;
|
||||
|
|
@ -1462,7 +1462,7 @@ function parseCommandLocal(user, cmd, target, room, socket, message) {
|
|||
|
||||
lockdown = false;
|
||||
for (var id in rooms) {
|
||||
rooms[id].addRaw('<div class="message-endlockdown"><b>The server shutdown was canceled.</b></div>');
|
||||
rooms[id].addRaw('<div class="broadcast-green"><b>The server shutdown was canceled.</b></div>');
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
|
@ -1512,7 +1512,7 @@ function parseCommandLocal(user, cmd, target, room, socket, message) {
|
|||
|
||||
lockdown = false;
|
||||
config.modchat = false;
|
||||
rooms.lobby.addRaw('<div class="message-crashfixed"><b>We fixed the crash without restarting the server!</b><br />You may resume talking in the lobby and starting new battles.</div>');
|
||||
rooms.lobby.addRaw('<div class="broadcast-green"><b>We fixed the crash without restarting the server!</b><br />You may resume talking in the lobby and starting new battles.</div>');
|
||||
return false;
|
||||
break;
|
||||
case 'crashnoted':
|
||||
|
|
@ -1528,7 +1528,7 @@ function parseCommandLocal(user, cmd, target, room, socket, message) {
|
|||
|
||||
lockdown = false;
|
||||
config.modchat = false;
|
||||
rooms.lobby.addRaw('<div class="message-crashnoted"><b>We have logged the crash and are working on fixing it!</b><br />You may resume talking in the lobby and starting new battles.</div>');
|
||||
rooms.lobby.addRaw('<div class="broadcast-green"><b>We have logged the crash and are working on fixing it!</b><br />You may resume talking in the lobby and starting new battles.</div>');
|
||||
return false;
|
||||
break;
|
||||
case 'modlog':
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user