Don't have Telegram yet? Try it now!
https://guysoft.wordpress.com/2010/02/14/pidgin-x-chat-plugin-new-message/
Pidgin and X-chat plugins to execute a command on new messages