Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
a04e67be
Commit
a04e67be
authored
4 years ago
by
Rob Swindell
Browse files
Options
Downloads
Patches
Plain Diff
Add a /help menu, apparently users need help sometimes
Also incremented the rev to 1.60.
parent
82016519
No related branches found
No related tags found
No related merge requests found
Pipeline
#20
passed
4 years ago
Stage: build
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
exec/irc.js
+18
-4
18 additions, 4 deletions
exec/irc.js
with
18 additions
and
4 deletions
exec/irc.js
+
18
−
4
View file @
a04e67be
...
@@ -3,14 +3,14 @@
...
@@ -3,14 +3,14 @@
// Deuce's IRC client module for Synchronet
// Deuce's IRC client module for Synchronet
// With the "Manny Mods". :-)
// With the "Manny Mods". :-)
// $Id: irc.js,v 1.
59
2020/08/
04
01:02:01 rswindell Exp $
// $Id: irc.js,v 1.
60
2020/08/
29
01:02:01 rswindell Exp $
// disable auto-termination.
// disable auto-termination.
var
old_auto_terminate
=
js
.
auto_terminate
;
var
old_auto_terminate
=
js
.
auto_terminate
;
js
.
on_exit
(
"
js.auto_terminate=old_auto_terminate
"
);
js
.
on_exit
(
"
js.auto_terminate=old_auto_terminate
"
);
js
.
auto_terminate
=
false
;
js
.
auto_terminate
=
false
;
const
REVISION
=
"
$Revision: 1.
59
$
"
.
split
(
'
'
)[
1
];
const
REVISION
=
"
$Revision: 1.
60
$
"
.
split
(
'
'
)[
1
];
const
SPACEx80
=
"
"
;
const
SPACEx80
=
"
"
;
const
MAX_HIST
=
50
;
const
MAX_HIST
=
50
;
...
@@ -659,6 +659,20 @@ function send_command(command,param) {
...
@@ -659,6 +659,20 @@ function send_command(command,param) {
var
got
=
""
;
var
got
=
""
;
switch
(
command
)
{
switch
(
command
)
{
case
"
HELP
"
:
const
fmt
=
"
/%-25s %s
"
;
screen
.
print_line
(
format
(
fmt
,
"
help
"
,
"
Display this list
"
));
screen
.
print_line
(
format
(
fmt
,
"
q[uit]
"
,
"
Leave IRC Module
"
+
REVISION
));
screen
.
print_line
(
format
(
fmt
,
"
me <text>
"
,
"
Send an action message
"
));
screen
.
print_line
(
format
(
fmt
,
"
quote <text>
"
,
"
Send a literal message
"
));
screen
.
print_line
(
format
(
fmt
,
"
msg <nick>
"
,
"
Send a private message
"
));
screen
.
print_line
(
format
(
fmt
,
"
j[oin] <#channel>
"
,
"
Join a channel
"
));
screen
.
print_line
(
format
(
fmt
,
"
n[ext]
"
,
"
Switch to next channel
"
));
screen
.
print_line
(
format
(
fmt
,
"
p[revious]
"
,
"
Switch to previous channel
"
));
screen
.
print_line
(
format
(
fmt
,
"
part
"
,
"
Leave current channel
"
));
screen
.
print_line
(
format
(
fmt
,
"
topic [#channel] <text>
"
,
"
Set channel topic
"
));
screen
.
print_line
(
format
(
fmt
,
"
kick [nick]
"
,
"
Kick a user from channel
"
));
break
;
case
"
MSG
"
:
case
"
MSG
"
:
params
=
param
.
split
(
"
"
);
params
=
param
.
split
(
"
"
);
send_to
=
params
.
shift
();
send_to
=
params
.
shift
();
...
@@ -1010,11 +1024,11 @@ function Screen() {
...
@@ -1010,11 +1024,11 @@ function Screen() {
if
(
channels
.
current
!=
undefined
)
{
if
(
channels
.
current
!=
undefined
)
{
var
nick_chan
=
""
;
var
nick_chan
=
""
;
nick_char
=
format
(
"
\
x01N
\
x014 Nick: %s Channel: %s (%d)
"
,
nick
,
channels
.
current
.
display
,
channels
.
current
.
nick
.
length
)
+
SPACEx80
;
nick_char
=
format
(
"
\
x01N
\
x014 Nick: %s Channel: %s (%d)
"
,
nick
,
channels
.
current
.
display
,
channels
.
current
.
nick
.
length
)
+
SPACEx80
;
return
nick_char
.
substr
(
0
,
6
8
)
+
"
/
quit to exit
\
x01N
\
x010
\
x01W
"
;
return
nick_char
.
substr
(
0
,
6
7
)
+
"
/
help for help
\
x01N
\
x010
\
x01W
"
;
}
}
}
}
}
}
return
"
\
x01N
\
x014 Nick:
"
+
nick
+
"
Channel: No Channel (0)
"
+
SPACEx80
.
substr
(
0
,
79
-
4
8
-
nick
.
length
)
+
"
/
quit to exit
\
x01N
\
x010
\
x01W
"
;
return
"
\
x01N
\
x014 Nick:
"
+
nick
+
"
Channel: No Channel (0)
"
+
SPACEx80
.
substr
(
0
,
79
-
4
9
-
nick
.
length
)
+
"
/
help for help
\
x01N
\
x010
\
x01W
"
;
});
});
this
.
__defineGetter__
(
"
topicline
"
,
function
()
{
this
.
__defineGetter__
(
"
topicline
"
,
function
()
{
if
(
connected
)
{
if
(
connected
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment