-/** A list of snomasks which are valid, and their descriptive texts
- */
-typedef std::map<char, std::string> SnoList;
+class SnomaskManager;
+class Snomask
+{
+ /** Description of this snomask, e.g.: OPER, ANNOUNCEMENT, XLINE
+ */
+ std::string Description;
+
+ /** Information about the last sent message,
+ * used for sending "last message repeated X times" messages
+ */
+ std::string LastMessage;
+ char LastLetter;
+ unsigned int Count;
+
+ /** Log and send a message to all opers who have the given snomask set
+ * @param letter The target users of this message
+ * @param desc The description of this snomask, will be prepended to the message
+ * @param msg The message to send
+ */
+ static void Send(char letter, const std::string& desc, const std::string& msg);
+
+ public:
+ /** Create a new Snomask
+ */
+ Snomask();
+
+ /** Sends a message to all opers with this snomask.
+ * @param message The message to send
+ * @param remote If true the message will go to the uppercase variant of this snomask
+ */
+ void SendMessage(const std::string& message, char letter);
+
+ /** Sends out the (last message repeated N times) message
+ */
+ void Flush();