ircbot: shortenurl function