1
0
Fork 0
mirror of https://github.com/fluffle/goirc synced 2025-05-12 10:41:42 +00:00

Remove Commands from core goirc.

This dictates too much about how people might want to parse and act upon
information from PRIVMSGs, and thus should be an optional thing.
This commit is contained in:
Alex Bramley 2013-02-27 20:23:24 +00:00
parent 7bb84985ee
commit 4cd3831e92
5 changed files with 1 additions and 241 deletions

View file

@ -20,9 +20,8 @@ type Conn struct {
// Contains parameters that people can tweak to change client behaviour.
cfg *Config
// Handlers and Commands
// Handlers
handlers *hSet
commands *cSet
// State tracker for nicks and channels
st state.Tracker
@ -61,9 +60,6 @@ type Config struct {
// Client->server ping frequency, in seconds. Defaults to 3m.
PingFreq time.Duration
// Controls what is stripped from line.Args[1] for Commands
CommandStripNick, CommandStripPrefix bool
// Set this to true to disable flood protection and false to re-enable
Flood bool
@ -113,7 +109,6 @@ func Client(cfg *Config) (*Conn, error) {
cLoop: make(chan bool),
cPing: make(chan bool),
handlers: handlerSet(),
commands: commandSet(),
stRemovers: make([]Remover, 0, len(stHandlers)),
lastsent: time.Now(),
}