toml to parameters
This commit is contained in:
parent
fd022bddfd
commit
41c1c27b1f
4 changed files with 86 additions and 78 deletions
17
types.go
17
types.go
|
|
@ -1,16 +1,5 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"net"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
Name string `cfg:"name; boddle; printableascii; IRC nick of bot"`
|
||||
Channels []string `cfg:"channels; required; printableascii; Channel list to join to"`
|
||||
Server string `cfg:"server; required; netaddr; Server name to connect to"`
|
||||
Database string `cfg:"database; ./boddle.db; path; Path to database"`
|
||||
}
|
||||
|
||||
type irc_msg struct {
|
||||
channel string
|
||||
msg string
|
||||
|
|
@ -26,9 +15,3 @@ type cmd struct {
|
|||
suffix string
|
||||
error string
|
||||
}
|
||||
|
||||
type bot struct {
|
||||
Conf Config
|
||||
conn net.Conn
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue