about summary refs log tree commit diff stats
path: root/src/command
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-05-05 00:16:10 +0100
committerJames Booth <boothj5@gmail.com>2013-05-05 00:16:10 +0100
commit8c5866ff52d38cecdf9e52f0d9f30c53bc1c3c03 (patch)
treee06b942e3f61ab8cd14c1389fc2304a827355b4a /src/command
parentc1cf0b433eb13823509b3de2f3e910c3fc009af7 (diff)
downloadprofani-tty-8c5866ff52d38cecdf9e52f0d9f30c53bc1c3c03.tar.gz
Added groupchat logs
closes #168
Diffstat (limited to 'src/command')
-rw-r--r--src/command/command.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/command/command.c b/src/command/command.c
index 338fd27f..1a8d070f 100644
--- a/src/command/command.c
+++ b/src/command/command.c
@@ -115,6 +115,7 @@ static gboolean _cmd_set_intype(gchar **args, struct cmd_help_t help);
 static gboolean _cmd_set_flash(gchar **args, struct cmd_help_t help);
 static gboolean _cmd_set_splash(gchar **args, struct cmd_help_t help);
 static gboolean _cmd_set_chlog(gchar **args, struct cmd_help_t help);
+static gboolean _cmd_set_grlog(gchar **args, struct cmd_help_t help);
 static gboolean _cmd_set_history(gchar **args, struct cmd_help_t help);
 static gboolean _cmd_set_states(gchar **args, struct cmd_help_t help);
 static gboolean _cmd_set_outtype(gchar **args, struct cmd_help_t help);
@@ -597,6 +598,16 @@ static struct cmd_t setting_commands[] =
           "Switch chat logging on or off.",
           "This setting will be enabled if /history is set to on.",
           "When disabling this option, /history will also be disabled.",
+          "See the /grlog setting for enabling logging of chat room (groupchat) messages.",
+          NULL } } },
+
+    { "/grlog",
+        _cmd_set_grlog, parse_args, 1, 1,
+        { "/grlog on|off", "Chat logging of chat rooms to file",
+        { "/grlog on|off",
+          "-------------",
+          "Switch chat room logging on or off.",
+          "See the /chlog setting for enabling logging of one to one chat.",
           NULL } } },
 
     { "/states",
@@ -1107,6 +1118,8 @@ _cmd_complete_parameters(char *input, int *size)
         prefs_autocomplete_boolean_choice);
     _parameter_autocomplete(input, size, "/chlog",
         prefs_autocomplete_boolean_choice);
+    _parameter_autocomplete(input, size, "/grlog",
+        prefs_autocomplete_boolean_choice);
     _parameter_autocomplete(input, size, "/mouse",
         prefs_autocomplete_boolean_choice);
     _parameter_autocomplete(input, size, "/history",
@@ -2784,6 +2797,15 @@ _cmd_set_chlog(gchar **args, struct cmd_help_t help)
 }
 
 static gboolean
+_cmd_set_grlog(gchar **args, struct cmd_help_t help)
+{
+    gboolean result = _cmd_set_boolean_preference(args[0], help,
+        "Groupchat logging", PREF_GRLOG);
+
+    return result;
+}
+
+static gboolean
 _cmd_set_mouse(gchar **args, struct cmd_help_t help)
 {
     return _cmd_set_boolean_preference(args[0], help,