#NEWLINE# @ irc3d . command ( permission = None ) #NEWLINE# def NICK( self , client , args = None , **kwargs ) : #NEWLINE# #INDENT# "When first connected to the IRC server, NICK is required to set the\n        client's nickname.\n\n        NICK will also change the client's nickname once a connection has been\n        established.\n\n            %%NICK <nick>\n        " #NEWLINE# new_nick = args [ '<nick>' ] #NEWLINE# self . nicks [ new_nick ] = client #NEWLINE# if client . registered : #NEWLINE# #INDENT# nick = client . nick #NEWLINE# kwargs [ 'broadcast' ] = ':{mask} NICK {new_nick}' . format ( new_nick = new_nick , ** client . data ) #NEWLINE# client . nick = new_nick #NEWLINE# super ( ServerUserlist , self ) . new_nick ( new_nick , new_nick , client = client , ** kwargs ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . context . register ( client , nick = new_nick )