| 215 | | (defun pcomplete-erc-nicks (&optional postfix) |
|---|
| 216 | | "Returns a list of nicks in the current channel." |
|---|
| 217 | | (let ((users (erc-get-channel-user-list))) |
|---|
| 218 | | (if erc-pcomplete-order-nickname-completions |
|---|
| 219 | | (setq users (erc-sort-channel-users-by-activity users))) |
|---|
| 220 | | (mapcar (lambda (x) |
|---|
| 221 | | (concat (erc-server-user-nickname (car x)) postfix)) |
|---|
| 222 | | users))) |
|---|
| | 215 | (defun pcomplete-erc-nicks (&optional postfix ignore-self) |
|---|
| | 216 | "Returns a list of nicks in the current channel. |
|---|
| | 217 | Optional argument POSTFIX is something to append to the nickname. |
|---|
| | 218 | If optional argument IGNORE-SELF is non-nil, don't return the current nick." |
|---|
| | 219 | (let ((users (if erc-pcomplete-order-nickname-completions |
|---|
| | 220 | (erc-sort-channel-users-by-activity |
|---|
| | 221 | (erc-get-channel-user-list)) |
|---|
| | 222 | (erc-get-channel-user-list))) |
|---|
| | 223 | (nicks nil)) |
|---|
| | 224 | (dolist (user users) |
|---|
| | 225 | (unless (and ignore-self |
|---|
| | 226 | (string= (erc-server-user-nickname (car user)) |
|---|
| | 227 | (erc-current-nick))) |
|---|
| | 228 | (setq nicks (cons (concat (erc-server-user-nickname (car user)) |
|---|
| | 229 | postfix) |
|---|
| | 230 | nicks)))) |
|---|
| | 231 | (nreverse nicks))) |
|---|