summaryrefslogtreecommitdiff
path: root/npc/commands/motd.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-06-18 16:15:33 -0300
committerJesusaves <cpntb1@ymail.com>2018-06-18 16:15:33 -0300
commitc026452350ccf485d436c1d909a10339caa2a92d (patch)
tree97674a986748d34ab3695d098214e1beb9c8da48 /npc/commands/motd.txt
parent538c05862c6c43163254dc672f331b3b877def12 (diff)
downloadserverdata-c026452350ccf485d436c1d909a10339caa2a92d.tar.gz
serverdata-c026452350ccf485d436c1d909a10339caa2a92d.tar.bz2
serverdata-c026452350ccf485d436c1d909a10339caa2a92d.tar.xz
serverdata-c026452350ccf485d436c1d909a10339caa2a92d.zip
Code style
Diffstat (limited to 'npc/commands/motd.txt')
-rw-r--r--npc/commands/motd.txt39
1 files changed, 13 insertions, 26 deletions
diff --git a/npc/commands/motd.txt b/npc/commands/motd.txt
index 9b51ecbc3..d0505e89e 100644
--- a/npc/commands/motd.txt
+++ b/npc/commands/motd.txt
@@ -3,10 +3,8 @@ function script displayMOTD {
.@dsize = getvariableofnpc(.dsize, "@motd");
// git stuff and such
- if (debug)
- {
- for (.@i = 0; .@i < .@dsize; ++.@i)
- {
+ if (debug) {
+ for (.@i = 0; .@i < .@dsize; ++.@i) {
dispbottom $@Debug_Messages$[.@i]; // FIXME: send this to the Debug tab instead
}
@@ -15,8 +13,7 @@ function script displayMOTD {
}
// generic MOTD
- for (.@i = 0; .@i < .@size; ++.@i)
- {
+ for (.@i = 0; .@i < .@size; ++.@i) {
dispbottom $MOTD_Messages$[.@i];
}
@@ -35,8 +32,7 @@ function script MOTDConfig {
mes l("Please enter the new line.");
input .@s$;
.@s$ = strip(.@s$);
- if (.@s$ != "")
- {
+ if (.@s$ != "") {
.@size = getvariableofnpc(.size, "@motd");
$MOTD_Messages$[.@size] = .@s$;
set getvariableofnpc(.size, "@motd"), getarraysize($MOTD_Messages$);
@@ -80,8 +76,7 @@ function script MOTDConfig {
next;
input .@s$;
.@s$ = strip(.@s$);
- if (.@s$ != "")
- {
+ if (.@s$ != "") {
$MOTD_Messages$[.@l] = .@s$;
logmes "MOTD modified: line edited", LOGMES_ATCOMMAND;
}
@@ -94,8 +89,7 @@ function script MOTDConfig {
mes l("Enter line number:");
next;
input .@n;
- if ($MOTD_Messages$[.@n] != "")
- {
+ if ($MOTD_Messages$[.@n] != "") {
clear;
mes l("line @@: @@", .@n, $MOTD_Messages$[.@n]);
next;
@@ -107,8 +101,7 @@ function script MOTDConfig {
rif(.@n < .@max, menuimage("actions/lower", l("Move this line down"))),
menuimage("actions/home", l("Return to main menu"));
- switch (@menu)
- {
+ switch (@menu) {
case 2: removeLine .@n; return;
case 3: editLine .@n; return;
case 4: moveUp .@n; return;
@@ -128,12 +121,10 @@ function script MOTDConfig {
mes "---";
.@size = getvariableofnpc(.size, "@motd");
- for (.@i = 0; .@i < .@size; ++.@i)
- {
+ for (.@i = 0; .@i < .@size; ++.@i) {
mes l("line @@: @@", .@i, $MOTD_Messages$[.@i]);
}
- if (.@size == 0)
- {
+ if (.@size == 0) {
mes "(" + l("no active MOTD") + ")";
}
mes "---";
@@ -148,8 +139,7 @@ function script MOTDConfig {
rif(.@size, menuimage("actions/test", l("Test MOTD"))),
rif(getarg(0,0), menuimage("actions/home", l("Return to Super Menu")));
- switch (@menu)
- {
+ switch (@menu) {
case 1: toggleMOTD; break;
case 2: addNewLine; break;
case 3: modifyLine .@size; break;
@@ -165,8 +155,7 @@ function script MOTDConfig {
end;
OnCall:
- if (!is_admin())
- {
+ if (!is_admin()) {
end;
}
@@ -175,12 +164,10 @@ OnCall:
end;
OnPCLoginEvent:
- if ($MOTD_Disabled < 1)
- {
+ if ($MOTD_Disabled < 1) {
displayMOTD;
}
- if (debug)
- {
+ if (debug) {
dispbottom "##7<<##B @@help://test-server|" + col(l("Click here for instructions on how to use the test server."),6) + "@@ ##7>>";
}