Shuo/README.md

141 lines
2.3 KiB
Markdown
Raw Normal View History

2014-06-15 22:18:55 +00:00
# Shout
2014-06-09 19:45:38 +00:00
2014-04-15 20:18:19 +00: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.
2014-06-15 22:18:55 +00:00
### Contributing
Shout is __open source__ and __open for contributions__. Any sort of help is appreciated!
2014-06-18 10:11:51 +00:00
Come join #shout-irc on Freenode!
2014-06-15 22:18:55 +00:00
### Screenshots
2014-06-09 19:45:38 +00:00
2014-06-15 22:09:07 +00:00
![](https://raw.github.com/erming/shout/master/screenshots/shout.png)
2014-06-02 00:01:26 +00:00
2014-06-12 22:51:15 +00:00
And also..
2014-06-15 22:09:07 +00:00
[Mobile interface](https://raw.github.com/erming/shout/master/screenshots/shout-mobile.png)
2014-06-12 22:51:15 +00:00
## Install
1. Install Node.js and NPM
`sudo apt-get -y install nodejs npm`
2. Clone the project from GitHub
`git clone http://github.com/erming/shout`
3. Open folder
`cd shout/`
4. Install Node packages
2014-06-19 11:31:22 +00:00
`npm install --production`
2014-06-12 22:51:15 +00:00
5. Run the server
`npm start` or `node index.js`
6. Open your browser
`http://localhost:9000`
2014-04-15 20:18:19 +00:00
### Commands
2014-06-09 19:45:38 +00:00
2014-04-15 20:18:19 +00:00
These are the commands currently implemented:
2014-05-18 16:18:19 +00:00
- [x] /ame
- [x] /amsg
2014-05-15 21:58:50 +00:00
- [x] /close
2014-05-15 21:46:29 +00:00
- [x] /connect
- [x] /deop
- [x] /devoice
- [x] /disconnect
2014-05-17 22:17:50 +00:00
- [x] /invite
2014-05-15 21:46:29 +00:00
- [x] /join
- [x] /kick
- [x] /leave
- [x] /me
- [x] /mode
- [x] /msg
- [x] /nick
- [x] /notice
- [x] /op
- [x] /part
2014-05-16 13:12:57 +00:00
- [x] /partall
2014-05-15 21:46:29 +00:00
- [x] /query
- [x] /quit
2014-05-15 21:58:50 +00:00
- [x] /raw
2014-05-15 21:56:23 +00:00
- [x] /say
2014-05-15 21:46:29 +00:00
- [x] /send
- [x] /server
2014-05-30 01:07:38 +00:00
- [x] /slap
2014-05-15 21:46:29 +00:00
- [x] /topic
- [x] /voice
2014-06-12 12:11:12 +00:00
- [x] /whoami
2014-05-15 21:46:29 +00:00
- [x] /whois
2014-04-20 12:53:55 +00:00
2014-04-26 21:17:20 +00:00
## Events
2014-06-09 19:45:38 +00:00
2014-04-26 21:17:20 +00:00
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: "",
2014-06-15 20:36:55 +00:00
network: "",
2014-06-02 21:08:03 +00:00
count: 0,
2014-04-26 21:17:20 +00:00
messages: [],
users: [],
}
});
2014-06-02 21:08:03 +00:00
// Event: "messages"
// Sent after the server receives a "fetch" request from client.
socket.emit("messages", {
id: 0,
msg: []
});
2014-04-26 21:17:20 +00:00
// 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: "",
2014-06-21 20:37:21 +00:00
name: "",
2014-04-26 21:17:20 +00:00
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 11:10:06 +00:00
## License
Available under [the MIT license](http://mths.be/mit).