+(defun murk-command-nick (params)
+ (if params
+ (let ((new-nick (string-join params " "))
+ (ctx (murk-current-context)))
+ (if ctx
+ (murk-send-msg (murk-context-server ctx)
+ (murk-msg nil nil "NICK" new-nick))
+ (murk-display-error "No current connection")))
+ (murk-display-notice nil "Usage: /nick <new-nick>")))
+
+(defun murk-command-list (params)
+ (let ((ctx (murk-current-context)))
+ (if ctx
+ (if (not params)
+ (murk-display-notice nil "This command can generate lots of output. Use `/LIST -yes' if you really want this, or `/LIST <channel_regexp>' to reduce the output.")
+ (let ((server (murk-context-server ctx)))
+ (if (equal (upcase (car params)) "-YES")
+ (murk-send-msg server (murk-msg nil nil "LIST"))
+ (murk-send-msg server (murk-msg nil nil "LIST"
+ (car params))))))
+ (murk-display-error "No current connection"))))
+
+(defun murk-command-topic (params)
+ (let ((ctx (murk-current-context)))
+ (if (and ctx (not (murk-server-context-p ctx)))
+ (let ((server (murk-context-server ctx))
+ (channel (murk-context-channel ctx)))
+ (if params
+ (murk-send-msg server
+ (murk-msg nil nil "TOPIC" channel
+ (string-join params " ")))
+ (murk-send-msg server
+ (murk-msg nil nil "TOPIC" channel))))
+ (murk-display-notice nil "No current channel."))))
+