Added options hashmap to config for custom bot configuration.

This commit is contained in:
Aaron Weiss 2014-10-29 00:13:18 -04:00
parent f185106e08
commit 7f67bd2905
2 changed files with 3 additions and 1 deletions

View file

@ -1 +1 @@
echo "{\"owners\": [\"test\"],\"nickname\": \"test\",\"username\": \"test\",\"realname\": \"test\",\"password\": \"\",\"server\": \"irc.fyrechat.net\",\"port\": 6667,\"channels\": [\"#test\", \"#test2\"]}" > config.json
echo "{\"owners\": [\"test\"],\"nickname\": \"test\",\"username\": \"test\",\"realname\": \"test\",\"password\": \"\",\"server\": \"irc.fyrechat.net\",\"port\": 6667,\"channels\": [\"#test\", \"#test2\"],\"options\": {}}" > config.json

View file

@ -1,3 +1,4 @@
use std::collections::HashMap;
use std::io::fs::File;
use std::io::{InvalidInput, IoError, IoResult};
use serialize::json::{decode};
@ -79,6 +80,7 @@ pub struct Config {
pub server: String,
pub port: u16,
pub channels: Vec<String>,
pub options: HashMap<String, String>,
}
impl Config {