Update pages

This commit is contained in:
Christine Dodrill 2015-08-05 19:55:25 -07:00
parent 29dd8b30df
commit d92a69c731
6 changed files with 77 additions and 34 deletions

View File

@ -1,4 +1,5 @@
Shou implements most of the IRC commands you may be familiar with. Here's a list of commands you can use:
Shuo implements most of the IRC commands you may be familiar with. Here's
a list of commands you can use:
## /clear
@ -195,4 +196,4 @@ Example: `/voice john`
Whois a user on the current network.
Example: `/whois john`
Example: `/whois john`

View File

@ -1,9 +1,9 @@
This part of the documentation will focus on the configuration of your Shou server. Start by locating the `config.js` file in the Shout folder.
This part of the documentation will focus on the configuration of your Shuo server. Start by locating the `config.js` file in the Shuo folder.
To quickly open the config:
```
$ shout config
```console
$ shuo config
```
## public
@ -18,16 +18,19 @@ Listen to connections only from this host. Default `0.0.0.0` will allow connecti
The port to listen on.
You can override this setting by starting Shout like this:
`shout start --port 80`
You can override this setting by starting Shuo like this:
```console
$ shuo start --port 80
```
## theme
This setting should point to a stylesheet in your Shout folder. If you want to create your own theme, it's recommended that you add your own stylesheet to `shout/client/themes/`.
This setting should point to a stylesheet in your Shuo folder. If you want to create your own theme, it's recommended that you add your own stylesheet to `shout/client/themes/`.
## home
Use this setting to override the default `HOME` location. The home folder is where Shout will locate the `users/` and `cache/` folder. Leaving this field empty will default to `~/.shout/`.
Use this setting to override the default `HOME` location. The home folder is where Shuo will locate the `users/` and `cache/` folder. Leaving this field empty will default to `~/.shout/`.
## logs
@ -47,4 +50,4 @@ These are the placeholder values displayed in the __Connect__ form:
- tls
- nick
- realname
- join
- join

View File

@ -1,4 +1,4 @@
Shout requires [nodejs](http://nodejs.org/) and [npm](https://www.npmjs.org/). If you already have them installed on your system, go ahead and install Shout:
Shuo requires [nodejs](http://nodejs.org/) and [npm](https://www.npmjs.org/). If you already have them installed on your system, go ahead and install Shuo:
```
$ sudo npm -g install shou
@ -80,4 +80,4 @@ npm install -g shou
# Install complete
When you're done installing Shout, go ahead to [[the next section|Usage]]
When you're done installing Shuo, go ahead to [[the next section|Usage]]

View File

@ -1,7 +1,7 @@
Once you've installed Shou, go ahead and run:
```
$ shout --help
$ shuo --help
```
This will give you an overiew of the commands you can use.
@ -13,7 +13,7 @@ _Start the Shou server._
Example:
```
$ shout start --port 80 --private
$ shuo start --port 80 --private
```
Options:
@ -30,7 +30,7 @@ _Open the configuration file._
Example:
```
$ shout config
$ shuo config
```
## `list`
@ -40,7 +40,7 @@ _List all existing users._
Example:
```
$ shout list
$ shuo list
```
## `add <name> [<password>]`
@ -50,7 +50,7 @@ _Add a new user._
Example:
```
$ shout add john
$ shuo add john
```
## `remove <name>`
@ -60,7 +60,7 @@ _Remove an existing user._
Example:
```
$ shout remove john
$ shuo remove john
```
## `reset <name>`
@ -70,7 +70,7 @@ _Reset user password._
Example:
```
$ shout reset john
$ shuo reset john
```
## `edit <name>`
@ -80,7 +80,7 @@ _Edit user configuration file._
Example:
```
$ shout edit john
$ shuo edit john
```
# Options
@ -92,8 +92,8 @@ _Set the home path. This is the location where Shou will look for the `config.js
Example:
```
$ shout --home /app add <user> # add user to /app/users
$ shout --home /app # start server with /app/config.js
$ shuo --home /app add <user> # add user to /app/users
$ shuo --home /app # start server with /app/config.js
```
## `--help`
@ -103,7 +103,7 @@ _Output usage information._
Example:
```
$ shout --help
$ shuo --help
```
## `--version`
@ -113,5 +113,5 @@ _Output the version number._
Example:
```
$ shout --version
```
$ shuo --version
```

View File

@ -10,7 +10,7 @@ When you start Shout in "private" mode it will load every user found in your `us
To add a new user, run this command:
```
$ shout add <name>
$ shuo add <name>
```
This will create a new user in your `users/` folder.
@ -22,7 +22,7 @@ _Note: By default, users are stored in the `~/.shout/users/` folder. You can cha
Open the `user.json` for the specified user:
```
$ shout edit <name>
$ shuo edit <name>
```
## Remove user
@ -30,7 +30,7 @@ $ shout edit <name>
Simply run:
```
$ shout remove <name>
$ shuo remove <name>
```
## List users
@ -38,16 +38,16 @@ $ shout remove <name>
This command will print a list of all your existing users:
```
$ shout list
$ shuo list
```
# User configuration
If you run `shout edit <name>`, the `user.json` file will open.
If you run `shuo edit <name>`, the `user.json` file will open.
The user configuration is loaded upon server start. Here's an example of what a `user.json` file might look like:
```
```json
{
"user": "example",
"password": "password",
@ -67,4 +67,43 @@ The user configuration is loaded upon server start. Here's an example of what a
"join": "#foo, #bar"
}]
}
```
```
For those interested in automating account creation, an account can also be
represented by the following Go structure:
```go
type User struct {
Username string `json:"user"`
Password string `json:"password"`
Log bool `json:"log"`
Networks []*Network `json:"networks"`
}
type Network struct {
Name string `json:"name"`
Host string `json:"host"`
Port string `json:"port"`
TLS bool `json:"tls"`
Username string `json:"username"`
Realname string `json:"realname"`
Nick string `json:"nick"`
Join string `json:"join"`
}
```
Passwords must be encrypted using bcrypt. The following code fragment is known
to work for generating valid passwords:
```go
import "golang.org/x/crypto/bcrypt"
func clear(b []byte) {
for i := 0; i < len(b); i++ {
b[i] = 0
}
}
func Crypt(password []byte) ([]byte, error) {
defer clear(password)
return bcrypt.GenerateFromPassword(password, bcrypt.DefaultCost)
}
```

View File

@ -1,10 +1,10 @@
* [[Home|Home]]
* Getting Started
* [[Installing Shou|Installing Shou]]
* [[Installing Shuo|Installing Shuo]]
* [[Usage|Usage]]
* Server
* [[Configuration|Configuration]]
* [[Users|Users]]
* Client
* [[Commands|Commands]]
* [[Keyboard Shortcuts|Keyboard Shortcuts]]
* [[Keyboard Shortcuts|Keyboard Shortcuts]]