about summary refs log tree commit diff stats
path: root/src/ui/core.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-04-27 00:32:04 +0100
committerJames Booth <boothj5@gmail.com>2014-04-27 00:32:04 +0100
commitc39c093fa5bb7907143c6f06ee06a1a88ea788f1 (patch)
treefdb8ab9d5c47e1835ca07cd9f14a7c48eb0f8478 /src/ui/core.c
parent84c7fc9ae0453ecc2b95151ec5e15e28476f0d79 (diff)
downloadprofani-tty-c39c093fa5bb7907143c6f06ee06a1a88ea788f1.tar.gz
Tidied UI messages for SMP shared secret authentication
Diffstat (limited to 'src/ui/core.c')
-rw-r--r--src/ui/core.c32
1 files changed, 3 insertions, 29 deletions
diff --git a/src/ui/core.c b/src/ui/core.c
index e59b2fda..5c7343e9 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -791,19 +791,7 @@ _ui_smp_recipient_initiated(const char * const recipient)
     if (window == NULL) {
         return;
     } else {
-        win_vprint_line(window, '!', 0, "%s initiated SMP with secret, use '/otr secret <secret>' to start a trusted session.", recipient);
-        win_update_virtual(window);
-    }
-}
-
-static void
-_ui_smp_successful_sender(const char * const recipient)
-{
-    ProfWin *window = wins_get_by_recipient(recipient);
-    if (window == NULL) {
-        return;
-    } else {
-        win_vprint_line(window, '!', 0, "SMP session started.");
+        win_vprint_line(window, '!', 0, "%s wants to authenticate your identity, use '/otr secret <secret>'.", recipient);
         win_update_virtual(window);
     }
 }
@@ -815,19 +803,7 @@ _ui_smp_unsuccessful_sender(const char * const recipient)
     if (window == NULL) {
         return;
     } else {
-        win_vprint_line(window, '!', 0, "SMP session failed, the secret you entered does not match the secret entered by %s.", recipient);
-        win_update_virtual(window);
-    }
-}
-
-static void
-_ui_smp_successful_receiver(const char * const recipient)
-{
-    ProfWin *window = wins_get_by_recipient(recipient);
-    if (window == NULL) {
-        return;
-    } else {
-        win_vprint_line(window, '!', 0, "SMP session started.");
+        win_vprint_line(window, '!', 0, "Authentication failed, the secret you entered does not match the secret entered by %s.", recipient);
         win_update_virtual(window);
     }
 }
@@ -839,7 +815,7 @@ _ui_smp_unsuccessful_receiver(const char * const recipient)
     if (window == NULL) {
         return;
     } else {
-        win_vprint_line(window, '!', 0, "SMP session failed, the secret %s entered does not match the secret you entered.", recipient);
+        win_vprint_line(window, '!', 0, "Authentication failed, the secret entered by %s does not match yours.", recipient);
         win_update_virtual(window);
     }
 }
@@ -2051,9 +2027,7 @@ ui_init_module(void)
     ui_trust = _ui_trust;
     ui_untrust = _ui_untrust;
     ui_smp_recipient_initiated = _ui_smp_recipient_initiated;
-    ui_smp_successful_sender = _ui_smp_successful_sender;
     ui_smp_unsuccessful_sender = _ui_smp_unsuccessful_sender;
-    ui_smp_successful_receiver = _ui_smp_successful_receiver;
     ui_smp_unsuccessful_receiver = _ui_smp_unsuccessful_receiver;
     ui_smp_aborted = _ui_smp_aborted;
     ui_chat_win_contact_online = _ui_chat_win_contact_online;