Skip to content

Commit

Permalink
irc: add "count" in hashtable returned by "irc_message_split"
Browse files Browse the repository at this point in the history
  • Loading branch information
flashcode committed Aug 26, 2011
1 parent d040fe1 commit 832a089
Show file tree
Hide file tree
Showing 16 changed files with 34 additions and 29 deletions.
2 changes: 1 addition & 1 deletion doc/de/autogen/plugin_api/infos_hashtable.txt
Expand Up @@ -4,6 +4,6 @@

| irc | irc_message_parse | Parse eine IRC Nachricht | "message": IRC Nachricht | "nick": nick, "host": host, "command": command, "channel": channel, "arguments": arguments (beinhaltet Channel)

| irc | irc_message_split | split an IRC message (to fit in 512 bytes) | "message": IRC message, "server": server name (optional) | "msg1" ... "msgN": messages to send (without final "\r\n"), "args1" ... "argsN": arguments of messages
| irc | irc_message_split | split an IRC message (to fit in 512 bytes) | "message": IRC message, "server": server name (optional) | "msg1" ... "msgN": messages to send (without final "\r\n"), "args1" ... "argsN": arguments of messages, "count": number of messages

|========================================
2 changes: 1 addition & 1 deletion doc/en/autogen/plugin_api/infos_hashtable.txt
Expand Up @@ -4,6 +4,6 @@

| irc | irc_message_parse | parse an IRC message | "message": IRC message | "nick": nick, "host": host, "command": command, "channel": channel, "arguments": arguments (includes channel)

| irc | irc_message_split | split an IRC message (to fit in 512 bytes) | "message": IRC message, "server": server name (optional) | "msg1" ... "msgN": messages to send (without final "\r\n"), "args1" ... "argsN": arguments of messages
| irc | irc_message_split | split an IRC message (to fit in 512 bytes) | "message": IRC message, "server": server name (optional) | "msg1" ... "msgN": messages to send (without final "\r\n"), "args1" ... "argsN": arguments of messages, "count": number of messages

|========================================
2 changes: 1 addition & 1 deletion doc/fr/autogen/plugin_api/infos_hashtable.txt
Expand Up @@ -4,6 +4,6 @@

| irc | irc_message_parse | analyse un message IRC | "message": message IRC | "nick": pseudo, "host": nom d'hôte, "command": commande, "channel": canal, "arguments": paramètres (inclut le canal)

| irc | irc_message_split | découper un message IRC (pour tenir dans les 512 octets) | "message": message IRC, "server": nom du serveur (optionnel) | "msg1" ... "msgN": messages à envoyer (sans le "\r\n" final), "args1" ... "argsN": paramètres des messages
| irc | irc_message_split | découper un message IRC (pour tenir dans les 512 octets) | "message": message IRC, "server": nom du serveur (optionnel) | "msg1" ... "msgN": messages à envoyer (sans le "\r\n" final), "args1" ... "argsN": paramètres des messages, "count": nombre de messages

|========================================
2 changes: 1 addition & 1 deletion doc/it/autogen/plugin_api/infos_hashtable.txt
Expand Up @@ -4,6 +4,6 @@

| irc | irc_message_parse | controlla un messaggio IRC | "messaggio": messaggio IRC | "nick": nick, "host": nome host, "command": comando, "channel": canale, "arguments": argomenti (include il canale)

| irc | irc_message_split | split an IRC message (to fit in 512 bytes) | "message": IRC message, "server": server name (optional) | "msg1" ... "msgN": messages to send (without final "\r\n"), "args1" ... "argsN": arguments of messages
| irc | irc_message_split | split an IRC message (to fit in 512 bytes) | "message": IRC message, "server": server name (optional) | "msg1" ... "msgN": messages to send (without final "\r\n"), "args1" ... "argsN": arguments of messages, "count": number of messages

|========================================
4 changes: 2 additions & 2 deletions po/cs.po
Expand Up @@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-08-26 10:17+0200\n"
"POT-Creation-Date: 2011-08-26 13:17+0200\n"
"PO-Revision-Date: 2011-07-05 15:37+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
Expand Down Expand Up @@ -5752,7 +5752,7 @@ msgstr ""
#. TRANSLATORS: please do not translate key names (enclosed by quotes)
msgid ""
"\"msg1\" ... \"msgN\": messages to send (without final \"\\r\\n\"), "
"\"args1\" ... \"argsN\": arguments of messages"
"\"args1\" ... \"argsN\": arguments of messages, \"count\": number of messages"
msgstr ""

