Implement LIST OVERVIEW.FMT
This commit is contained in:
parent
072cf46c1e
commit
32870c8a8a
1 changed files with 21 additions and 2 deletions
|
@ -375,9 +375,28 @@ class Session():
|
||||||
|
|
||||||
return self.end()
|
return self.end()
|
||||||
|
|
||||||
|
OVERVIEW_FMT_HEADERS = [
|
||||||
|
'Subject',
|
||||||
|
'From',
|
||||||
|
'Date',
|
||||||
|
'Message-ID',
|
||||||
|
'References',
|
||||||
|
'Bytes',
|
||||||
|
'Lines',
|
||||||
|
]
|
||||||
|
|
||||||
|
def _cmd_list_overview_fmt(self):
|
||||||
|
self.respond(ResponseCode.NNTP_INFORMATION_FOLLOWS, "Order of fields in overview database")
|
||||||
|
|
||||||
|
for header in self.OVERVIEW_FMT_HEADERS:
|
||||||
|
self.print("%s:" % (header,))
|
||||||
|
|
||||||
|
return self.end()
|
||||||
|
|
||||||
LIST_SUBCOMMANDS = {
|
LIST_SUBCOMMANDS = {
|
||||||
'NEWSGROUPS': _cmd_list_newsgroups,
|
'NEWSGROUPS': _cmd_list_newsgroups,
|
||||||
'ACTIVE': _cmd_list_active,
|
'ACTIVE': _cmd_list_active,
|
||||||
|
'OVERVIEW.FMT': _cmd_list_overview_fmt,
|
||||||
}
|
}
|
||||||
|
|
||||||
def _cmd_list(self, *args):
|
def _cmd_list(self, *args):
|
||||||
|
|
Loading…
Add table
Reference in a new issue