summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2007-03-16 11:49:58 +0000
committerSebastien Helleu <flashcode@flashtux.org>2007-03-16 11:49:58 +0000
commitaa149dcfbc209a1addf40fdcfb826105d1940fbd (patch)
tree6bc2edc11c82d6b723fa3ed9f797a22543128ad2
parentImproved password hiding, code cleanup (bug #19229) (new commit after savannah crash) (diff)
downloadweechat-aa149dcfbc209a1addf40fdcfb826105d1940fbd.tar.xz
weechat-aa149dcfbc209a1addf40fdcfb826105d1940fbd.zip
Fixed /topic completion when no topic set on current channel (bug #19322)
-rw-r--r--ChangeLog3
-rw-r--r--src/common/completion.c8
-rw-r--r--src/irc/irc-commands.c2
-rw-r--r--weechat/ChangeLog3
-rw-r--r--weechat/src/common/completion.c8
-rw-r--r--weechat/src/irc/irc-commands.c2
6 files changed, 12 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 4c1de1f4f..9b0f046e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,11 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
-ChangeLog - 2007-03-12
+ChangeLog - 2007-03-16
Version 0.2.4 (under dev!):
+ * fixed /topic completion when no topic set on current channel (bug #19322)
* improved password hiding, code cleanup (bug #19229)
* added new return code in plugin API to force highlight (for message
handlers only)
diff --git a/src/common/completion.c b/src/common/completion.c
index 46ccdb7f8..ae1554677 100644
--- a/src/common/completion.c
+++ b/src/common/completion.c
@@ -671,11 +671,9 @@ completion_list_add_topic (t_completion *completion)
{
char *string;
- if (!completion->server || !completion->channel
- || !((t_irc_channel *)(completion->channel))->topic
- || !((t_irc_channel *)(completion->channel))->topic[0])
- completion_stop (completion);
- else
+ if (completion->server && completion->channel
+ && ((t_irc_channel *)(completion->channel))->topic
+ && ((t_irc_channel *)(completion->channel))->topic[0])
{
if (cfg_irc_colors_send)
string = (char *)gui_color_decode_for_user_entry ((unsigned char *)((t_irc_channel *)(completion->channel))->topic);
diff --git a/src/irc/irc-commands.c b/src/irc/irc-commands.c
index 30ad1e83c..51e9e542a 100644
--- a/src/irc/irc-commands.c
+++ b/src/irc/irc-commands.c
@@ -258,7 +258,7 @@ t_irc_command irc_commands[] =
N_("[channel] [topic]"),
N_("channel: channel name\ntopic: new topic for channel "
"(if topic is \"-delete\" then topic is deleted)"),
- "%t|-delete", 0, MAX_ARGS, 1, 1, NULL, irc_cmd_send_topic, irc_cmd_recv_topic },
+ "%t|-delete %-", 0, MAX_ARGS, 1, 1, NULL, irc_cmd_send_topic, irc_cmd_recv_topic },
{ "trace", N_("find the route to specific server"),
N_("[target]"),
N_("target: server"),
diff --git a/weechat/ChangeLog b/weechat/ChangeLog
index 4c1de1f4f..9b0f046e1 100644
--- a/weechat/ChangeLog
+++ b/weechat/ChangeLog
@@ -1,10 +1,11 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
-ChangeLog - 2007-03-12
+ChangeLog - 2007-03-16
Version 0.2.4 (under dev!):
+ * fixed /topic completion when no topic set on current channel (bug #19322)
* improved password hiding, code cleanup (bug #19229)
* added new return code in plugin API to force highlight (for message
handlers only)
diff --git a/weechat/src/common/completion.c b/weechat/src/common/completion.c
index 46ccdb7f8..ae1554677 100644
--- a/weechat/src/common/completion.c
+++ b/weechat/src/common/completion.c
@@ -671,11 +671,9 @@ completion_list_add_topic (t_completion *completion)
{
char *string;
- if (!completion->server || !completion->channel
- || !((t_irc_channel *)(completion->channel))->topic
- || !((t_irc_channel *)(completion->channel))->topic[0])
- completion_stop (completion);
- else
+ if (completion->server && completion->channel
+ && ((t_irc_channel *)(completion->channel))->topic
+ && ((t_irc_channel *)(completion->channel))->topic[0])
{
if (cfg_irc_colors_send)
string = (char *)gui_color_decode_for_user_entry ((unsigned char *)((t_irc_channel *)(completion->channel))->topic);
diff --git a/weechat/src/irc/irc-commands.c b/weechat/src/irc/irc-commands.c
index 30ad1e83c..51e9e542a 100644
--- a/weechat/src/irc/irc-commands.c
+++ b/weechat/src/irc/irc-commands.c
@@ -258,7 +258,7 @@ t_irc_command irc_commands[] =
N_("[channel] [topic]"),
N_("channel: channel name\ntopic: new topic for channel "
"(if topic is \"-delete\" then topic is deleted)"),
- "%t|-delete", 0, MAX_ARGS, 1, 1, NULL, irc_cmd_send_topic, irc_cmd_recv_topic },
+ "%t|-delete %-", 0, MAX_ARGS, 1, 1, NULL, irc_cmd_send_topic, irc_cmd_recv_topic },
{ "trace", N_("find the route to specific server"),
N_("[target]"),
N_("target: server"),