Correct issue with multiple params in basic commands
This commit is contained in:
parent
e1e4e900f8
commit
0e3a2f7774
@ -281,12 +281,12 @@ func (sc *ServerConnection) Send(tags map[string]string, prefix string, command
|
|||||||
|
|
||||||
// dispatchCommand dispatches an event based on simple commands (e.g !help)
|
// dispatchCommand dispatches an event based on simple commands (e.g !help)
|
||||||
func (sc *ServerConnection) dispatchBasicCmd(info eventmgr.InfoMap) {
|
func (sc *ServerConnection) dispatchBasicCmd(info eventmgr.InfoMap) {
|
||||||
cmd := info["params"].([]string)
|
cmd := strings.Split(info["params"].([]string)[1], " ")[0]
|
||||||
pfx := cmd[1][0]
|
pfx := cmd[0]
|
||||||
|
|
||||||
for _, p := range basicCmdPrefixes {
|
for _, p := range basicCmdPrefixes {
|
||||||
if pfx == p {
|
if pfx == p {
|
||||||
sc.eventsIn.Dispatch("cmd"+cmd[1], info)
|
sc.eventsIn.Dispatch("cmd"+cmd, info)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user