Added support for detecting founder public key changing with
[crypto.git] / apps / irssi / src / fe-common / silc / module-formats.c
index bdfcdcfc63cf0e935a92f5beb1d2a5b9caad085b..8ad3fcdd0483a4f96486d37f68e4c2a916198bf5 100644 (file)
@@ -1,16 +1,15 @@
 /*
 
-  modules-formats.c
+  module-formats.c
 
-  Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
+  Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2001 Pekka Riikonen
+  Copyright (C) 2001 - 2007 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
-  the Free Software Foundation; either version 2 of the License, or
-  (at your option) any later version.
-  
+  the Free Software Foundation; version 2 of the License.
+
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -30,24 +29,89 @@ FORMAT_REC fecommon_silc_formats[] = {
 
        { "channel_founder_you", "You are channel founder on {channel $0}", 1, { 0 } },
        { "channel_founder", "channel founder on {channel $0} is: {channick_hilight $1}", 2, { 0, 0 } },
+       { "channel_founder_changed", "Channel founder public key changed on {channel $0}", 1, { 0 } },
        { "channel_topic", "Topic for {channel $0} is: $1", 2, { 0, 0 } },
        { "channel_topic_not_set", "Topic for {channel $0} not set", 1, { 0 } },
        { "cmode", "channel mode/{channel $0} {mode $1} by {nick $2}", 3, { 0, 0, 0 } },
        { "cumode", "channel user mode/{channel $0}/{nick $1} {mode $2} by {nick $3}", 4, { 0, 0, 0, 0 } },
-       { "action", "{action $0-}", 2, { 0, 0 } },
-       { "notice", "{notice $0-}", 2, { 0, 0 } },
-       { "ownaction", "{ownaction $0-}", 2, { 0, 0 } },
-       { "ownnotice", "{ownnotice $0-}", 2, { 0, 0 } },
-       { "invite_list", "channel {channel $0} invite list: $1", 2, { 0, 0 } },
-       { "no_invite_list", "channel {channel $0} invite list not set", 1, { 0 } },
-       { "ban_list", "channel {channel $0} ban list: $1", 2, { 0, 0 } },
-       { "no_ban_list", "channel {channel $0} ban list not set", 1, { 0 } },
+       { "inviteban_list", "channel {channel $0} $1 list:", 2, { 0, 0 } },
+       { "inviteban_string", "$0 - {channel $1}: $2 {ban $3}", 4, { 1, 0, 0, 0 } },
+       { "inviteban_pubkey", "$0 - {channel $1}: $2 Fingerprint (SHA1) {ban $3} (Babbleprint (SHA1)  {ban $4})", 5, { 1, 0, 0, 0, 0 } },
+       { "inviteban_reget", "Resolving incomplete information found in the $0 list for {channel $1}.", 2, { 0, 0 } },
+       { "no_inviteban_list", "channel {channel $0} $1 list not set", 2, { 0, 0 } },
        { "inviting", "Inviting {nick $0} to channel {channel $1}", 2, { 0, 0 } },
        { "kicked_you", "You have been kicked off channel {channel $0} by {nick $1} ($2)", 3, { 0, 0, 0 } },
        { "kicked", "{nick $0} has been kicked off channel {channel $1} by {nick $2} ($3)", 4, { 0, 0, 0, 0 } },
        { "killed_you", "You have been killed from the SILC Network by {nick $0} ($1)", 2, { 0, 0 } },
        { "killed", "{nick $0} has been killed from the SILC Network by {nick $1} ($2)", 3, { 0, 0, 0 } },
-       { "quieted", "You have been queited and cannot talk on {channel $0}", 1, { 0 } },
+       { "quieted", "You have been quieted and cannot talk on {channel $0}", 1, { 0 } },
+       { "appears", "{channick $0} now appears as {channick_hilight $1}", 4, { 0, 0, 0, 0 } },
+       { "pubmsg_hilight_signed", "{pubmsghinick_signed $0 $3 $1}$2", 4, { 0, 0, 0, 0 } },
+       { "pubmsg_hilight_unknown", "{pubmsghinick_unknown $0 $3 $1}$2", 4, { 0, 0, 0, 0 } },
+       { "pubmsg_hilight_failed", "{pubmsghinick_failed $0 $3 $1}$2", 4, { 0, 0, 0, 0 } },
+       { "pubmsg_me_signed", "{pubmsgmenick_signed $2 {menick $0}}$1", 3, { 0, 0, 0 } },
+       { "pubmsg_me_unknown", "{pubmsgmenick_unknown $2 {menick $0}}$1", 3, { 0, 0, 0 } },
+       { "pubmsg_me_failed", "{pubmsgmenick_failed $2 {menick $0}}$1", 3, { 0, 0, 0 } },
+       { "pubmsg_signed", "{pubmsgnick_signed $2 {pubnick $0}}$1", 3, { 0, 0, 0 } },
+       { "pubmsg_unknown", "{pubmsgnick_unknown $2 {pubnick $0}}$1", 3, { 0, 0, 0 } },
+       { "pubmsg_failed", "{pubmsgnick_failed $2 {pubnick $0}}$1", 3, { 0, 0, 0 } },
+       { "pubmsg_hilight_channel_signed", "{pubmsghinick_signed $0 $4 $1{msgchannel $2}}$3", 5, { 0, 0, 0, 0, 0 } },
+       { "pubmsg_hilight_channel_unknown", "{pubmsghinick_unknown $0 $4 $1{msgchannel $2}}$3", 5, { 0, 0, 0, 0, 0 } },
+       { "pubmsg_hilight_channel_failed", "{pubmsghinick_failed $0 $4 $1{msgchannel $2}}$3", 5, { 0, 0, 0, 0, 0 } },
+       { "pubmsg_me_channel_signed", "{pubmsgmenick_signed $3 {menick $0}{msgchannel $1}}$2", 4, { 0, 0, 0, 0 } },
+       { "pubmsg_me_channel_unknown", "{pubmsgmenick_unknown $3 {menick $0}{msgchannel $1}}$2", 4, { 0, 0, 0, 0 } },
+       { "pubmsg_me_channel_failed", "{pubmsgmenick_failed $3 {menick $0}{msgchannel $1}}$2", 4, { 0, 0, 0, 0 } },
+       { "pubmsg_channel_signed", "{pubmsgnick_signed $3 {pubnick $0}{msgchannel $1}}$2", 4, { 0, 0, 0, 0 } },
+       { "pubmsg_channel_unknown", "{pubmsgnick_unknown $3 {pubnick $0}{msgchannel $1}}$2", 4, { 0, 0, 0, 0 } },
+       { "pubmsg_channel_failed", "{pubmsgnick_failed $3 {pubnick $0}{msgchannel $1}}$2", 4, { 0, 0, 0, 0 } },
+       { "msg_private_signed", "{privmsg_signed $0 $1}$2", 3, { 0, 0, 0 } },
+       { "msg_private_unknown", "{privmsg_unknown $0 $1}$2", 3, { 0, 0, 0 } },
+       { "msg_private_failed", "{privmsg_failed $0 $1}$2", 3, { 0, 0, 0 } },
+       { "msg_private_query_signed", "{privmsgnick_signed $0}$2", 3, { 0, 0, 0 } },
+       { "msg_private_query_unknown", "{privmsgnick_unknown $0}$2", 3, { 0, 0, 0 } },
+       { "msg_private_query_failed", "{privmsgnick_failed $0}$2", 3, { 0, 0, 0 } },
+       { "own_msg_signed", "{ownmsgnick_signed $2 {ownnick $0}}$1", 3, { 0, 0, 0 } },
+       { "own_msg_channel_signed", "{ownmsgnick_signed $3 {ownnick $0}{msgchannel $1}}$2", 4, { 0, 0, 0, 0 } },
+       { "no_msgs_got", "You have not received a message from anyone yet", 0 },
+       { "no_msgs_sent", "You have not sent a message to anyone yet", 0 },
+       { "own_msg_private_signed", "{ownprivmsg_signed msg $0}$1", 2, { 0, 0 } },
+       { "own_msg_private_query_signed", "{ownprivmsgnick_signed {ownprivnick $2}}$1", 3, { 0, 0, 0 } },
+       { "channel_pk_list", "Channel {channel $0} Public Key List:", 1, { 0 } },
+       { "channel_pk_list_entry", "$0 - {channel $1}: $2 $3: Fingerprint (SHA1) {ban $4} (Babbleprint (SHA1) {ban $5})", 6, { 1, 0, 0, 0, 0, 0 } },
+       { "channel_pk_no_list", "No Channel Public Key List for {channel $0}", 1, { 0 } },
+       { "own_action", "{ownaction $0}$1", 3, { 0, 0, 0 } },
+       { "own_action_signed", "{ownaction {flag_signed}$0}$1", 3, { 0, 0, 0 } },
+       { "own_action_target", "{ownaction_target $0 $2}$1", 3, { 0, 0, 0 } },
+       { "own_action_target_signed", "{ownaction_target {flag_signed}$0 $2}$1", 3, { 0, 0, 0 } },
+       { "action_public", "{pubaction $0}$2", 3, { 0, 0, 0 } },
+       { "action_public_signed", "{pubaction {flag_signed}$0}$2", 3, { 0, 0, 0 } },
+       { "action_public_unknown", "{pubaction {flag_unknown}$0}$2", 3, { 0, 0, 0 } },
+       { "action_public_failed", "{pubaction {flag_failed}$0}$2", 3, { 0, 0, 0 } },
+       { "action_public_channel", "{pubaction $0{msgchannel $1}}$2", 3, { 0, 0, 0 } },
+       { "action_public_channel_signed", "{pubaction {flag_signed}$0{msgchannel $1}}$2", 3, { 0, 0, 0 } },
+       { "action_public_channel_unknown", "{pubaction {flag_unknown}$0{msgchannel $1}}$2", 3, { 0, 0, 0 } },
+       { "action_public_channel_failed", "{pubaction {flag_failed}$0{msgchannel $1}}$2", 3, { 0, 0, 0 } },
+       { "action_private", "{pvtaction $0}$2", 3, { 0, 0, 0 } },
+       { "action_private_signed", "{pvtaction {flag_signed}$0}$2", 3, { 0, 0, 0 } },
+       { "action_private_unknown", "{pvtaction {flag_unknown}$0}$2", 3, { 0, 0, 0 } },
+       { "action_private_failed", "{pvtaction {flag_failed}$0}$2", 3, { 0, 0, 0 } },
+       { "action_private_query", "{pvtaction_query $0}$2", 3, { 0, 0, 0 } },
+       { "action_private_query_signed", "{pvtaction_query {flag_signed}$0}$2", 3, { 0, 0, 0 } },
+       { "action_private_query_unknown", "{pvtaction_query {flag_unknown}$0}$2", 3, { 0, 0, 0 } },
+       { "action_private_query_failed", "{pvtaction_query {flag_failed}$0}$2", 3, { 0, 0, 0 } },
+       { "own_notice", "{ownnotice notice $0}$1", 2, { 0, 0 } },
+       { "own_notice_signed", "{ownnotice notice {flag_signed}$0}$1", 2, { 0, 0 } },
+       { "notice_public", "{notice $0{pubnotice_channel $1}}$2", 3, { 0, 0, 0 } },
+       { "notice_public_signed", "{notice {flag_signed}$0{pubnotice_channel $1}}$2", 3, { 0, 0, 0 } },
+       { "notice_public_unknown", "{notice {flag_unknown}$0{pubnotice_channel $1}}$2", 3, { 0, 0, 0 } },
+       { "notice_public_failed", "{notice {flag_failed}$0{pubnotice_channel $1}}$2", 3, { 0, 0, 0 } },
+       { "notice_private", "{notice $0{pvtnotice_host $1}}$2", 3, { 0, 0, 0 } },
+       { "notice_private_signed", "{notice {flag_signed}$0{pvtnotice_host $1}}$2", 3, { 0, 0, 0 } },
+       { "notice_private_unknown", "{notice {flag_unknown}$0{pvtnotice_host $1}}$2", 3, { 0, 0, 0 } },
+       { "notice_private_failed", "{notice {flag_failed}$0{pvtnotice_host $1}}$2", 3, { 0, 0, 0 } },
+       { "many", "There are now $0 {channick_hilight $1}s on this channel", 2, { 0, 0 } },
+       { "user_appears", "{channick_hilight $0} will appear as {channick_hilight $1}", 2, { 0, 0 } },
+
 
        /* WHOIS, WHOWAS and USERS (alias WHO) messages */
        { NULL, "Who Queries", 0 },
