move record as well (yeah, I'm a selfish bitch, I migrate things in my own folder...
[apps/madmutt.git] / alias.cpkg
index 2651026..2efa1ef 100644 (file)
 @import  "lib-lua/base.cpkg"
 
 static rx_t *Alternates = NULL, *UnAlternates = NULL;
+rx_t *MailLists = NULL, *UnMailLists = NULL;
+rx_t *SubscribedLists = NULL, *UnSubscribedLists = NULL;
 
-@static_package MAlias {
+@package MAlias {
     /*
      ** .pp
      ** Specifies the format of the data displayed for the ``alias'' menu. The
@@ -63,19 +65,64 @@ static rx_t *Alternates = NULL, *UnAlternates = NULL;
      ** \fBNote:\fP Madmutt will not automatically source this file; you must
      ** explicitly use the ``$source'' command for it to be executed.
      */
-    path_t   alias_file   = m_strdup("~/.madmutt/aliases");
+    path_t alias_file = m_strdup("~/.madmutt/aliases");
+
+    /*
+     ** .pp
+     ** Specifies the filename of your signature, which is appended to all
+     ** outgoing messages.   If the filename ends with a pipe (``\fT|\fP''), it is
+     ** assumed that filename is a shell command and input should be read from
+     ** its stdout.
+     */
+    path_t signature = m_strdup("~/.signature");
+
+    /*
+     ** .pp
+     ** This specifies the file into which your outgoing messages should be
+     ** appended.  (This is meant as the primary method for saving a copy of
+     ** your messages, but another way to do this is using the ``$my_hdr''
+     ** command to create a \fTBcc:\fP header field with your email address in it.)
+     ** .pp
+     ** The value of \fI$$record\fP is overridden by the ``$$force_name'' and
+     ** ``$$save_name'' variables, and the ``$fcc-hook'' command.
+     */
+    path_t record = NULL;
 
     void alternates(rx_t rx) {
         rx_list_remove(&UnAlternates, rx);
         rx_list_add(&Alternates, rx);
         RETURN();
     };
-
     void unalternates(rx_t rx) {
         rx_list_remove(&Alternates, rx);
         rx_list_add(&UnAlternates, rx);
         RETURN();
     };
+
+    void lists(rx_t rx) {
+        rx_list_remove(&UnMailLists, rx);
+        rx_list_add(&MailLists, rx);
+        RETURN();
+    };
+    void unlists(rx_t rx) {
+        rx_list_remove(&MailLists, rx);
+        rx_list_remove(&SubscribedLists, rx);
+        rx_list_add(&UnMailLists, rx);
+        RETURN();
+    };
+
+    void subscribe(rx_t rx) {
+        rx_list_remove(&UnMailLists, rx);
+        rx_list_remove(&UnSubscribedLists, rx);
+        rx_list_add(&MailLists, rx);
+        rx_list_add(&SubscribedLists, rx_dup(rx));
+        RETURN();
+    };
+    void unsubscribe(rx_t rx) {
+        rx_list_remove(&SubscribedLists, rx);
+        rx_list_add(&UnSubscribedLists, rx);
+        RETURN();
+    };
 };
 
 alias_t *Aliases;