mirror of https://github.com/fluffle/goirc
Minor rearrangements.
This commit is contained in:
parent
b1242aa351
commit
39882dafd4
|
@ -73,17 +73,16 @@ type Config struct {
|
||||||
|
|
||||||
func NewConfig(nick string, args ...string) *Config {
|
func NewConfig(nick string, args ...string) *Config {
|
||||||
ident := "goirc"
|
ident := "goirc"
|
||||||
name := "Powered by GoIRC"
|
|
||||||
|
|
||||||
if len(args) > 0 && args[0] != "" {
|
if len(args) > 0 && args[0] != "" {
|
||||||
ident = args[0]
|
ident = args[0]
|
||||||
}
|
}
|
||||||
|
name := "Powered by GoIRC"
|
||||||
if len(args) > 1 && args[1] != "" {
|
if len(args) > 1 && args[1] != "" {
|
||||||
name = args[1]
|
name = args[1]
|
||||||
}
|
}
|
||||||
cfg := &Config{
|
cfg := &Config{
|
||||||
PingFreq: 3 * time.Minute,
|
PingFreq: 3 * time.Minute,
|
||||||
NewNick: func(s string) string { return s + "_" },
|
NewNick: func(s string) string { return s + "_" },
|
||||||
}
|
}
|
||||||
cfg.Me = state.NewNick(nick)
|
cfg.Me = state.NewNick(nick)
|
||||||
cfg.Me.Ident = ident
|
cfg.Me.Ident = ident
|
||||||
|
|
Loading…
Reference in New Issue