@@ -74,9 +138,9 @@ FORMAT_REC fecommon_silc_formats[] = {
        { "private_key_list_nick", "Private message keys with {nick $0}%:  Client                         Cipher         Key", 1, { 0 } },
        { "key_agreement", "Requesting key agreement with {nick $0}", 1, { 0 } },
        { "key_agreement_request", "{nick $0} wants to perform key agreement", 1, { 0 } },
-       { "key_agreement_request_host", "{nick $0} wants to perform key agreement on {nickhost $1} port {hilight $2}", 3, { 0, 0, 0 } },
+       { "key_agreement_request_host", "{nick $0} wants to perform key agreement on {nickhost $1} port {hilight $2} ($3)", 4, { 0, 0, 0, 0 } },
        { "key_agreement_negotiate", "Starting key agreement with {nick $0}", 1, { 0 } },
-       { "key_agreement_privmsg", "The private messages with {nick $0} are now protected with private key", 1, { 0 } },
+       { "key_agreement_privmsg", "Private messages with {nick $0} are now protected with private key", 1, { 0 } },
        { "key_agreement_ok", "Key agreement completed successfully with {nick $0}", 1, { 0 } },
        { "key_agreement_error", "Error occurred during key agreement with {nick $0}", 1, { 0 } },
        { "key_agreement_failure", "Key agreement failed with {nick $0}", 1, { 0 } },
@@ -85,6 +149,7 @@ FORMAT_REC fecommon_silc_formats[] = {
        { "key_agreement_started", "Key agreement is already started with {nick $0}", 1, { 0 } },
        { "key_agreement_denied", "Key agreement cannot be started with yourself", 0 },
        { "pubkey_received", "Received {hilight $0} public key", 1, { 0 } },
+       { "pubkey_received_client", "Client {hilight $0} ($1 $2)", 3, { 0, 0, 0 } },
        { "pubkey_fingerprint", "Fingerprint and babbleprint for the {hilight $0} key are %: $1", 2, { 0, 0 } },
        { "pubkey_babbleprint", " $0", 1, { 0 } },
        { "pubkey_unsupported", "We don't support {hilight $0} public key type {hilight $1}", 2, { 0, 0 } },
@@ -97,7 +162,8 @@ FORMAT_REC fecommon_silc_formats[] = {
        { "pubkey_maybe_expired", "It is possible that the key has expired or changed", 0 },
        { "pubkey_mitm_attack", "It is also possible that someone is performing a man-in-the-middle attack", 0 },
        { "pubkey_notkey", "Server did not return any public key", 0 },
-       { "pubkey_verified", "Verified successfully $0 {hilight $1}'s cached public key", 2, { 0, 0 } },
+       { "pubkey_verified", "Verified successfully server {hilight $0} cached public key", 1, { 0 } },
+       { "pubkey_verified_client", "Verified successfully user {hilight $0}'s ($1 $2) cached public key", 3, { 0, 0, 0 } },
        { "pubkey_notverified", "Could not verify $0 {hilight $1}'s public key", 2, { 0, 0 } },
 
        /* Misc messages */
@@ -129,6 +195,8 @@ FORMAT_REC fecommon_silc_formats[] = {
        { "watch_nick_change", "Watch: {nick $0} changed nickname to {nick $1}", 2, { 0, 0 } },
        { "message_data", "{nick $0} sent \"{hilight $1}\" data message: cannot display", 2, { 0, 0 } },
        { "stats", "$[25]0: {hilight $1}", 2, { 0, 0 } },
+       { "reattach", "Resuming old session on {hilight $0}, may take a while ...", 1, { 0 } },
+       { "reattach_failed", "Resuming session failed, you may want to remove {hilight $0} before the next connection attempt", 1, { 0 } },
 
        /* File transfer messages */
        { NULL, "FileTransfer", 0 },
@@ -144,7 +212,7 @@ FORMAT_REC fecommon_silc_formats[] = {
        { "file_na", "No file transfers available", 0 },
        { "file_client_na", "No file transfer offered by {nick $0}", 1, { 0 } },
        { "file_show_header", "File transfers", 0 },
-       { "file_show_line", "  $0 $1: $2kB of $3kB ($4%%) - $5kB/s - $6", 7, { 0, 0, 1, 1, 1, 3, 0 } },
+       { "file_show_line", "  $0 [$1] $2: $3kB of $4kB ($5%%) - $6kB/s - $7", 7, { 0, 1, 0, 1, 1, 1, 3, 0 } },
        { "file_already_started", "File transfer already started with {nick $0}", 1, { 0  } },
        { "file_error", "Error during file transfer with {nick $0}", 1, { 0 } },
        { "file_error_no_such_file", "Error during file transfer with {nick $0}: $1: No such file", 2, { 0, 0 } },
@@ -159,17 +227,17 @@ FORMAT_REC fecommon_silc_formats[] = {
        { "attr_allow",       " Sending allowed    : $0", 1, { 0 } },
        { "attr_vcard_file",  " Business card      : $0", 1, { 0 } },
        { "attr_services",    " Services used      : $0", 1, { 0 } },
-       { "attr_service",     " Service            : port [$0] address [$1] logged in [$2]", 3, { 0, 0, 0 } },
+       { "attr_service",     " Service            : port [$0] address [$1] logged in [$2] login time [$3] idle [$4]", 5, { 0, 0, 0, 0, 0 } },
        { "attr_status_mood", " User's mood        : $0", 1, { 0 } },
        { "attr_status_text", " User's message     : $0", 1, { 0 } },
        { "attr_status_message",      " User's message     : $0", 1, { 0 } },
        { "attr_status_message_file", " Message file       : $0", 1, { 0 } },
-       { "attr_preferred_language",  " Preferred langauge : $0", 1, { 0 } },
+       { "attr_preferred_language",  " Preferred language : $0", 1, { 0 } },
        { "attr_preferred_contact",   " Preferred contact  : $0", 1, { 0 } },
        { "attr_geolocation",    " Geolocation        : $0", 1, { 0 } },
        { "attr_device_info",    " Device Info        : $0", 1, { 0 } },
        { "attr_public_keys",    " Public keys        : $0", 1, { 0 } },
-       { "attr_timezone",       " Timezone           : $0", 1, { 0 } },
+       { "attr_timezone",       " Timezone (GMT)     : $0", 1, { 0 } },
        { "attr_timezone_allow", " Sending timezone   : $0", 1, { 0 } },
        { "attr_user_sign_verified",  " User's signature   : verified successfully", 0 },
        { "attr_user_sign_failed",    " User's signature   : {hilight signature failed}", 0 },
@@ -177,6 +245,55 @@ FORMAT_REC fecommon_silc_formats[] = {
        { "attr_server_sign_verified", " Server's signature : verified successfully", 0 },
        { "attr_server_sign_failed",   " Server's signature : {hilight signature failed}", 0 },
        { "attr_extension",            " Extension          : $0", 1, { 0 } },
+       { "attr_save", "Would you like to save the attributes (y/n)?", 0 },
+       { "attr_saved", "Requested Attributes located in {hilight $0}", 1, { 0 } },
+       /* Public Key Information */
+       { NULL, "Public Key Information", 0},
+
+        { "lstkey_file", "Public key file    : $0", 1, { 0 } },
+        { "lstkey_alg", "Algorithm          : $0", 1, { 0 } },
+        { "lstkey_ver", "Version            : $0", 1, { 0 } },
+        { "lstkey_bits", "Key length (bits)  : $0", 1, { 1 } },
+        { "lstkey_rn", "Real name          : $0", 1, { 0 } },
+        { "lstkey_un", "Username           : $0", 1, { 0 } },
+        { "lstkey_hn", "Hostname           : $0", 1, { 0 } },
+        { "lstkey_email", "Email              : $0", 1, { 0 } },
+        { "lstkey_org", "Organization       : $0", 1, { 0 } },
+        { "lstkey_c", "Country            : $0", 1, { 0 } },
+        { "lstkey_finger", "Fingerprint (SHA1) : $0", 1, { 0 } },
+        { "lstkey_babl", "Babbelprint (SHA1) : $0", 1, { 0 } },
+        { "lstkey_loadpub", "Could not load public key file `$0'", 1, { 0 } },
+       { "lstkey_list", "Stored {hilight $0} public keys:", 1, { 0 } },
+
+       /* Network */
+       { NULL, "Network", 0},
+
+       { "silcnet_added", "SILCNet $0 saved", 1, { 0 } },
+       { "silcnet_removed", "SILCNet $0 removed", 1, { 0 } },
+       { "silcnet_not_found", "SILCNet $0 not found", 1, { 0 } },
+       { "silcnet_header", "%#SILCNets:", 0 },
+       { "silcnet_line", "%#$0: $1", 2, { 0, 0 } },
+       { "silcnet_footer", "", 0 },
+
+#ifdef SILC_PLUGIN
+       /* command line option handling */
+       { NULL, "Command Line Option Handling", 0 },
+
+       { "config_debug", "Run-time debugging is {hilight $0}", 1, { 0 } },
+       { "config_nodebug", "Run-time debugging is {hilight disabled}. To enable it recompile the client with {hilight --enable-debug} configuration option.", 0 },
+       { "config_unknown", "Unknown option: $0", 1, { 0 } },
+       { "config_list", " - $0", 1, { 0 } },
+       { "config_algos", "Supported {hilight $0} algorithms:", 1, { 0 } },
+       { "config_nexttime", "{hilight NOTE:} You need to reload the plugin for these changes to take effect!", 0 },
+       { "config_pass_ask1", "Current Passphrase:", 0 },
+       { "config_pass_ask2", "New Passphrase:", 0 },
+       { "config_pass_ask3", "Retype new Passphrasse:", 0 },
+       { "config_passmismatch", "The passphrases do not match!", 0 },
+       { "config_passchange", "Changed the private key passphrase sucessfully", 0, { 0 } },
+       { "config_passchange_fail", "Failed to change the passphrase!", 0, { 0 } },
+       { "config_create", "Created a new key pair successfully", 0, { 0 } },
+       { "config_create_fail", "Failed to create a new key pair", 0, { 0 } },
+#endif
 
        { NULL, NULL, 0 }
 };