Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Joe Robinson
blachat
Commits
d48d14f8
There was a problem fetching the latest pipeline status.
Commit
d48d14f8
authored
8 years ago
by
Joe Robinson
Browse files
Options
Download
Patches
Plain Diff
Add /topic function
parent
cfe99ec8
master
irc-framework
react
No related merge requests found
Pipeline
#14
skipped
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
index.js
+8
-0
index.js
with
8 additions
and
0 deletions
+8
-0
index.js
+
8
−
0
View file @
d48d14f8
...
...
@@ -114,6 +114,10 @@ $("#send-message").keypress(function(e) {
nick
=
message
.
split
(
"
"
)[
1
];
message
=
message
.
substring
(
6
+
nick
.
length
,
message
.
length
);
sendPm
(
message
,
nick
);
}
else
if
(
message
.
indexOf
(
"
/topic
"
)
==
0
)
{
var
channel
=
$
(
"
.tab.active
"
).
attr
(
"
data-tab
"
).
replace
(
"
chan-
"
,
"
#
"
)
topic
=
message
.
substring
(
7
,
message
.
length
);
setTopic
(
channel
,
topic
);
}
else
if
(
message
.
indexOf
(
"
/
"
)
==
0
)
{
command
=
message
.
split
(
"
"
)[
0
].
replace
(
"
/
"
,
""
);
commandArgs
=
message
.
replace
(
command
+
"
"
,
""
);
...
...
@@ -159,6 +163,10 @@ function sendPm(message, nick) {
chatTab
.
scrollTop
(
chanTab
.
prop
(
"
scrollHeight
"
));
}
function
setTopic
(
channel
,
topic
)
{
client
.
send
(
"
TOPIC
"
,
channel
,
topic
);
}
function
joinChannel
(
channel
,
sendJoin
)
{
if
(
sendJoin
)
{
client
.
join
(
channel
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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
Menu
Explore
Projects
Groups
Topics
Snippets