msgid "list of IRC servers"
Expand Down
4 changes: 2 additions & 2 deletions po/de.po
Expand Up @@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-08-26 10:17+0200\n"
"POT-Creation-Date: 2011-08-26 13:17+0200\n"
"PO-Revision-Date: 2011-08-15 10:10+0100\n"
"Last-Translator: Nils Görs\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
Expand Down Expand Up @@ -6109,7 +6109,7 @@ msgstr ""
#. TRANSLATORS: please do not translate key names (enclosed by quotes)
msgid ""
"\"msg1\" ... \"msgN\": messages to send (without final \"\\r\\n\"), "
"\"args1\" ... \"argsN\": arguments of messages"
"\"args1\" ... \"argsN\": arguments of messages, \"count\": number of messages"
msgstr ""

msgid "list of IRC servers"
Expand Down
4 changes: 2 additions & 2 deletions po/es.po
Expand Up @@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-08-26 10:17+0200\n"
"POT-Creation-Date: 2011-08-26 13:17+0200\n"
"PO-Revision-Date: 2011-07-05 15:37+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
Expand Down Expand Up @@ -5849,7 +5849,7 @@ msgstr ""
#. TRANSLATORS: please do not translate key names (enclosed by quotes)
msgid ""
"\"msg1\" ... \"msgN\": messages to send (without final \"\\r\\n\"), "
"\"args1\" ... \"argsN\": arguments of messages"
"\"args1\" ... \"argsN\": arguments of messages, \"count\": number of messages"
msgstr ""

msgid "list of IRC servers"
Expand Down
9 changes: 5 additions & 4 deletions po/fr.po
Expand Up @@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-08-26 10:17+0200\n"
"PO-Revision-Date: 2011-08-26 10:08+0200\n"
"POT-Creation-Date: 2011-08-26 13:17+0200\n"
"PO-Revision-Date: 2011-08-26 13:17+0200\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: French\n"
Expand Down Expand Up @@ -5971,10 +5971,11 @@ msgstr "\"message\": message IRC, \"server\": nom du serveur (optionnel)"
#. TRANSLATORS: please do not translate key names (enclosed by quotes)
msgid ""
"\"msg1\" ... \"msgN\": messages to send (without final \"\\r\\n\"), "
"\"args1\" ... \"argsN\": arguments of messages"
"\"args1\" ... \"argsN\": arguments of messages, \"count\": number of messages"
msgstr ""
"\"msg1\" ... \"msgN\": messages à envoyer (sans le \"\\r\\n\" final), "
"\"args1\" ... \"argsN\": paramètres des messages"
"\"args1\" ... \"argsN\": paramètres des messages, \"count\": nombre de "
"messages"

msgid "list of IRC servers"
msgstr "liste des serveurs IRC"
Expand Down
4 changes: 2 additions & 2 deletions po/hu.po
Expand Up @@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-08-26 10:17+0200\n"
"POT-Creation-Date: 2011-08-26 13:17+0200\n"
"PO-Revision-Date: 2011-05-15 10:51+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
Expand Down Expand Up @@ -5355,7 +5355,7 @@ msgstr ""
#. TRANSLATORS: please do not translate key names (enclosed by quotes)
msgid ""
"\"msg1\" ... \"msgN\": messages to send (without final \"\\r\\n\"), "
"\"args1\" ... \"argsN\": arguments of messages"
"\"args1\" ... \"argsN\": arguments of messages, \"count\": number of messages"
msgstr ""

#, fuzzy
Expand Down
4 changes: 2 additions & 2 deletions po/it.po
Expand Up @@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-08-26 10:17+0200\n"
"POT-Creation-Date: 2011-08-26 13:17+0200\n"
"PO-Revision-Date: 2011-08-16 17:48+0200\n"
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
Expand Down Expand Up @@ -5925,7 +5925,7 @@ msgstr ""
#. TRANSLATORS: please do not translate key names (enclosed by quotes)
msgid ""
"\"msg1\" ... \"msgN\": messages to send (without final \"\\r\\n\"), "
"\"args1\" ... \"argsN\": arguments of messages"
"\"args1\" ... \"argsN\": arguments of messages, \"count\": number of messages"
msgstr ""

