#NEWLINE# def set( self , irc , msg , args , channel , number , topic ) : #NEWLINE# #INDENT# "[<channel>] [<number>] <topic>\n\n        Sets the topic <number> to be <text>.  If no <number> is given, this\n        sets the entire topic.  <channel> is only necessary if the message\n        isn't sent in the channel itself.\n        " #NEWLINE# self . _checkManageCapabilities ( irc , topic , channel ) #NEWLINE# if ( number is not None ) : #NEWLINE# #INDENT# topics = self . _splitTopic ( irc . state . getTopic ( channel ) , channel ) #NEWLINE# topics [ number ] = topic #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# topics = [ topic ] #NEWLINE# #UNINDENT# self . _sendTopics ( irc , channel , topics )