@asyncio.coroutine
@hook.irc_raw('PART')
def on_join(conn, chan, target):
 if (target == conn.nick):
  bot_joined_channel(conn, chan)

@ asyncio . coroutine @ hook . irc_raw ( 'PART' ) def on_join ( conn , chan , target ) : if ( target == conn . nick ) : bot_joined_channel ( conn , chan )
this is user code triggered when a session was created on top of a connection .