def on_join(word, word_eol, userdata): triggernick, triggerchannel, triggerhost = word #we could also do triggernick = word[0] #we could also do triggernick = word[1] you get the picture destination = xchat.get_context() destination.command("say Hello " + triggernick + " and welcome to " + triggerchannel)