summaryrefslogtreecommitdiff
path: root/src/plugins/irc
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2021-10-16 10:06:28 +0200
committerSébastien Helleu <flashcode@flashtux.org>2021-10-17 21:28:31 +0200
commitb3ce8b52821dc738b6f3cb8175c4286cc59a7f58 (patch)
tree01a580bcea51c3fb3163dd89229591bc990dbae0 /src/plugins/irc
parent31b15c14231353c68c37ee398ff3e2c532b759ed (diff)
downloadweechat-b3ce8b52821dc738b6f3cb8175c4286cc59a7f58.zip
irc: use parsed command parameters in "329" command callback
Diffstat (limited to 'src/plugins/irc')
-rw-r--r--src/plugins/irc/irc-protocol.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index 653ae50e4..01d507408 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -4452,7 +4452,7 @@ IRC_PROTOCOL_CALLBACK(328)
* Callback for the IRC command "329": channel creation date.
*
* Command looks like:
- * :server 329 mynick #channel 1205327894
+ * 329 mynick #channel 1205327894
*/
IRC_PROTOCOL_CALLBACK(329)
@@ -4460,12 +4460,11 @@ IRC_PROTOCOL_CALLBACK(329)
struct t_irc_channel *ptr_channel;
time_t datetime;
- IRC_PROTOCOL_MIN_ARGS(5);
+ IRC_PROTOCOL_MIN_PARAMS(3);
- ptr_channel = irc_channel_search (server, argv[3]);
+ ptr_channel = irc_channel_search (server, params[1]);
- datetime = (time_t)(atol ((argv_eol[4][0] == ':') ?
- argv_eol[4] + 1 : argv_eol[4]));
+ datetime = (time_t)(atol (params[2]));
if (ptr_channel)
{
@@ -4494,7 +4493,7 @@ IRC_PROTOCOL_CALLBACK(329)
_("%sChannel %s%s%s created on %s"),
weechat_prefix ("network"),
IRC_COLOR_CHAT_CHANNEL,
- argv[3],
+ params[1],
IRC_COLOR_RESET,
weechat_util_get_time_string (&datetime));
}