projects
/
silc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4c166fb
)
Added support for detecting founder public key changing with
author
Pekka Riikonen
<priikone@silcnet.org>
Tue, 13 Nov 2007 16:39:02 +0000
(16:39 +0000)
committer
Pekka Riikonen
<priikone@silcnet.org>
Tue, 13 Nov 2007 16:39:02 +0000
(16:39 +0000)
CMODE command.
apps/irssi/CHANGES
patch
|
blob
|
history
apps/irssi/src/fe-common/silc/module-formats.c
patch
|
blob
|
history
apps/irssi/src/fe-common/silc/module-formats.h
patch
|
blob
|
history
apps/irssi/src/silc/core/client_ops.c
patch
|
blob
|
history
diff --git
a/apps/irssi/CHANGES
b/apps/irssi/CHANGES
index 5949f029137a35c738cb969251ea67d0e0519936..63270c8f8869c552a139ee078b520764aeafaa33 100644
(file)
--- a/
apps/irssi/CHANGES
+++ b/
apps/irssi/CHANGES
@@
-1,3
+1,8
@@
+Tue Nov 13 18:34:06 EET 2007 Pekka Riikonen <priikone@silcnet.org>
+
+ * Added support for detecting when channel founder public key
+ is changed with CMODE command (founder rights transfered).
+
Tue Jul 10 20:13:47 EEST 2007 Pekka Riikonen <priikone@silcnet.org>
* Added support for the new PKCS API.
Tue Jul 10 20:13:47 EEST 2007 Pekka Riikonen <priikone@silcnet.org>
* Added support for the new PKCS API.
diff --git
a/apps/irssi/src/fe-common/silc/module-formats.c
b/apps/irssi/src/fe-common/silc/module-formats.c
index 2859b9341096ce319788cd0d9cd8b4147e07ed0b..8ad3fcdd0483a4f96486d37f68e4c2a916198bf5 100644
(file)
--- a/
apps/irssi/src/fe-common/silc/module-formats.c
+++ b/
apps/irssi/src/fe-common/silc/module-formats.c
@@
-29,6
+29,7
@@
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_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 } },
{ "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 } },
diff --git
a/apps/irssi/src/fe-common/silc/module-formats.h
b/apps/irssi/src/fe-common/silc/module-formats.h
index 4fdae389e710e4b78671e6fb16cffad9a0915f91..408715be917b7b61ed48ecb9b6d507f462239185 100644
(file)
--- a/
apps/irssi/src/fe-common/silc/module-formats.h
+++ b/
apps/irssi/src/fe-common/silc/module-formats.h
@@
-26,6
+26,7
@@
enum {
SILCTXT_CHANNEL_FOUNDER_YOU,
SILCTXT_CHANNEL_FOUNDER,
SILCTXT_CHANNEL_FOUNDER_YOU,
SILCTXT_CHANNEL_FOUNDER,
+ SILCTXT_CHANNEL_FOUNDER_CHANGED,
SILCTXT_CHANNEL_TOPIC,
SILCTXT_CHANNEL_TOPIC_NOT_SET,
SILCTXT_CHANNEL_CMODE,
SILCTXT_CHANNEL_TOPIC,
SILCTXT_CHANNEL_TOPIC_NOT_SET,
SILCTXT_CHANNEL_CMODE,
diff --git
a/apps/irssi/src/silc/core/client_ops.c
b/apps/irssi/src/silc/core/client_ops.c
index 1045495340929d31e331d1e763fda0e038a93d4d..5da2cea29017314d1cdee99b6bd993928fe992be 100644
(file)
--- a/
apps/irssi/src/silc/core/client_ops.c
+++ b/
apps/irssi/src/silc/core/client_ops.c
@@
-2293,24
+2293,35
@@
void silc_command_reply(SilcClient client, SilcClientConnection conn,
{
SilcChannelEntry channel_entry;
SilcDList chpks;
{
SilcChannelEntry channel_entry;
SilcDList chpks;
+ SilcPublicKey founder_key;
channel_entry = va_arg(vp, SilcChannelEntry);
(void)va_arg(vp, SilcUInt32);
channel_entry = va_arg(vp, SilcChannelEntry);
(void)va_arg(vp, SilcUInt32);
-
(void)
va_arg(vp, SilcPublicKey);
+
founder_key =
va_arg(vp, SilcPublicKey);
chpks = va_arg(vp, SilcDList);
chpks = va_arg(vp, SilcDList);
- if (SILC_STATUS_IS_ERROR(status) || !c
mode_list_chpks
||
- !channel_entry
|| !channel_entry
->channel_name)
+ if (SILC_STATUS_IS_ERROR(status) || !c
hannel_entry
||
+ !channel_entry->channel_name)
return;
return;
- /*
Print the channel public key list
*/
- if (
chpks)
- silc_parse_channel_public_keys(server, channel_entry, chpks);
- else
+ /*
If founder was changed successfully, tell it to user
*/
+ if (
founder_key && channel_entry->founder_key &&
+ !silc_pkcs_public_key_compare(founder_key,
+ channel_entry->founder_key)) {
printformat_module("fe-common/silc", server, NULL,
printformat_module("fe-common/silc", server, NULL,
- MSGLEVEL_CRAP, SILCTXT_CHANNEL_PK_NO_LIST,
- channel_entry->channel_name);
+ MSGLEVEL_CRAP, SILCTXT_CHANNEL_FOUNDER_CHANGED,
+ channel_entry->channel_name);
+ }
+ /* Print the channel public key list */
+ if (cmode_list_chpks) {
+ if (chpks)
+ silc_parse_channel_public_keys(server, channel_entry, chpks);
+ else
+ printformat_module("fe-common/silc", server, NULL,
+ MSGLEVEL_CRAP, SILCTXT_CHANNEL_PK_NO_LIST,
+ channel_entry->channel_name);
+ }
}
break;
}
break;