thelounge/README.md

119 lines
1.9 KiB
Markdown
Raw Normal View History

2014-04-23 22:59:48 +02:00
## shout
2014-04-15 22:18:19 +02:00
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:
2014-05-18 18:18:19 +02:00
- [x] /ame
- [x] /amsg
2014-05-15 23:58:50 +02:00
- [x] /close
2014-05-15 23:46:29 +02:00
- [x] /connect
- [x] /deop
- [x] /devoice
- [x] /disconnect
- [ ] /help
2014-05-18 00:17:50 +02:00
- [x] /invite
2014-05-15 23:46:29 +02:00
- [x] /join
- [x] /kick
- [x] /leave
- [x] /me
- [x] /mode
- [x] /msg
- [x] /nick
- [x] /notice
- [x] /op
- [x] /part
2014-05-16 15:12:57 +02:00
- [x] /partall
2014-05-15 23:46:29 +02:00
- [x] /query
- [x] /quit
2014-05-15 23:58:50 +02:00
- [x] /raw
2014-05-15 23:56:23 +02:00
- [x] /say
2014-05-15 23:46:29 +02:00
- [x] /send
- [x] /server
2014-05-30 03:07:38 +02:00
- [x] /slap
2014-05-15 23:46:29 +02:00
- [ ] /time
- [x] /topic
- [ ] /version
- [x] /voice
- [x] /whois
2014-04-20 14:53:55 +02:00
## Install
1. Install Node.js and NPM
`sudo apt-get -y install nodejs npm`
2. Clone the project from GitHub
2014-04-23 22:59:48 +02:00
`git clone http://github.com/erming/shout`
2014-04-20 14:53:55 +02:00
3. Open folder
2014-04-23 22:59:48 +02:00
`cd shout/`
2014-04-20 14:53:55 +02:00
4. Install Node packages
`npm install`
5. Run the server
2014-04-26 19:44:16 +02:00
`npm start` or `node index.js`
2014-04-20 14:53:55 +02:00
6. Open your browser
`http://localhost:9000`
2014-04-26 23:17:20 +02:00
## Events
Using [Socket.IO](http://socket.io/)
Events sent from the __server__ to the __browser__:
```javascript
// 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: "",
}]
});
```
2014-04-28 13:10:06 +02:00
## License
Available under [the MIT license](http://mths.be/mit).