@verb #6397:"@banned @addban @unban" any none none rxdo #6397 @program #6397:"@banned @addban @unban" any none none "Copied from MI6 HQ (#9725):@banned by 007 (#3341)Aug 28 17:11:53 1998" set_task_perms(this) if (verb in {"@addban", "@rmban"}) match = $string_utils:match_player(dobjstr) if ($command_utils:player_match_failed(match, dobjstr)) return endif if (verb == "@addban" && match in this.ban) return player:tell($string_utils:nn(match), " is already in your list of banned persons.") elseif (verb == "@rmban" && !(match in this.ban)) return player:tell($string_utils:nn(match), " isn't in your list of banned persons.") endif if ($command_utils:yes_or_no(tostr(verb == "@addban" ? "Add " | "Remove ", $string_utils:nn(match), verb == "@addban" ? " to" | " from", " your list of banned persons?"))) if (verb == "@addban") return {player:tell($string_utils:nn(match), " added to your list of pals."), this.ban = setadd(this.ban, match)} else return {player:tell($string_utils:nn(match), " removed from your banned list."), this.ban = setremove(this.ban, match)} endif else return player:tell() endif elseif (verb == "@banned" && !args) if ($command_utils:yes_or_no("Would you like to see the list of all your banned persons?")) if ($tcm) return player:tell({tostr($string_utils:name_and_number_list(this.ban)), tostr("Total: ", length(this.ban))}) else ban = {} for x in (this.ban) ban = {@banned, {x, `x:titlec() ! ANY => x.name', x:connected() ? "Awake" | "Asleep", `x.location:title() ! ANY => x.location.name', x.location}} suspend(0) endfor return {player:tellColumns(1, {1, 1, 1, 1, 1}, {"#", "Name", "Status", "Location", "#"}, @$list_utils:sort(ban)), player:tell("Total: ", length(ban))} endif else return player:tell() endif else return player:tell({"I don't understand that."}) endif .