#NEWLINE# @ internationalizeDocstring #NEWLINE# def old( self , irc , msg , args , channel , id ) : #NEWLINE# #INDENT# "[<channel>] [<id>]\n\n        Returns the old news item for <channel> with <id>.  If no number is\n        given, returns all the old news items in reverse order.  <channel> is\n        only necessary if the message isn't sent in the channel itself.\n        " #NEWLINE# if id : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# record = self . db . getOld ( channel , id ) #NEWLINE# irc . reply ( str ( record ) ) #NEWLINE# #UNINDENT# except dbi . NoRecordError as id : #NEWLINE# #INDENT# irc . errorInvalid ( _ ( 'news item id' ) , id ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# records = self . db . getOld ( channel ) #NEWLINE# items = [ format ( '(#%i) %s' , R . id , R . subject ) for R in records ] #NEWLINE# s = format ( _ ( 'Old news for %s: %s' ) , channel , '; ' . join ( items ) ) #NEWLINE# irc . reply ( s ) #NEWLINE# #UNINDENT# except dbi . NoRecordError : #NEWLINE# #INDENT# irc . reply ( format ( _ ( 'No old news for %s.' ) , channel ) )