change split to fields

This commit is contained in:
Andrew 2019-05-08 11:56:12 +10:00
parent 48af37d999
commit ac99fbdf85

@ -285,7 +285,7 @@ func (sc *ServerConnection) Send(tags map[string]string, prefix string, command
// dispatchCommand dispatches an event based on simple commands (e.g !help)
func (sc *ServerConnection) dispatchCommand(info eventmgr.InfoMap) {
params := strings.Split(info["params"].([]string)[1], " ")
params := strings.Fields(info["params"].([]string)[1])
for _, p := range sc.CommandPrefixes {
if strings.HasPrefix(params[0], p) {