msgid "list of IRC servers"
Expand Down
4 changes: 2 additions & 2 deletions po/pl.po
Expand Up @@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-08-26 10:17+0200\n"
"POT-Creation-Date: 2011-08-26 13:17+0200\n"
"PO-Revision-Date: 2011-07-05 15:38+0200\n"
"Last-Translator: Krzysztof Koroscik <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
Expand Down Expand Up @@ -5806,7 +5806,7 @@ msgstr ""
#. TRANSLATORS: please do not translate key names (enclosed by quotes)
msgid ""
"\"msg1\" ... \"msgN\": messages to send (without final \"\\r\\n\"), "
"\"args1\" ... \"argsN\": arguments of messages"
"\"args1\" ... \"argsN\": arguments of messages, \"count\": number of messages"
msgstr ""

msgid "list of IRC servers"
Expand Down
4 changes: 2 additions & 2 deletions po/pt_BR.po
Expand Up @@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-08-26 10:17+0200\n"
"POT-Creation-Date: 2011-08-26 13:17+0200\n"
"PO-Revision-Date: 2011-05-15 10:52+0200\n"
"Last-Translator: Ivan Sichmann Freitas <ivansichfreitas@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
Expand Down Expand Up @@ -5236,7 +5236,7 @@ msgstr ""
#. TRANSLATORS: please do not translate key names (enclosed by quotes)
msgid ""
"\"msg1\" ... \"msgN\": messages to send (without final \"\\r\\n\"), "
"\"args1\" ... \"argsN\": arguments of messages"
"\"args1\" ... \"argsN\": arguments of messages, \"count\": number of messages"
msgstr ""

msgid "list of IRC servers"
Expand Down
4 changes: 2 additions & 2 deletions po/ru.po
Expand Up @@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-08-26 10:17+0200\n"
"POT-Creation-Date: 2011-08-26 13:17+0200\n"
"PO-Revision-Date: 2011-05-15 10:52+0200\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
Expand Down Expand Up @@ -5370,7 +5370,7 @@ msgstr ""
#. TRANSLATORS: please do not translate key names (enclosed by quotes)
msgid ""
"\"msg1\" ... \"msgN\": messages to send (without final \"\\r\\n\"), "
"\"args1\" ... \"argsN\": arguments of messages"
"\"args1\" ... \"argsN\": arguments of messages, \"count\": number of messages"
msgstr ""

#, fuzzy
Expand Down
4 changes: 2 additions & 2 deletions po/weechat.pot
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-08-26 10:17+0200\n"
"POT-Creation-Date: 2011-08-26 13:17+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -4607,7 +4607,7 @@ msgstr ""
#. TRANSLATORS: please do not translate key names (enclosed by quotes)
msgid ""
"\"msg1\" ... \"msgN\": messages to send (without final \"\\r\\n\"), "
"\"args1\" ... \"argsN\": arguments of messages"
"\"args1\" ... \"argsN\": arguments of messages, \"count\": number of messages"
msgstr ""

msgid "list of IRC servers"
Expand Down
4 changes: 3 additions & 1 deletion src/plugins/irc/irc-info.c
Expand Up @@ -618,7 +618,9 @@ irc_info_init ()
/* TRANSLATORS: please do not translate key names (enclosed by quotes) */
N_("\"msg1\" ... \"msgN\": messages to send "
"(without final \"\\r\\n\"), "
"\"args1\" ... \"argsN\": arguments of messages"),
"\"args1\" ... \"argsN\": arguments of "
"messages, "
"\"count\": number of messages"),
&irc_info_get_info_hashtable_cb, NULL);

/* infolist hooks */
Expand Down
6 changes: 4 additions & 2 deletions src/plugins/irc/irc-message.c
Expand Up @@ -347,8 +347,8 @@ void
irc_message_split_add (struct t_hashtable *hashtable, int number,
const char *message, const char *arguments)
{
char key[32];

char key[32], value[32];
if (message)
{
snprintf (key, sizeof (key), "msg%d", number);
Expand All @@ -372,6 +372,8 @@ irc_message_split_add (struct t_hashtable *hashtable, int number,
key, arguments);
}
}
snprintf (value, sizeof (value), "%d", number);
weechat_hashtable_set (hashtable, "count", value);
}

/*
Expand Down

0 comments on commit 832a089

Please sign in to comment.