ps([<object>[,<type]])
Lists currently pending QIDs. If <object> is not specified, then the
- executor's queue is listed. <type> is one of:
+ executor's queue is listed. If <object> is ALL, then all players' queues
+ are listed. <type> is one of:
player - list the player queue
object - list the object queue
wait - list the wait queue
for (tmp = qptr; tmp; tmp = tmp->next) {
if (GoodObject(tmp->player)) {
- if (Owner(tmp->player) == thing) {
+ if ((thing == NOTHING && CanSeeQ(executor, Owner(tmp->player)))
+ || (Owner(tmp->player) == thing)) {
if (count)
safe_chr(' ', buff, bp);
safe_integer(tmp->qid, buff, bp);
safe_str(T("INVALID ARGUMENT"), buff, bp);
return;
}
- thing = match_result(executor, args[0], NOTYPE, MAT_EVERYTHING);
- if (thing == NOTHING) {
- safe_str(T(e_match), buff, bp);
- return;
- } else if (thing == AMBIGUOUS) {
- safe_str(T("#-1 AMBIGUOUS MATCH"), buff, bp);
- return;
- }
- if (!CanSeeQ(executor, thing)) {
- safe_str(T(e_perm), buff, bp);
- return;
+ if (!strcasecmp(args[0], "all")) {
+ thing = NOTHING;
+ } else {
+ thing = match_result(executor, args[0], NOTYPE, MAT_EVERYTHING);
+ if (thing == NOTHING) {
+ safe_str(T(e_match), buff, bp);
+ return;
+ } else if (thing == AMBIGUOUS) {
+ safe_str(T("#-1 AMBIGUOUS MATCH"), buff, bp);
+ return;
+ }
+ if (!CanSeeQ(executor, thing)) {
+ safe_str(T(e_perm), buff, bp);
+ return;
+ }
}
}