def add(self, irc, msg, args, name, probability, regexp, command):
"""<name> [<probability>] <regexp> <command>
Calls <command> when <regexp> matches a given message. Before
being called, <command> has the standard substitute applied to it,
as well as having $1, $2, etc. replaced by the appropriate groups
of the regexp. If <probability> is not given, it defaults to 1;
otherwise it should be a floating point probability that the observer
will execute if it matches.
"""
registerObserver(name, regexp, command, probability)
irc.replySuccess()
add = wrap(add, ['admin', 'observer',
optional('float', 1.0),
('regexpMatcher', False),
'text'])