Move f.open() with the rest of the file operations- it was driving me nuts. Also, remove 'server' and 'channel' information. I likely already know what server/channel they are in, and if not, can find the message easily enough when getting back to my client.
In the event that the 'tags' key is empty, continue, not pass, through the loop, and wait for the next iteration.
When the day changes, WeeChat prints the following message: Day changed to Thu, 30 Aug 2012 This causes the 'tags' list in the dictionary to be empty. Because we're not interested in getting notified of day changes, the loop should pass. Further, rather than using yaml.items() to get at the values, yaml.values() is uesed to get to the data. Also make stylistic changes to the code, and add comments.