def on_create(connection):
 def on_connect(session):
  session.on_join(on_join)
  session.join(u'public')
 connection.on_connect(on_connect)

def on_create ( connection ) : def on_connect ( session ) : session . on_join ( on_join ) session . join ( u'public' ) connection . on_connect ( on_connect )
this is the main entry into user code .