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 ## /clear

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: To quickly open the config:
``` ```console
$ shout config $ shuo config
``` ```
## public ## 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. The port to listen on.
You can override this setting by starting Shout like this: You can override this setting by starting Shuo like this:
`shout start --port 80`
```console
$ shuo start --port 80
```
## theme ## 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 ## 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 ## logs

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 $ sudo npm -g install shou
@ -80,4 +80,4 @@ npm install -g shou
# Install complete # 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: 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. This will give you an overiew of the commands you can use.
@ -13,7 +13,7 @@ _Start the Shou server._
Example: Example:
``` ```
$ shout start --port 80 --private $ shuo start --port 80 --private
``` ```
Options: Options:
@ -30,7 +30,7 @@ _Open the configuration file._
Example: Example:
``` ```
$ shout config $ shuo config
``` ```
## `list` ## `list`
@ -40,7 +40,7 @@ _List all existing users._
Example: Example:
``` ```
$ shout list $ shuo list
``` ```
## `add <name> [<password>]` ## `add <name> [<password>]`
@ -50,7 +50,7 @@ _Add a new user._
Example: Example:
``` ```
$ shout add john $ shuo add john
``` ```
## `remove <name>` ## `remove <name>`
@ -60,7 +60,7 @@ _Remove an existing user._
Example: Example:
``` ```
$ shout remove john $ shuo remove john
``` ```
## `reset <name>` ## `reset <name>`
@ -70,7 +70,7 @@ _Reset user password._
Example: Example:
``` ```
$ shout reset john $ shuo reset john
``` ```
## `edit <name>` ## `edit <name>`
@ -80,7 +80,7 @@ _Edit user configuration file._
Example: Example:
``` ```
$ shout edit john $ shuo edit john
``` ```
# Options # Options
@ -92,8 +92,8 @@ _Set the home path. This is the location where Shou will look for the `config.js
Example: Example:
``` ```
$ shout --home /app add <user> # add user to /app/users $ shuo --home /app add <user> # add user to /app/users
$ shout --home /app # start server with /app/config.js $ shuo --home /app # start server with /app/config.js
``` ```
## `--help` ## `--help`
@ -103,7 +103,7 @@ _Output usage information._
Example: Example:
``` ```
$ shout --help $ shuo --help
``` ```
## `--version` ## `--version`
@ -113,5 +113,5 @@ _Output the version number._
Example: 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: To add a new user, run this command:
``` ```
$ shout add <name> $ shuo add <name>
``` ```
This will create a new user in your `users/` folder. 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: Open the `user.json` for the specified user:
``` ```
$ shout edit <name> $ shuo edit <name>
``` ```
## Remove user ## Remove user
@ -30,7 +30,7 @@ $ shout edit <name>
Simply run: Simply run:
``` ```
$ shout remove <name> $ shuo remove <name>
``` ```
## List users ## List users
@ -38,16 +38,16 @@ $ shout remove <name>
This command will print a list of all your existing users: This command will print a list of all your existing users:
``` ```
$ shout list $ shuo list
``` ```
# User configuration # 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: The user configuration is loaded upon server start. Here's an example of what a `user.json` file might look like:
``` ```json
{ {
"user": "example", "user": "example",
"password": "password", "password": "password",
@ -68,3 +68,42 @@ The user configuration is loaded upon server start. Here's an example of what a
}] }]
} }
``` ```
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,6 +1,6 @@
* [[Home|Home]] * [[Home|Home]]
* Getting Started * Getting Started
* [[Installing Shou|Installing Shou]] * [[Installing Shuo|Installing Shuo]]
* [[Usage|Usage]] * [[Usage|Usage]]
* Server * Server
* [[Configuration|Configuration]] * [[Configuration|Configuration]]