about summary refs log tree commit diff stats
path: root/src/command
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-02-03 02:35:04 +0000
committerJames Booth <boothj5@gmail.com>2013-02-03 02:35:04 +0000
commitca26452af60b15bcecc61c02644e24e1cf352654 (patch)
tree37beadaa9073e606fd932524997725960fba7263 /src/command
parent0030ae5890349467ae6c3602325acef8c1ae68ac (diff)
downloadprofani-tty-ca26452af60b15bcecc61c02644e24e1cf352654.tar.gz
Refactored getting boolean preferences
Diffstat (limited to 'src/command')
-rw-r--r--src/command/command.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/command/command.c b/src/command/command.c
index 05123015..a95d064a 100644
--- a/src/command/command.c
+++ b/src/command/command.c
@@ -918,7 +918,7 @@ cmd_execute_default(const char * const inp)
             char *recipient = win_current_get_recipient();
             message_send(inp, recipient);
 
-            if (win_current_is_chat() && prefs_get_chlog()) {
+            if (win_current_is_chat() && prefs_get_boolean(PREF_CHLOG)) {
                 const char *jid = jabber_get_jid();
                 Jid *jidp = jid_create(jid);
                 chat_log_chat(jidp->barejid, recipient, inp, PROF_OUT_LOG, NULL);
@@ -1738,7 +1738,7 @@ _cmd_msg(gchar **args, struct cmd_help_t help)
             message_send(msg, usr);
             win_show_outgoing_msg("me", usr, msg);
 
-            if (win_current_is_chat() && prefs_get_chlog()) {
+            if (win_current_is_chat() && prefs_get_boolean(PREF_CHLOG)) {
                 const char *jid = jabber_get_jid();
                 Jid *jidp = jid_create(jid);
                 chat_log_chat(jidp->barejid, usr, msg, PROF_OUT_LOG, NULL);
@@ -1936,7 +1936,7 @@ _cmd_tiny(gchar **args, struct cmd_help_t help)
                 char *recipient = win_current_get_recipient();
                 message_send(tiny, recipient);
 
-                if (prefs_get_chlog()) {
+                if (prefs_get_boolean(PREF_CHLOG)) {
                     const char *jid = jabber_get_jid();
                     Jid *jidp = jid_create(jid);
                     chat_log_chat(jidp->barejid, recipient, tiny, PROF_OUT_LOG, NULL);
@@ -1984,7 +1984,7 @@ _cmd_close(gchar **args, struct cmd_help_t help)
             presence_leave_chat_room(room_jid);
         } else if (win_current_is_chat() || win_current_is_private()) {
 
-            if (prefs_get_states()) {
+            if (prefs_get_boolean(PREF_STATES)) {
                 char *recipient = win_current_get_recipient();
 
                 // send <gone/> chat state before closing