Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
2a83cd87
Commit
2a83cd87
authored
May 02, 2019
by
rswindell
Browse files
Use require() to get the definitions we need instead of conditional load()ing
or copy/pasted definitions (e.g. USER_ANSI)
parent
53c06b66
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
8 deletions
+7
-8
exec/showansi.js
exec/showansi.js
+1
-1
exec/showfileavatar.js
exec/showfileavatar.js
+1
-1
exec/showmsgavatar.js
exec/showmsgavatar.js
+2
-3
exec/showmsghdr.js
exec/showmsghdr.js
+3
-3
No files found.
exec/showansi.js
View file @
2a83cd87
...
...
@@ -7,7 +7,7 @@ if(argc < 1) {
var
fname
=
argv
[
0
];
graphic
=
new
Graphic
(
argv
[
1
],
argv
[
2
]);
graphic
.
cpm_eof
=
false
;
if
(
!
graphic
.
load
(
fname
))
alert
(
"
Load failure
"
);
else
{
...
...
exec/showfileavatar.js
View file @
2a83cd87
// $Id$
const
FM_ANON
=
(
1
<<
1
);
const
USER_ANSI
=
(
1
<<
1
);
require
(
"
userdefs.js
"
,
'
USER_ANSI
'
);
// Avatar support here:
if
(
!
(
bbs
.
file_attr
&
FM_ANON
)
&&
console
.
term_supports
(
USER_ANSI
))
{
...
...
exec/showmsgavatar.js
View file @
2a83cd87
...
...
@@ -10,9 +10,8 @@
// If you do not want the avatar right-justified, copy this file to your
// mods directory and change that parameter below.
load
(
'
smbdefs.js
'
);
var
USER_ANSI
=
(
1
<<
1
);
var
USER_NO_EXASCII
=
(
1
<<
15
);
require
(
"
smbdefs.js
"
,
'
MSG_ANONYMOUS
'
);
require
(
"
userdefs.js
"
,
'
USER_ANSI
'
);
// Avatar support here:
if
(
!
(
bbs
.
msg_attr
&
MSG_ANONYMOUS
)
...
...
exec/showmsghdr.js
View file @
2a83cd87
...
...
@@ -4,9 +4,9 @@
// Don't forget to include or exclude the blank line after if do
// (or don't) want a blank line separating message headers and body text
load
(
"
smbdefs.js
"
);
load
(
"
text.js
"
);
var
USER_ANSI
=
(
1
<<
1
);
require
(
"
text.js
"
,
'
MsgAttr
'
);
require
(
"
smbdefs.js
"
,
'
MSG_ANONYMOUS
'
);
require
(
"
userdefs.js
"
,
'
USER_ANSI
'
);
// ported from sbbs_t::show_msgattr():
function
show_msgattr
(
msg_attr
,
msg_auxattr
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment