mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Fix some oversights on evtable.self stupidity.
This commit is contained in:
parent
c3e2522da9
commit
060a48c4aa
4 changed files with 9 additions and 9 deletions
|
|
@ -367,7 +367,7 @@ class CmdSessions(COMMAND_DEFAULT_CLASS):
|
|||
"""Implement function"""
|
||||
account = self.account
|
||||
sessions = account.sessions.all()
|
||||
table = evtable.self.style_table("|wsessid",
|
||||
table = self.style_table("|wsessid",
|
||||
"|wprotocol",
|
||||
"|whost",
|
||||
"|wpuppet/character",
|
||||
|
|
@ -418,7 +418,7 @@ class CmdWho(COMMAND_DEFAULT_CLASS):
|
|||
naccounts = (SESSIONS.account_count())
|
||||
if show_session_data:
|
||||
# privileged info
|
||||
table = evtable.self.style_table("|wAccount Name",
|
||||
table = self.style_table("|wAccount Name",
|
||||
"|wOn for",
|
||||
"|wIdle",
|
||||
"|wPuppeting",
|
||||
|
|
@ -444,7 +444,7 @@ class CmdWho(COMMAND_DEFAULT_CLASS):
|
|||
isinstance(session.address, tuple) and session.address[0] or session.address)
|
||||
else:
|
||||
# unprivileged
|
||||
table = evtable.self.style_table("|wAccount name", "|wOn for", "|wIdle")
|
||||
table = self.style_table("|wAccount name", "|wOn for", "|wIdle")
|
||||
for session in session_list:
|
||||
if not session.logged_in:
|
||||
continue
|
||||
|
|
@ -524,7 +524,7 @@ class CmdOption(COMMAND_DEFAULT_CLASS):
|
|||
options.pop("TTYPE", None)
|
||||
|
||||
header = ("Name", "Value", "Saved") if saved_options else ("Name", "Value")
|
||||
table = evtable.self.style_table(*header)
|
||||
table = self.style_table(*header)
|
||||
for key in sorted(options):
|
||||
row = [key, options[key]]
|
||||
if saved_options:
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ def list_bans(banlist):
|
|||
if not banlist:
|
||||
return "No active bans were found."
|
||||
|
||||
table = evtable.self.style_table("|wid", "|wname/ip", "|wdate", "|wreason")
|
||||
table = self.style_table("|wid", "|wname/ip", "|wdate", "|wreason")
|
||||
for inum, ban in enumerate(banlist):
|
||||
table.add_row(str(inum + 1),
|
||||
ban[0] and ban[0] or ban[1],
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ class CmdChannels(COMMAND_DEFAULT_CLASS):
|
|||
|
||||
if self.cmdstring == "comlist":
|
||||
# just display the subscribed channels with no extra info
|
||||
comtable = evtable.self.style_table("|wchannel|n", "|wmy aliases|n",
|
||||
comtable = self.style_table("|wchannel|n", "|wmy aliases|n",
|
||||
"|wdescription|n", align="l", maxwidth=_DEFAULT_WIDTH)
|
||||
for chan in subs:
|
||||
clower = chan.key.lower()
|
||||
|
|
@ -306,7 +306,7 @@ class CmdChannels(COMMAND_DEFAULT_CLASS):
|
|||
" |waddcom|n/|wdelcom|n to sub/unsub):|n\n%s" % comtable)
|
||||
else:
|
||||
# full listing (of channels caller is able to listen to)
|
||||
comtable = evtable.self.style_table("|wsub|n", "|wchannel|n", "|wmy aliases|n",
|
||||
comtable = self.style_table("|wsub|n", "|wchannel|n", "|wmy aliases|n",
|
||||
"|wlocks|n", "|wdescription|n", maxwidth=_DEFAULT_WIDTH)
|
||||
for chan in channels:
|
||||
clower = chan.key.lower()
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ class CmdNick(COMMAND_DEFAULT_CLASS):
|
|||
if not nicklist:
|
||||
string = "|wNo nicks defined.|n"
|
||||
else:
|
||||
table = evtable.self.style_table("#", "Type", "Nick match", "Replacement")
|
||||
table = self.style_table("#", "Type", "Nick match", "Replacement")
|
||||
for inum, nickobj in enumerate(nicklist):
|
||||
_, _, nickvalue, replacement = nickobj.value
|
||||
table.add_row(str(inum + 1), nickobj.db_category, _cy(nickvalue), _cy(replacement))
|
||||
|
|
@ -338,7 +338,7 @@ class CmdInventory(COMMAND_DEFAULT_CLASS):
|
|||
if not items:
|
||||
string = "You are not carrying anything."
|
||||
else:
|
||||
table = evtable.self.style_table(border="header")
|
||||
table = self.style_table(border="header")
|
||||
for item in items:
|
||||
table.add_row("|C%s|n" % item.name, item.db.desc or "")
|
||||
string = "|wYou are carrying:\n%s" % table
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue