diff options
| -rw-r--r-- | client/command.go | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/client/command.go b/client/command.go index 3dc3d26..253cf59 100644 --- a/client/command.go +++ b/client/command.go @@ -63,11 +63,8 @@ func (a *application) doCommand(command string, args []string, text string) { case "nick": a.setNick(text) case "join": - if !argN(1) { - break - } if a.authenticated { - a.join(args[0]) + a.join(text) } case "leave": if !argN(0) { @@ -80,13 +77,10 @@ func (a *application) doCommand(command string, args []string, text string) { } a.currentWindow = cmdWindowLocation {} case "rename": - if !argN(1) { - break - } win := a.windowCache.Get(a.currentWindow) switch win.(type) { case *channelWindow: - win.(*channelWindow).renameChannel(args[0]) + win.(*channelWindow).renameChannel(text) } case "list": if !argN(0) { @@ -100,11 +94,8 @@ func (a *application) doCommand(command string, args []string, text string) { }) } case "create": - if !argN(1) { - break - } if a.authenticated { - a.createChannel(args[0]) + a.createChannel(text) } case "help": var ( |
