mirror of
https://github.com/thelounge/thelounge
synced 2024-11-26 05:50:22 +00:00
No description
client | ||
lib | ||
.gitignore | ||
config.js | ||
index.js | ||
package.json | ||
README.md |
shout
Run your IRC client on a server and access it from the web browser. This gives you a persistent connection and allows you to chat from multiple devices at the same time.
Commands
These are the commands currently implemented:
/connect
/deop
/devoice
/disconnect
/join
/kick
/leave
/me
/mode
/msg
/nick
/notice
/op
/part
/query
/quit
/server
/topic
/voice
/whois
Install
-
Install Node.js and NPM
sudo apt-get -y install nodejs npm
-
Clone the project from GitHub
git clone http://github.com/erming/shout
-
Open folder
cd shout/
-
Install Node packages
npm install
-
Run the server
npm start
ornode index.js
-
Open your browser
http://localhost:9000
Events
Using Socket.IO
Events sent from the server to the browser:
// Event: "join"
// Sent when joining a new channel/query.
socket.emit("join", {
id: 0,
chan: {
id: 0,
name: "",
type: "",
messages: [],
users: [],
}
});
// Event: "msg"
// Sent when receiving a message.
socket.emit("msg", {
id: 0,
msg: {
time: "",
type: "",
from: "",
text: "",
}
});
// Event: "networks"
// Sent upon connecting to the server.
socket.emit("networks", {
networks: [{
id: 0,
host: "",
nick: "",
channels: [],
}]
});
// Event: "part"
// Sent when leaving a channel/query.
socket.emit("part", {
id: 0
});
// Event: "users"
// Sent whenever the list of users changes.
socket.emit("users", {
id: 0,
users: [{
mode: "",
name: "",
}]
});
License
Available under the MIT license.