To be honest, I've severely modified Yardbird and will eventually send the patches back, so this stuff doesn't make as much sense without my patches that increase the flexibility of Yardbird.

The 'ch' macro is for matching IRC channels, 'nm' is for nicknames, 'botmsg' is for messages directed to the bot, and 'msg' is for messages in the channel or to the bot versus other types of messages, e.g. nick changes come in as 'nick/' so we don't want to act on those as possible commands.

The patterns for these macros are really simply and much easier to read as well:

surl(r'\^\<:botmsg>tell \<nick:nm> \<message=.*>\$', 'tell'),

That command is for telling the bot to later tell a user a message when they log in again. It checks if the command was to the bot through 'botmsg', sees the command as 'tell' and the command has two parameters, 'user' and 'message' the latter of which matches the rest of the statement. All of this is accessible from a very quick glance at the pattern instead of attempting to read this: