Here it is
Posted on December 3, 2011
As promised, I'm releasing the code to my recent weechat script in a state that I am mildly comfortable with.
Pretty source
Download (My server tries to execute .py files, so you'll need to rename it)
In my haste, I do not have error checking for things like failed logins. Make sure your username and password are correct if you try to use this.
You will need to have the imaplib python module installed.