+ // If the message is a CTCP then we skip it unless it is
+ // an ACTION in which case we just check against the body.
+ std::string ctcpname;
+ std::string message(details.text);
+ if (details.IsCTCP(ctcpname, message))
+ {
+ // If the CTCP is not an action then skip it.
+ if (!irc::equals(ctcpname, "ACTION"))
+ return MOD_RES_PASSTHRU;
+ }
+
+ // If the message is shorter than the minimum length
+ // then we don't need to do anything else.
+ size_t length = message.length();
+ if (length < minlen)
+ return MOD_RES_PASSTHRU;
+
+ // Count the characters to see how many upper case and
+ // ignored (non upper or lower) characters there are.
+ size_t upper = 0;
+ for (std::string::const_iterator iter = message.begin(); iter != message.end(); ++iter)