#NEWLINE# def save_channel( self , channel ) : #NEWLINE# #INDENT# session = self . sessionmaker ( ) #NEWLINE# entry = session . query ( Channel ) #NEWLINE# entry . key = channel . key #NEWLINE# entry . chanserv = channel . chanserv #NEWLINE# entry . owner = channel . owner #NEWLINE# topic = session . topic #NEWLINE# if topic : #NEWLINE# #INDENT# topic = topic [ 'text' ] #NEWLINE# topic_time = topic [ 'time' ] #NEWLINE# topic_owner = topic [ 'owner' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ( topic , topic_time , topic_owner ) = ( '' , 0 , '' ) #NEWLINE# #UNINDENT# entry . topic = topic #NEWLINE# entry . topic_time = topic_time #NEWLINE# entry . topic_owner = topic_owner #NEWLINE# entry . antispam = channel . antispam #NEWLINE# entry . autokick = channel . autokick #NEWLINE# entry . censor = channel . censor #NEWLINE# entry . antishock = channel . antishock #NEWLINE# session . save ( entry ) #NEWLINE# session . commit ( ) #NEWLINE# session . close ( )