relay: add backlog, options and server capability "server-time" for irc protocol (task #12076)
New options: - relay.irc.backlog_max_minutes - relay.irc.backlog_max_number - relay.irc.backlog_since_last_disconnect - relay.irc.backlog_tags - relay.irc.backlog_time_format
This commit is contained in:
parent
2e48874ce0
commit
cf76379aa9
@ -84,6 +84,10 @@ Version 0.4.0 (under dev!)
|
|||||||
* irc: fix crash when message 352 has too few arguments (bug #37513)
|
* irc: fix crash when message 352 has too few arguments (bug #37513)
|
||||||
* irc: remove unneeded server disconnect when server buffer is closed and server
|
* irc: remove unneeded server disconnect when server buffer is closed and server
|
||||||
is already disconnected
|
is already disconnected
|
||||||
|
* relay: add backlog and server capability "server-time" for irc protocol, add
|
||||||
|
new options relay.irc.backlog_max_minutes, relay.irc.backlog_max_number,
|
||||||
|
relay.irc.backlog_since_last_disconnect, relay.irc.backlog_tags,
|
||||||
|
relay.irc.backlog_time_format (task #12076)
|
||||||
* relay: fix crash after /upgrade when a client is connected
|
* relay: fix crash after /upgrade when a client is connected
|
||||||
* relay: add support of IPv6, new option relay.network.ipv6, add support of
|
* relay: add support of IPv6, new option relay.network.ipv6, add support of
|
||||||
"ipv4." and/or "ipv6." before protocol name, to force IPv4/IPv6 (task #12270)
|
"ipv4." and/or "ipv6." before protocol name, to force IPv4/IPv6 (task #12270)
|
||||||
|
@ -43,6 +43,31 @@
|
|||||||
** Typ: Farbe
|
** Typ: Farbe
|
||||||
** Werte: ein Farbname für WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), eine Terminal-Farbnummer oder ein Alias; Attribute können vor eine Farbe gesetzt werden (gilt ausschließlich für die Textfarbe und nicht für den Hintergrund): "*" für fett, "!" für invertiert, "_" für unterstrichen (Standardwert: `white`)
|
** Werte: ein Farbname für WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), eine Terminal-Farbnummer oder ein Alias; Attribute können vor eine Farbe gesetzt werden (gilt ausschließlich für die Textfarbe und nicht für den Hintergrund): "*" für fett, "!" für invertiert, "_" für unterstrichen (Standardwert: `white`)
|
||||||
|
|
||||||
|
* [[option_relay.irc.backlog_max_minutes]] *relay.irc.backlog_max_minutes*
|
||||||
|
** Beschreibung: `maximum number of minutes in backlog per IRC channel (0 = unlimited, examples: 1440 = one day, 10080 = one week, 43200 = one month, 525600 = one year)`
|
||||||
|
** Typ: integer
|
||||||
|
** Werte: 0 .. 2147483647 (Standardwert: `1440`)
|
||||||
|
|
||||||
|
* [[option_relay.irc.backlog_max_number]] *relay.irc.backlog_max_number*
|
||||||
|
** Beschreibung: `maximum number of lines in backlog per IRC channel (0 = unlimited)`
|
||||||
|
** Typ: integer
|
||||||
|
** Werte: 0 .. 2147483647 (Standardwert: `256`)
|
||||||
|
|
||||||
|
* [[option_relay.irc.backlog_since_last_disconnect]] *relay.irc.backlog_since_last_disconnect*
|
||||||
|
** Beschreibung: `display backlog starting from last client disconnect`
|
||||||
|
** Typ: boolesch
|
||||||
|
** Werte: on, off (Standardwert: `on`)
|
||||||
|
|
||||||
|
* [[option_relay.irc.backlog_tags]] *relay.irc.backlog_tags*
|
||||||
|
** Beschreibung: `tags of messages which are displayed in backlog per IRC channel (supported tags: "irc_join", "irc_part", "irc_quit", "irc_nick", "irc_privmsg"), "*" = all supported tags`
|
||||||
|
** Typ: Zeichenkette
|
||||||
|
** Werte: beliebige Zeichenkette (Standardwert: `"irc_privmsg"`)
|
||||||
|
|
||||||
|
* [[option_relay.irc.backlog_time_format]] *relay.irc.backlog_time_format*
|
||||||
|
** Beschreibung: `format for time in backlog messages (see man strftime for format) (not used if server capability "server-time" was enabled by client, because time is sent as irc tag); empty string = disable time in backlog messages`
|
||||||
|
** Typ: Zeichenkette
|
||||||
|
** Werte: beliebige Zeichenkette (Standardwert: `"[%H:%M] "`)
|
||||||
|
|
||||||
* [[option_relay.look.auto_open_buffer]] *relay.look.auto_open_buffer*
|
* [[option_relay.look.auto_open_buffer]] *relay.look.auto_open_buffer*
|
||||||
** Beschreibung: `öffnet automatisch einen Relay-Buffer, falls eine Verbindung zu einem neuen Client hergestellt wird`
|
** Beschreibung: `öffnet automatisch einen Relay-Buffer, falls eine Verbindung zu einem neuen Client hergestellt wird`
|
||||||
** Typ: boolesch
|
** Typ: boolesch
|
||||||
|
@ -43,6 +43,31 @@
|
|||||||
** type: color
|
** type: color
|
||||||
** values: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "_" for underline (default value: `white`)
|
** values: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "_" for underline (default value: `white`)
|
||||||
|
|
||||||
|
* [[option_relay.irc.backlog_max_minutes]] *relay.irc.backlog_max_minutes*
|
||||||
|
** description: `maximum number of minutes in backlog per IRC channel (0 = unlimited, examples: 1440 = one day, 10080 = one week, 43200 = one month, 525600 = one year)`
|
||||||
|
** type: integer
|
||||||
|
** values: 0 .. 2147483647 (default value: `1440`)
|
||||||
|
|
||||||
|
* [[option_relay.irc.backlog_max_number]] *relay.irc.backlog_max_number*
|
||||||
|
** description: `maximum number of lines in backlog per IRC channel (0 = unlimited)`
|
||||||
|
** type: integer
|
||||||
|
** values: 0 .. 2147483647 (default value: `256`)
|
||||||
|
|
||||||
|
* [[option_relay.irc.backlog_since_last_disconnect]] *relay.irc.backlog_since_last_disconnect*
|
||||||
|
** description: `display backlog starting from last client disconnect`
|
||||||
|
** type: boolean
|
||||||
|
** values: on, off (default value: `on`)
|
||||||
|
|
||||||
|
* [[option_relay.irc.backlog_tags]] *relay.irc.backlog_tags*
|
||||||
|
** description: `tags of messages which are displayed in backlog per IRC channel (supported tags: "irc_join", "irc_part", "irc_quit", "irc_nick", "irc_privmsg"), "*" = all supported tags`
|
||||||
|
** type: string
|
||||||
|
** values: any string (default value: `"irc_privmsg"`)
|
||||||
|
|
||||||
|
* [[option_relay.irc.backlog_time_format]] *relay.irc.backlog_time_format*
|
||||||
|
** description: `format for time in backlog messages (see man strftime for format) (not used if server capability "server-time" was enabled by client, because time is sent as irc tag); empty string = disable time in backlog messages`
|
||||||
|
** type: string
|
||||||
|
** values: any string (default value: `"[%H:%M] "`)
|
||||||
|
|
||||||
* [[option_relay.look.auto_open_buffer]] *relay.look.auto_open_buffer*
|
* [[option_relay.look.auto_open_buffer]] *relay.look.auto_open_buffer*
|
||||||
** description: `auto open relay buffer when a new client is connecting`
|
** description: `auto open relay buffer when a new client is connecting`
|
||||||
** type: boolean
|
** type: boolean
|
||||||
|
@ -43,6 +43,31 @@
|
|||||||
** type: couleur
|
** type: couleur
|
||||||
** valeurs: un nom de couleur WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numéro de couleur du terminal ou un alias; des attributs sont autorisés avant la couleur (seulement pour la couleur du texte, pas le fond) : "*" pour du gras, "!" pour la vidéo inverse, "_" pour du souligné (valeur par défaut: `white`)
|
** valeurs: un nom de couleur WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numéro de couleur du terminal ou un alias; des attributs sont autorisés avant la couleur (seulement pour la couleur du texte, pas le fond) : "*" pour du gras, "!" pour la vidéo inverse, "_" pour du souligné (valeur par défaut: `white`)
|
||||||
|
|
||||||
|
* [[option_relay.irc.backlog_max_minutes]] *relay.irc.backlog_max_minutes*
|
||||||
|
** description: `nombre maximum de minutes dans l'historique par canal IRC (0 = sans limite, exemples: 1440 = une journée, 10080 = une semaine, 43200 = un mois, 525600 = une année)`
|
||||||
|
** type: entier
|
||||||
|
** valeurs: 0 .. 2147483647 (valeur par défaut: `1440`)
|
||||||
|
|
||||||
|
* [[option_relay.irc.backlog_max_number]] *relay.irc.backlog_max_number*
|
||||||
|
** description: `nombre maximum de lignes dans l'historique par canal IRC (0 = sans limite)`
|
||||||
|
** type: entier
|
||||||
|
** valeurs: 0 .. 2147483647 (valeur par défaut: `256`)
|
||||||
|
|
||||||
|
* [[option_relay.irc.backlog_since_last_disconnect]] *relay.irc.backlog_since_last_disconnect*
|
||||||
|
** description: `afficher l'historique en démarrant à la dernière déconnexion du client`
|
||||||
|
** type: booléen
|
||||||
|
** valeurs: on, off (valeur par défaut: `on`)
|
||||||
|
|
||||||
|
* [[option_relay.irc.backlog_tags]] *relay.irc.backlog_tags*
|
||||||
|
** description: `étiquettes ("tags") des messages qui sont affichés dans l'historique par canal IRC (étiquettes supportées: "irc_join", "irc_part", "irc_quit", "irc_nick", "irc_privmsg"), "*" = toutes les étiquettes supportées`
|
||||||
|
** type: chaîne
|
||||||
|
** valeurs: toute chaîne (valeur par défaut: `"irc_privmsg"`)
|
||||||
|
|
||||||
|
* [[option_relay.irc.backlog_time_format]] *relay.irc.backlog_time_format*
|
||||||
|
** description: `format pour l'heure dans les messages d'historique (voir man strftime pour le format) (non utilisé si la capacité de serveur "server-time" a été activée par le client, car l'heure est envoyée sous forme d'étiquette irc); chaîne vide = désactiver l'heure dans les messages d'historique`
|
||||||
|
** type: chaîne
|
||||||
|
** valeurs: toute chaîne (valeur par défaut: `"[%H:%M] "`)
|
||||||
|
|
||||||
* [[option_relay.look.auto_open_buffer]] *relay.look.auto_open_buffer*
|
* [[option_relay.look.auto_open_buffer]] *relay.look.auto_open_buffer*
|
||||||
** description: `ouvrir automatiquement le tampon des clients pour le relai lorsqu'un nouveau client est ajouté à la liste`
|
** description: `ouvrir automatiquement le tampon des clients pour le relai lorsqu'un nouveau client est ajouté à la liste`
|
||||||
** type: booléen
|
** type: booléen
|
||||||
|
@ -43,6 +43,31 @@
|
|||||||
** tipo: colore
|
** tipo: colore
|
||||||
** valori: un nome colore di WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numero colore del terminale o un alias; attributi consentiti prima del colore (solo per il colore del testo, non lo sfondo): "*" per il grassetto, "!" per l'inverso, "_" per la sottolineatura (valore predefinito: `white`)
|
** valori: un nome colore di WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numero colore del terminale o un alias; attributi consentiti prima del colore (solo per il colore del testo, non lo sfondo): "*" per il grassetto, "!" per l'inverso, "_" per la sottolineatura (valore predefinito: `white`)
|
||||||
|
|
||||||
|
* [[option_relay.irc.backlog_max_minutes]] *relay.irc.backlog_max_minutes*
|
||||||
|
** descrizione: `maximum number of minutes in backlog per IRC channel (0 = unlimited, examples: 1440 = one day, 10080 = one week, 43200 = one month, 525600 = one year)`
|
||||||
|
** tipo: intero
|
||||||
|
** valori: 0 .. 2147483647 (valore predefinito: `1440`)
|
||||||
|
|
||||||
|
* [[option_relay.irc.backlog_max_number]] *relay.irc.backlog_max_number*
|
||||||
|
** descrizione: `maximum number of lines in backlog per IRC channel (0 = unlimited)`
|
||||||
|
** tipo: intero
|
||||||
|
** valori: 0 .. 2147483647 (valore predefinito: `256`)
|
||||||
|
|
||||||
|
* [[option_relay.irc.backlog_since_last_disconnect]] *relay.irc.backlog_since_last_disconnect*
|
||||||
|
** descrizione: `display backlog starting from last client disconnect`
|
||||||
|
** tipo: bool
|
||||||
|
** valori: on, off (valore predefinito: `on`)
|
||||||
|
|
||||||
|
* [[option_relay.irc.backlog_tags]] *relay.irc.backlog_tags*
|
||||||
|
** descrizione: `tags of messages which are displayed in backlog per IRC channel (supported tags: "irc_join", "irc_part", "irc_quit", "irc_nick", "irc_privmsg"), "*" = all supported tags`
|
||||||
|
** tipo: stringa
|
||||||
|
** valori: qualsiasi stringa (valore predefinito: `"irc_privmsg"`)
|
||||||
|
|
||||||
|
* [[option_relay.irc.backlog_time_format]] *relay.irc.backlog_time_format*
|
||||||
|
** descrizione: `format for time in backlog messages (see man strftime for format) (not used if server capability "server-time" was enabled by client, because time is sent as irc tag); empty string = disable time in backlog messages`
|
||||||
|
** tipo: stringa
|
||||||
|
** valori: qualsiasi stringa (valore predefinito: `"[%H:%M] "`)
|
||||||
|
|
||||||
* [[option_relay.look.auto_open_buffer]] *relay.look.auto_open_buffer*
|
* [[option_relay.look.auto_open_buffer]] *relay.look.auto_open_buffer*
|
||||||
** descrizione: `apre automaticamente il buffer relay alla connessione di un nuovo client`
|
** descrizione: `apre automaticamente il buffer relay alla connessione di un nuovo client`
|
||||||
** tipo: bool
|
** tipo: bool
|
||||||
|
@ -43,6 +43,31 @@
|
|||||||
** タイプ: 色
|
** タイプ: 色
|
||||||
** 値: WeeChat の色名 (default、black、(dark)gray、white、(light)red、(light)green、brown、yellow、(light)blue、(light)magenta、(light)cyan) 、ターミナル色番号またはその別名; 色の前に属性を置くことができます (テキスト前景色のみ、背景色は出来ません): 太字は "*"、反転は "!"、下線は "_"。 (デフォルト値: `white`)
|
** 値: WeeChat の色名 (default、black、(dark)gray、white、(light)red、(light)green、brown、yellow、(light)blue、(light)magenta、(light)cyan) 、ターミナル色番号またはその別名; 色の前に属性を置くことができます (テキスト前景色のみ、背景色は出来ません): 太字は "*"、反転は "!"、下線は "_"。 (デフォルト値: `white`)
|
||||||
|
|
||||||
|
* [[option_relay.irc.backlog_max_minutes]] *relay.irc.backlog_max_minutes*
|
||||||
|
** 説明: `maximum number of minutes in backlog per IRC channel (0 = unlimited, examples: 1440 = one day, 10080 = one week, 43200 = one month, 525600 = one year)`
|
||||||
|
** タイプ: 整数
|
||||||
|
** 値: 0 .. 2147483647 (デフォルト値: `1440`)
|
||||||
|
|
||||||
|
* [[option_relay.irc.backlog_max_number]] *relay.irc.backlog_max_number*
|
||||||
|
** 説明: `maximum number of lines in backlog per IRC channel (0 = unlimited)`
|
||||||
|
** タイプ: 整数
|
||||||
|
** 値: 0 .. 2147483647 (デフォルト値: `256`)
|
||||||
|
|
||||||
|
* [[option_relay.irc.backlog_since_last_disconnect]] *relay.irc.backlog_since_last_disconnect*
|
||||||
|
** 説明: `display backlog starting from last client disconnect`
|
||||||
|
** タイプ: ブール
|
||||||
|
** 値: on, off (デフォルト値: `on`)
|
||||||
|
|
||||||
|
* [[option_relay.irc.backlog_tags]] *relay.irc.backlog_tags*
|
||||||
|
** 説明: `tags of messages which are displayed in backlog per IRC channel (supported tags: "irc_join", "irc_part", "irc_quit", "irc_nick", "irc_privmsg"), "*" = all supported tags`
|
||||||
|
** タイプ: 文字列
|
||||||
|
** 値: 未制約文字列 (デフォルト値: `"irc_privmsg"`)
|
||||||
|
|
||||||
|
* [[option_relay.irc.backlog_time_format]] *relay.irc.backlog_time_format*
|
||||||
|
** 説明: `format for time in backlog messages (see man strftime for format) (not used if server capability "server-time" was enabled by client, because time is sent as irc tag); empty string = disable time in backlog messages`
|
||||||
|
** タイプ: 文字列
|
||||||
|
** 値: 未制約文字列 (デフォルト値: `"[%H:%M] "`)
|
||||||
|
|
||||||
* [[option_relay.look.auto_open_buffer]] *relay.look.auto_open_buffer*
|
* [[option_relay.look.auto_open_buffer]] *relay.look.auto_open_buffer*
|
||||||
** 説明: `新しいクライアントが接続したらリレーバッファを自動的に開く`
|
** 説明: `新しいクライアントが接続したらリレーバッファを自動的に開く`
|
||||||
** タイプ: ブール
|
** タイプ: ブール
|
||||||
|
28
po/cs.po
28
po/cs.po
@ -20,7 +20,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: WeeChat 0.4.0-dev\n"
|
"Project-Id-Version: WeeChat 0.4.0-dev\n"
|
||||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||||
"POT-Creation-Date: 2012-12-20 17:20+0100\n"
|
"POT-Creation-Date: 2012-12-24 16:46+0100\n"
|
||||||
"PO-Revision-Date: 2012-12-20 18:04+0100\n"
|
"PO-Revision-Date: 2012-12-20 18:04+0100\n"
|
||||||
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
|
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
|
||||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||||
@ -7922,6 +7922,32 @@ msgid ""
|
|||||||
"file with SSL certificate and private key (for serving clients with SSL)"
|
"file with SSL certificate and private key (for serving clients with SSL)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid "maximum number of lines in backlog per IRC channel (0 = unlimited)"
|
||||||
|
msgstr "maximální počet řádků v historii bufferu (0 = nekonečně)"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid ""
|
||||||
|
"maximum number of minutes in backlog per IRC channel (0 = unlimited, "
|
||||||
|
"examples: 1440 = one day, 10080 = one week, 43200 = one month, 525600 = one "
|
||||||
|
"year)"
|
||||||
|
msgstr "maximální počet řádků v historii bufferu (0 = nekonečně)"
|
||||||
|
|
||||||
|
msgid "display backlog starting from last client disconnect"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"tags of messages which are displayed in backlog per IRC channel (supported "
|
||||||
|
"tags: \"irc_join\", \"irc_part\", \"irc_quit\", \"irc_nick\", \"irc_privmsg"
|
||||||
|
"\"), \"*\" = all supported tags"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"format for time in backlog messages (see man strftime for format) (not used "
|
||||||
|
"if server capability \"server-time\" was enabled by client, because time is "
|
||||||
|
"sent as irc tag); empty string = disable time in backlog messages"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "list of relay clients"
|
msgid "list of relay clients"
|
||||||
msgstr "seznam klientů přesměrování"
|
msgstr "seznam klientů přesměrování"
|
||||||
|
|
||||||
|
33
po/de.po
33
po/de.po
@ -23,7 +23,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: WeeChat 0.3.7-dev\n"
|
"Project-Id-Version: WeeChat 0.3.7-dev\n"
|
||||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||||
"POT-Creation-Date: 2012-12-20 17:20+0100\n"
|
"POT-Creation-Date: 2012-12-24 16:46+0100\n"
|
||||||
"PO-Revision-Date: 2012-12-20 18:04+0100\n"
|
"PO-Revision-Date: 2012-12-20 18:04+0100\n"
|
||||||
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
|
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
|
||||||
"Language-Team: German <weechatter@arcor.de>\n"
|
"Language-Team: German <weechatter@arcor.de>\n"
|
||||||
@ -8617,6 +8617,37 @@ msgstr ""
|
|||||||
"Datei mit SSL Zertifikat und privatem Schlüssel (zur Nutzung von Clients mit "
|
"Datei mit SSL Zertifikat und privatem Schlüssel (zur Nutzung von Clients mit "
|
||||||
"SSL)"
|
"SSL)"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid "maximum number of lines in backlog per IRC channel (0 = unlimited)"
|
||||||
|
msgstr ""
|
||||||
|
"maximale Anzahl an Zeilen im Verlaufsspeicher. Dies gilt pro Buffer (0: "
|
||||||
|
"keine Zeilenbegrenzung)"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid ""
|
||||||
|
"maximum number of minutes in backlog per IRC channel (0 = unlimited, "
|
||||||
|
"examples: 1440 = one day, 10080 = one week, 43200 = one month, 525600 = one "
|
||||||
|
"year)"
|
||||||
|
msgstr ""
|
||||||
|
"maximale Anzahl, in Minuten, wie Lange die Zeilen im Verlaufsspeicher, pro "
|
||||||
|
"Buffer, gehalten werden sollen (0 = unbegrenzt, Beispiele: 1440 = einen Tag, "
|
||||||
|
"10080 = eine Woche, 43200 = einen Monat, 525600 = ein Jahr)"
|
||||||
|
|
||||||
|
msgid "display backlog starting from last client disconnect"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"tags of messages which are displayed in backlog per IRC channel (supported "
|
||||||
|
"tags: \"irc_join\", \"irc_part\", \"irc_quit\", \"irc_nick\", \"irc_privmsg"
|
||||||
|
"\"), \"*\" = all supported tags"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"format for time in backlog messages (see man strftime for format) (not used "
|
||||||
|
"if server capability \"server-time\" was enabled by client, because time is "
|
||||||
|
"sent as irc tag); empty string = disable time in backlog messages"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "list of relay clients"
|
msgid "list of relay clients"
|
||||||
msgstr "Liste der Relay-Clients"
|
msgstr "Liste der Relay-Clients"
|
||||||
|
|
||||||
|
30
po/es.po
30
po/es.po
@ -22,7 +22,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: WeeChat 0.4.0-dev\n"
|
"Project-Id-Version: WeeChat 0.4.0-dev\n"
|
||||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||||
"POT-Creation-Date: 2012-12-20 17:20+0100\n"
|
"POT-Creation-Date: 2012-12-24 16:46+0100\n"
|
||||||
"PO-Revision-Date: 2012-12-20 18:04+0100\n"
|
"PO-Revision-Date: 2012-12-20 18:04+0100\n"
|
||||||
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
|
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
|
||||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||||
@ -8192,6 +8192,34 @@ msgid ""
|
|||||||
"file with SSL certificate and private key (for serving clients with SSL)"
|
"file with SSL certificate and private key (for serving clients with SSL)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid "maximum number of lines in backlog per IRC channel (0 = unlimited)"
|
||||||
|
msgstr "número máximo de líneas para cada buffer (0 = ilimitado)"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid ""
|
||||||
|
"maximum number of minutes in backlog per IRC channel (0 = unlimited, "
|
||||||
|
"examples: 1440 = one day, 10080 = one week, 43200 = one month, 525600 = one "
|
||||||
|
"year)"
|
||||||
|
msgstr ""
|
||||||
|
"número máximo de minutos en el historial por buffer (0 = ilimitado, "
|
||||||
|
"ejemplos: 1440 = un día, 10080 = una semana, 43200 = un mes, 525600 = un año)"
|
||||||
|
|
||||||
|
msgid "display backlog starting from last client disconnect"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"tags of messages which are displayed in backlog per IRC channel (supported "
|
||||||
|
"tags: \"irc_join\", \"irc_part\", \"irc_quit\", \"irc_nick\", \"irc_privmsg"
|
||||||
|
"\"), \"*\" = all supported tags"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"format for time in backlog messages (see man strftime for format) (not used "
|
||||||
|
"if server capability \"server-time\" was enabled by client, because time is "
|
||||||
|
"sent as irc tag); empty string = disable time in backlog messages"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "list of relay clients"
|
msgid "list of relay clients"
|
||||||
msgstr "Lista de clientes en el repetidor"
|
msgstr "Lista de clientes en el repetidor"
|
||||||
|
|
||||||
|
39
po/fr.po
39
po/fr.po
@ -21,8 +21,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: WeeChat 0.4.0-dev\n"
|
"Project-Id-Version: WeeChat 0.4.0-dev\n"
|
||||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||||
"POT-Creation-Date: 2012-12-20 17:20+0100\n"
|
"POT-Creation-Date: 2012-12-24 16:46+0100\n"
|
||||||
"PO-Revision-Date: 2012-12-20 18:04+0100\n"
|
"PO-Revision-Date: 2012-12-24 16:27+0100\n"
|
||||||
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
|
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
|
||||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||||
"Language: French\n"
|
"Language: French\n"
|
||||||
@ -8402,6 +8402,41 @@ msgstr ""
|
|||||||
"fichier avec le certificat et la clé privée SSL (pour servir les clients "
|
"fichier avec le certificat et la clé privée SSL (pour servir les clients "
|
||||||
"avec SSL)"
|
"avec SSL)"
|
||||||
|
|
||||||
|
msgid "maximum number of lines in backlog per IRC channel (0 = unlimited)"
|
||||||
|
msgstr ""
|
||||||
|
"nombre maximum de lignes dans l'historique par canal IRC (0 = sans limite)"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"maximum number of minutes in backlog per IRC channel (0 = unlimited, "
|
||||||
|
"examples: 1440 = one day, 10080 = one week, 43200 = one month, 525600 = one "
|
||||||
|
"year)"
|
||||||
|
msgstr ""
|
||||||
|
"nombre maximum de minutes dans l'historique par canal IRC (0 = sans limite, "
|
||||||
|
"exemples: 1440 = une journée, 10080 = une semaine, 43200 = un mois, 525600 = "
|
||||||
|
"une année)"
|
||||||
|
|
||||||
|
msgid "display backlog starting from last client disconnect"
|
||||||
|
msgstr "afficher l'historique en démarrant à la dernière déconnexion du client"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"tags of messages which are displayed in backlog per IRC channel (supported "
|
||||||
|
"tags: \"irc_join\", \"irc_part\", \"irc_quit\", \"irc_nick\", \"irc_privmsg"
|
||||||
|
"\"), \"*\" = all supported tags"
|
||||||
|
msgstr ""
|
||||||
|
"étiquettes (\"tags\") des messages qui sont affichés dans l'historique par "
|
||||||
|
"canal IRC (étiquettes supportées: \"irc_join\", \"irc_part\", \"irc_quit\", "
|
||||||
|
"\"irc_nick\", \"irc_privmsg\"), \"*\" = toutes les étiquettes supportées"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"format for time in backlog messages (see man strftime for format) (not used "
|
||||||
|
"if server capability \"server-time\" was enabled by client, because time is "
|
||||||
|
"sent as irc tag); empty string = disable time in backlog messages"
|
||||||
|
msgstr ""
|
||||||
|
"format pour l'heure dans les messages d'historique (voir man strftime pour "
|
||||||
|
"le format) (non utilisé si la capacité de serveur \"server-time\" a été "
|
||||||
|
"activée par le client, car l'heure est envoyée sous forme d'étiquette irc); "
|
||||||
|
"chaîne vide = désactiver l'heure dans les messages d'historique"
|
||||||
|
|
||||||
msgid "list of relay clients"
|
msgid "list of relay clients"
|
||||||
msgstr "liste des clients pour le relai"
|
msgstr "liste des clients pour le relai"
|
||||||
|
|
||||||
|
30
po/hu.po
30
po/hu.po
@ -20,7 +20,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: WeeChat 0.4.0-dev\n"
|
"Project-Id-Version: WeeChat 0.4.0-dev\n"
|
||||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||||
"POT-Creation-Date: 2012-12-20 17:20+0100\n"
|
"POT-Creation-Date: 2012-12-24 16:46+0100\n"
|
||||||
"PO-Revision-Date: 2012-12-20 18:04+0100\n"
|
"PO-Revision-Date: 2012-12-20 18:04+0100\n"
|
||||||
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
|
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
|
||||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||||
@ -7404,6 +7404,34 @@ msgid ""
|
|||||||
"file with SSL certificate and private key (for serving clients with SSL)"
|
"file with SSL certificate and private key (for serving clients with SSL)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid "maximum number of lines in backlog per IRC channel (0 = unlimited)"
|
||||||
|
msgstr ""
|
||||||
|
"felhasználói parancsok maximális száma az előzményekben (0 = korlátlan)"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid ""
|
||||||
|
"maximum number of minutes in backlog per IRC channel (0 = unlimited, "
|
||||||
|
"examples: 1440 = one day, 10080 = one week, 43200 = one month, 525600 = one "
|
||||||
|
"year)"
|
||||||
|
msgstr ""
|
||||||
|
"felhasználói parancsok maximális száma az előzményekben (0 = korlátlan)"
|
||||||
|
|
||||||
|
msgid "display backlog starting from last client disconnect"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"tags of messages which are displayed in backlog per IRC channel (supported "
|
||||||
|
"tags: \"irc_join\", \"irc_part\", \"irc_quit\", \"irc_nick\", \"irc_privmsg"
|
||||||
|
"\"), \"*\" = all supported tags"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"format for time in backlog messages (see man strftime for format) (not used "
|
||||||
|
"if server capability \"server-time\" was enabled by client, because time is "
|
||||||
|
"sent as irc tag); empty string = disable time in backlog messages"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid "list of relay clients"
|
msgid "list of relay clients"
|
||||||
msgstr "Aliaszok listája:\n"
|
msgstr "Aliaszok listája:\n"
|
||||||
|
32
po/it.po
32
po/it.po
@ -20,7 +20,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: WeeChat 0.4.0-dev\n"
|
"Project-Id-Version: WeeChat 0.4.0-dev\n"
|
||||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||||
"POT-Creation-Date: 2012-12-20 17:20+0100\n"
|
"POT-Creation-Date: 2012-12-24 16:46+0100\n"
|
||||||
"PO-Revision-Date: 2012-12-20 18:04+0100\n"
|
"PO-Revision-Date: 2012-12-20 18:04+0100\n"
|
||||||
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
|
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
|
||||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||||
@ -8184,6 +8184,36 @@ msgstr ""
|
|||||||
"file con il certificato SSL e la chiave privata (per servire i client con "
|
"file con il certificato SSL e la chiave privata (per servire i client con "
|
||||||
"SSL)"
|
"SSL)"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid "maximum number of lines in backlog per IRC channel (0 = unlimited)"
|
||||||
|
msgstr ""
|
||||||
|
"numero massimo di righe nella cronologia per buffer (0 = nessun limite)"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid ""
|
||||||
|
"maximum number of minutes in backlog per IRC channel (0 = unlimited, "
|
||||||
|
"examples: 1440 = one day, 10080 = one week, 43200 = one month, 525600 = one "
|
||||||
|
"year)"
|
||||||
|
msgstr ""
|
||||||
|
"numero massimo di minuti nella cronologia per buffer (0 = nessun limite, "
|
||||||
|
"esempi: 1440 = un giorno, 10000 = una settimana; 43200 = un mese, 525600 = "
|
||||||
|
"un anno)"
|
||||||
|
|
||||||
|
msgid "display backlog starting from last client disconnect"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"tags of messages which are displayed in backlog per IRC channel (supported "
|
||||||
|
"tags: \"irc_join\", \"irc_part\", \"irc_quit\", \"irc_nick\", \"irc_privmsg"
|
||||||
|
"\"), \"*\" = all supported tags"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"format for time in backlog messages (see man strftime for format) (not used "
|
||||||
|
"if server capability \"server-time\" was enabled by client, because time is "
|
||||||
|
"sent as irc tag); empty string = disable time in backlog messages"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "list of relay clients"
|
msgid "list of relay clients"
|
||||||
msgstr "elenco di client relay"
|
msgstr "elenco di client relay"
|
||||||
|
|
||||||
|
30
po/ja.po
30
po/ja.po
@ -20,7 +20,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: WeeChat 0.4.0-dev\n"
|
"Project-Id-Version: WeeChat 0.4.0-dev\n"
|
||||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||||
"POT-Creation-Date: 2012-12-20 17:20+0100\n"
|
"POT-Creation-Date: 2012-12-24 16:46+0100\n"
|
||||||
"PO-Revision-Date: 2012-12-20 18:04+0100\n"
|
"PO-Revision-Date: 2012-12-20 18:04+0100\n"
|
||||||
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
|
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
|
||||||
"Language-Team: Japanese <https://github.com/l/WeeChat>\n"
|
"Language-Team: Japanese <https://github.com/l/WeeChat>\n"
|
||||||
@ -7999,6 +7999,34 @@ msgid ""
|
|||||||
"file with SSL certificate and private key (for serving clients with SSL)"
|
"file with SSL certificate and private key (for serving clients with SSL)"
|
||||||
msgstr "SSL 証明書と秘密鍵のファイル (SSL 接続を利用するクライアント用)"
|
msgstr "SSL 証明書と秘密鍵のファイル (SSL 接続を利用するクライアント用)"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid "maximum number of lines in backlog per IRC channel (0 = unlimited)"
|
||||||
|
msgstr "バッファ毎の履歴行数 (0 = 制限無し)"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid ""
|
||||||
|
"maximum number of minutes in backlog per IRC channel (0 = unlimited, "
|
||||||
|
"examples: 1440 = one day, 10080 = one week, 43200 = one month, 525600 = one "
|
||||||
|
"year)"
|
||||||
|
msgstr ""
|
||||||
|
"バッファ毎の履歴の保存時間 (分) (0 = 制限無し、例: 1440 = 一日、10080 = 一週"
|
||||||
|
"間、43200 = 一ヶ月、525600 = 一年間)"
|
||||||
|
|
||||||
|
msgid "display backlog starting from last client disconnect"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"tags of messages which are displayed in backlog per IRC channel (supported "
|
||||||
|
"tags: \"irc_join\", \"irc_part\", \"irc_quit\", \"irc_nick\", \"irc_privmsg"
|
||||||
|
"\"), \"*\" = all supported tags"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"format for time in backlog messages (see man strftime for format) (not used "
|
||||||
|
"if server capability \"server-time\" was enabled by client, because time is "
|
||||||
|
"sent as irc tag); empty string = disable time in backlog messages"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "list of relay clients"
|
msgid "list of relay clients"
|
||||||
msgstr "リレークライアントのリスト"
|
msgstr "リレークライアントのリスト"
|
||||||
|
|
||||||
|
30
po/pl.po
30
po/pl.po
@ -21,7 +21,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: WeeChat 0.4.0-dev\n"
|
"Project-Id-Version: WeeChat 0.4.0-dev\n"
|
||||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||||
"POT-Creation-Date: 2012-12-20 17:20+0100\n"
|
"POT-Creation-Date: 2012-12-24 16:46+0100\n"
|
||||||
"PO-Revision-Date: 2012-12-20 18:04+0100\n"
|
"PO-Revision-Date: 2012-12-20 18:04+0100\n"
|
||||||
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
|
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
|
||||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||||
@ -8123,6 +8123,34 @@ msgid ""
|
|||||||
"file with SSL certificate and private key (for serving clients with SSL)"
|
"file with SSL certificate and private key (for serving clients with SSL)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid "maximum number of lines in backlog per IRC channel (0 = unlimited)"
|
||||||
|
msgstr "maksymalna ilość linii w historii każdego bufora (0 = bez ograniczeń)"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid ""
|
||||||
|
"maximum number of minutes in backlog per IRC channel (0 = unlimited, "
|
||||||
|
"examples: 1440 = one day, 10080 = one week, 43200 = one month, 525600 = one "
|
||||||
|
"year)"
|
||||||
|
msgstr ""
|
||||||
|
"maksymalna ilość minut w historii każdego bufora (0 = bez ograniczeń, "
|
||||||
|
"przykłady: 1440 = dzień, 10080 = tydzień, 43200 = miesiąc, 525600 = rok)"
|
||||||
|
|
||||||
|
msgid "display backlog starting from last client disconnect"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"tags of messages which are displayed in backlog per IRC channel (supported "
|
||||||
|
"tags: \"irc_join\", \"irc_part\", \"irc_quit\", \"irc_nick\", \"irc_privmsg"
|
||||||
|
"\"), \"*\" = all supported tags"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"format for time in backlog messages (see man strftime for format) (not used "
|
||||||
|
"if server capability \"server-time\" was enabled by client, because time is "
|
||||||
|
"sent as irc tag); empty string = disable time in backlog messages"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "list of relay clients"
|
msgid "list of relay clients"
|
||||||
msgstr "lista zdalnych klientów"
|
msgstr "lista zdalnych klientów"
|
||||||
|
|
||||||
|
30
po/pt_BR.po
30
po/pt_BR.po
@ -21,7 +21,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: WeeChat 0.4.0-dev\n"
|
"Project-Id-Version: WeeChat 0.4.0-dev\n"
|
||||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||||
"POT-Creation-Date: 2012-12-20 17:20+0100\n"
|
"POT-Creation-Date: 2012-12-24 16:46+0100\n"
|
||||||
"PO-Revision-Date: 2012-12-20 18:04+0100\n"
|
"PO-Revision-Date: 2012-12-20 18:04+0100\n"
|
||||||
"Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n"
|
"Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n"
|
||||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||||
@ -7561,6 +7561,34 @@ msgid ""
|
|||||||
"file with SSL certificate and private key (for serving clients with SSL)"
|
"file with SSL certificate and private key (for serving clients with SSL)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid "maximum number of lines in backlog per IRC channel (0 = unlimited)"
|
||||||
|
msgstr "número máximo de linhas no histórico por buffer (0 = ilimitado)"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid ""
|
||||||
|
"maximum number of minutes in backlog per IRC channel (0 = unlimited, "
|
||||||
|
"examples: 1440 = one day, 10080 = one week, 43200 = one month, 525600 = one "
|
||||||
|
"year)"
|
||||||
|
msgstr ""
|
||||||
|
"número máximo de minutos no histórico por buffer (0 = ilimitado, exemplos: "
|
||||||
|
"1440 = um dia, 10080 = uma semana, 43200 = um mês, 525600 = um ano)"
|
||||||
|
|
||||||
|
msgid "display backlog starting from last client disconnect"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"tags of messages which are displayed in backlog per IRC channel (supported "
|
||||||
|
"tags: \"irc_join\", \"irc_part\", \"irc_quit\", \"irc_nick\", \"irc_privmsg"
|
||||||
|
"\"), \"*\" = all supported tags"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"format for time in backlog messages (see man strftime for format) (not used "
|
||||||
|
"if server capability \"server-time\" was enabled by client, because time is "
|
||||||
|
"sent as irc tag); empty string = disable time in backlog messages"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "list of relay clients"
|
msgid "list of relay clients"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
28
po/ru.po
28
po/ru.po
@ -21,7 +21,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: WeeChat 0.4.0-dev\n"
|
"Project-Id-Version: WeeChat 0.4.0-dev\n"
|
||||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||||
"POT-Creation-Date: 2012-12-20 17:20+0100\n"
|
"POT-Creation-Date: 2012-12-24 16:46+0100\n"
|
||||||
"PO-Revision-Date: 2012-12-20 18:05+0100\n"
|
"PO-Revision-Date: 2012-12-20 18:05+0100\n"
|
||||||
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
|
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
|
||||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||||
@ -7430,6 +7430,32 @@ msgid ""
|
|||||||
"file with SSL certificate and private key (for serving clients with SSL)"
|
"file with SSL certificate and private key (for serving clients with SSL)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid "maximum number of lines in backlog per IRC channel (0 = unlimited)"
|
||||||
|
msgstr "максимальное количество команд в истории (0 = не ограничено)"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid ""
|
||||||
|
"maximum number of minutes in backlog per IRC channel (0 = unlimited, "
|
||||||
|
"examples: 1440 = one day, 10080 = one week, 43200 = one month, 525600 = one "
|
||||||
|
"year)"
|
||||||
|
msgstr "максимальное количество команд в истории (0 = не ограничено)"
|
||||||
|
|
||||||
|
msgid "display backlog starting from last client disconnect"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"tags of messages which are displayed in backlog per IRC channel (supported "
|
||||||
|
"tags: \"irc_join\", \"irc_part\", \"irc_quit\", \"irc_nick\", \"irc_privmsg"
|
||||||
|
"\"), \"*\" = all supported tags"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"format for time in backlog messages (see man strftime for format) (not used "
|
||||||
|
"if server capability \"server-time\" was enabled by client, because time is "
|
||||||
|
"sent as irc tag); empty string = disable time in backlog messages"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid "list of relay clients"
|
msgid "list of relay clients"
|
||||||
msgstr "Список сокращений:\n"
|
msgstr "Список сокращений:\n"
|
||||||
|
@ -7,7 +7,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||||
"POT-Creation-Date: 2012-12-20 17:20+0100\n"
|
"POT-Creation-Date: 2012-12-24 16:46+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@ -6524,6 +6524,30 @@ msgid ""
|
|||||||
"file with SSL certificate and private key (for serving clients with SSL)"
|
"file with SSL certificate and private key (for serving clients with SSL)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "maximum number of lines in backlog per IRC channel (0 = unlimited)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"maximum number of minutes in backlog per IRC channel (0 = unlimited, "
|
||||||
|
"examples: 1440 = one day, 10080 = one week, 43200 = one month, 525600 = one "
|
||||||
|
"year)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "display backlog starting from last client disconnect"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"tags of messages which are displayed in backlog per IRC channel (supported "
|
||||||
|
"tags: \"irc_join\", \"irc_part\", \"irc_quit\", \"irc_nick\", \"irc_privmsg"
|
||||||
|
"\"), \"*\" = all supported tags"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"format for time in backlog messages (see man strftime for format) (not used "
|
||||||
|
"if server capability \"server-time\" was enabled by client, because time is "
|
||||||
|
"sent as irc tag); empty string = disable time in backlog messages"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "list of relay clients"
|
msgid "list of relay clients"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -35,10 +35,15 @@
|
|||||||
#include "../relay-client.h"
|
#include "../relay-client.h"
|
||||||
#include "../relay-config.h"
|
#include "../relay-config.h"
|
||||||
#include "../relay-raw.h"
|
#include "../relay-raw.h"
|
||||||
|
#include "../relay-server.h"
|
||||||
|
|
||||||
|
|
||||||
char *relay_irc_relay_commands[] = { "privmsg", "notice", NULL };
|
char *relay_irc_relay_commands[] = { "privmsg", "notice", NULL };
|
||||||
char *relay_irc_ignore_commands[] = { "pong", "quit", NULL };
|
char *relay_irc_ignore_commands[] = { "cap", "pong", "quit", NULL };
|
||||||
|
char *relay_irc_backlog_commands_tags[RELAY_IRC_NUM_CMD] =
|
||||||
|
{ "irc_join", "irc_part", "irc_quit", "irc_nick", "irc_privmsg" };
|
||||||
|
char *relay_irc_server_capabilities[RELAY_IRC_NUM_CAPAB] =
|
||||||
|
{ "server-time" };
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -93,6 +98,49 @@ relay_irc_command_ignored (const char *irc_command)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Searches for a tag of a command (in backlog).
|
||||||
|
*
|
||||||
|
* Returns index of tag in enum t_relay_irc_command, -1 if tag is not found.
|
||||||
|
*/
|
||||||
|
|
||||||
|
int
|
||||||
|
relay_irc_search_backlog_commands_tags (const char *tag)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < RELAY_IRC_NUM_CMD; i++)
|
||||||
|
{
|
||||||
|
if (strcmp (relay_irc_backlog_commands_tags[i], tag) == 0)
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* tag not found */
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Searches for a server capability.
|
||||||
|
*
|
||||||
|
* Returns index of server capability in enum t_relay_irc_server_capab, -1 if
|
||||||
|
* server capability is not found.
|
||||||
|
*/
|
||||||
|
|
||||||
|
int
|
||||||
|
relay_irc_search_server_capability (const char *capability)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < RELAY_IRC_NUM_CAPAB; i++)
|
||||||
|
{
|
||||||
|
if (strcmp (relay_irc_server_capabilities[i], capability) == 0)
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* server capability not found */
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parses an IRC message.
|
* Parses an IRC message.
|
||||||
*
|
*
|
||||||
@ -272,7 +320,8 @@ relay_irc_signal_irc_in2_cb (void *data, const char *signal,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Gets id of client by looking for tag "relay_client_NNN" in list of tags (comma separated list).
|
* Gets id of client by looking for tag "relay_client_NNN" in list of tags
|
||||||
|
* (comma separated list).
|
||||||
*
|
*
|
||||||
* Returns number found (NNN), -1 if not found.
|
* Returns number found (NNN), -1 if not found.
|
||||||
*/
|
*/
|
||||||
@ -397,7 +446,8 @@ relay_irc_signal_irc_outtags_cb (void *data, const char *signal,
|
|||||||
RELAY_IRC_DATA(client, nick));
|
RELAY_IRC_DATA(client, nick));
|
||||||
|
|
||||||
host = NULL;
|
host = NULL;
|
||||||
infolist_nick = weechat_infolist_get ("irc_nick", NULL, str_infolist_args);
|
infolist_nick = weechat_infolist_get ("irc_nick", NULL,
|
||||||
|
str_infolist_args);
|
||||||
if (infolist_nick && weechat_infolist_next (infolist_nick))
|
if (infolist_nick && weechat_infolist_next (infolist_nick))
|
||||||
host = weechat_infolist_string (infolist_nick, "host");
|
host = weechat_infolist_string (infolist_nick, "host");
|
||||||
|
|
||||||
@ -497,6 +547,381 @@ relay_irc_hsignal_irc_redir_cb (void *data, const char *signal,
|
|||||||
return WEECHAT_RC_OK;
|
return WEECHAT_RC_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Gets info about a line in a buffer:
|
||||||
|
* - irc command
|
||||||
|
* - date
|
||||||
|
* - nick
|
||||||
|
* - nick1 and nick2 (old and new nick for irc "nick" command)
|
||||||
|
* - host (without colors)
|
||||||
|
* - message (without colors).
|
||||||
|
*
|
||||||
|
* Arguments hdata_line_data and line_data must be non NULL, the other arguments
|
||||||
|
* can be NULL.
|
||||||
|
*
|
||||||
|
* Note: tags, host and message (if given and filled) must be freed after use.
|
||||||
|
*/
|
||||||
|
|
||||||
|
void
|
||||||
|
relay_irc_get_line_info (struct t_relay_client *client,
|
||||||
|
struct t_gui_buffer *buffer,
|
||||||
|
struct t_hdata *hdata_line_data, void *line_data,
|
||||||
|
int *irc_command, int *irc_action, time_t *date,
|
||||||
|
const char **nick, const char **nick1,
|
||||||
|
const char **nick2, char **tags, char **host,
|
||||||
|
char **message)
|
||||||
|
{
|
||||||
|
int i, num_tags, command, action, all_tags, length;
|
||||||
|
char str_tag[256], *pos, *pos2, *message_no_color, str_time[256];
|
||||||
|
const char *ptr_tag, *ptr_message, *ptr_nick, *ptr_nick1, *ptr_nick2;
|
||||||
|
const char *localvar_nick, *time_format;
|
||||||
|
time_t msg_date;
|
||||||
|
struct tm *tm;
|
||||||
|
|
||||||
|
if (irc_command)
|
||||||
|
*irc_command = -1;
|
||||||
|
if (irc_action)
|
||||||
|
*irc_action = 0;
|
||||||
|
if (date)
|
||||||
|
*date = 0;
|
||||||
|
if (nick)
|
||||||
|
*nick = NULL;
|
||||||
|
if (nick1)
|
||||||
|
*nick1 = NULL;
|
||||||
|
if (nick2)
|
||||||
|
*nick2 = NULL;
|
||||||
|
if (tags)
|
||||||
|
*tags = NULL;
|
||||||
|
if (host)
|
||||||
|
*host = NULL;
|
||||||
|
if (message)
|
||||||
|
*message = NULL;
|
||||||
|
|
||||||
|
msg_date = weechat_hdata_time (hdata_line_data, line_data, "date");
|
||||||
|
tm = localtime (&msg_date);
|
||||||
|
num_tags = weechat_hdata_get_var_array_size (hdata_line_data, line_data,
|
||||||
|
"tags_array");
|
||||||
|
ptr_message = weechat_hdata_pointer (hdata_line_data, line_data, "message");
|
||||||
|
|
||||||
|
/* no tag found, or no message? just exit */
|
||||||
|
if ((num_tags <= 0) || !ptr_message)
|
||||||
|
return;
|
||||||
|
|
||||||
|
command = -1;
|
||||||
|
action = 0;
|
||||||
|
ptr_nick = NULL;
|
||||||
|
ptr_nick1 = NULL;
|
||||||
|
ptr_nick2 = NULL;
|
||||||
|
all_tags = weechat_hashtable_has_key (relay_config_hashtable_irc_backlog_tags,
|
||||||
|
"*");
|
||||||
|
for (i = 0; i < num_tags; i++)
|
||||||
|
{
|
||||||
|
snprintf (str_tag, sizeof (str_tag), "%d|tags_array", i);
|
||||||
|
ptr_tag = weechat_hdata_string (hdata_line_data, line_data, str_tag);
|
||||||
|
if (ptr_tag)
|
||||||
|
{
|
||||||
|
if (strcmp (ptr_tag, "irc_action") == 0)
|
||||||
|
action = 1;
|
||||||
|
else if (strncmp (ptr_tag, "nick_", 5) == 0)
|
||||||
|
ptr_nick = ptr_tag + 5;
|
||||||
|
else if (strncmp (ptr_tag, "irc_nick1_", 10) == 0)
|
||||||
|
ptr_nick1 = ptr_tag + 10;
|
||||||
|
else if (strncmp (ptr_tag, "irc_nick2_", 10) == 0)
|
||||||
|
ptr_nick2 = ptr_tag + 10;
|
||||||
|
else if ((command < 0)
|
||||||
|
&& (all_tags
|
||||||
|
|| (weechat_hashtable_has_key (relay_config_hashtable_irc_backlog_tags,
|
||||||
|
ptr_tag))))
|
||||||
|
{
|
||||||
|
command = relay_irc_search_backlog_commands_tags (ptr_tag);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* not a supported IRC command? */
|
||||||
|
if (command < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* ignore join/part/quit from self nick */
|
||||||
|
if ((command == RELAY_IRC_CMD_JOIN) || (command == RELAY_IRC_CMD_PART)
|
||||||
|
|| (command == RELAY_IRC_CMD_QUIT))
|
||||||
|
{
|
||||||
|
localvar_nick = weechat_buffer_get_string (buffer, "localvar_nick");
|
||||||
|
if (localvar_nick && localvar_nick[0]
|
||||||
|
&& (strcmp (ptr_nick, localvar_nick) == 0))
|
||||||
|
{
|
||||||
|
command = -1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* fills variables with the line data */
|
||||||
|
if (irc_command)
|
||||||
|
*irc_command = command;
|
||||||
|
if (irc_action)
|
||||||
|
*irc_action = action;
|
||||||
|
if (date)
|
||||||
|
*date = msg_date;
|
||||||
|
if (nick)
|
||||||
|
*nick = ptr_nick;
|
||||||
|
if (nick1)
|
||||||
|
*nick1 = ptr_nick1;
|
||||||
|
if (nick2)
|
||||||
|
*nick2 = ptr_nick2;
|
||||||
|
message_no_color = (ptr_message) ?
|
||||||
|
weechat_string_remove_color (ptr_message, NULL) : NULL;
|
||||||
|
if ((command == RELAY_IRC_CMD_PRIVMSG) && message && message_no_color)
|
||||||
|
{
|
||||||
|
pos = message_no_color;
|
||||||
|
if (action)
|
||||||
|
{
|
||||||
|
pos = strchr (message_no_color, ' ');
|
||||||
|
if (pos)
|
||||||
|
{
|
||||||
|
while (pos[0] == ' ')
|
||||||
|
{
|
||||||
|
pos++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
pos = message_no_color;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* if server capability "server-time" is NOT enabled, and if the time
|
||||||
|
* format is not empty, add time inside message (before message)
|
||||||
|
*/
|
||||||
|
time_format = weechat_config_string (relay_config_irc_backlog_time_format);
|
||||||
|
if (!(RELAY_IRC_DATA(client, server_capabilities) & (1 << RELAY_IRC_CAPAB_SERVER_TIME))
|
||||||
|
&& time_format && time_format[0])
|
||||||
|
{
|
||||||
|
strftime (str_time, sizeof (str_time), time_format, tm);
|
||||||
|
length = strlen (str_time) + strlen (pos) + 1;
|
||||||
|
*message = malloc (length);
|
||||||
|
if (*message)
|
||||||
|
snprintf (*message, length, "%s%s", str_time, pos);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
*message = strdup (pos);
|
||||||
|
}
|
||||||
|
switch (command)
|
||||||
|
{
|
||||||
|
case RELAY_IRC_CMD_JOIN:
|
||||||
|
case RELAY_IRC_CMD_PART:
|
||||||
|
case RELAY_IRC_CMD_QUIT:
|
||||||
|
if (host && message && message_no_color)
|
||||||
|
{
|
||||||
|
pos = strstr (message_no_color, " (");
|
||||||
|
if (pos)
|
||||||
|
{
|
||||||
|
pos2 = strchr (pos, ')');
|
||||||
|
if (pos2)
|
||||||
|
*host = weechat_strndup (pos + 2, pos2 - pos - 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
/* if server capability "server-time" is enabled, add an irc tag with time */
|
||||||
|
if (tags
|
||||||
|
&& (RELAY_IRC_DATA(client, server_capabilities) & (1 << RELAY_IRC_CAPAB_SERVER_TIME)))
|
||||||
|
{
|
||||||
|
strftime (str_time, sizeof (str_time), "%Y-%m-%dT%H:%M:%S", tm);
|
||||||
|
snprintf (str_tag, sizeof (str_tag), "@time=%s.000Z ", str_time);
|
||||||
|
*tags = strdup (str_tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (message_no_color)
|
||||||
|
free (message_no_color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Sends channel backlog to client.
|
||||||
|
*/
|
||||||
|
|
||||||
|
void
|
||||||
|
relay_irc_send_channel_backlog (struct t_relay_client *client,
|
||||||
|
const char *channel,
|
||||||
|
struct t_gui_buffer *buffer)
|
||||||
|
{
|
||||||
|
struct t_relay_server *ptr_server;
|
||||||
|
void *ptr_own_lines, *ptr_line, *ptr_line_data;
|
||||||
|
void *ptr_hdata_line, *ptr_hdata_line_data;
|
||||||
|
char *tags, *host, *message;
|
||||||
|
const char *ptr_nick, *ptr_nick1, *ptr_nick2;
|
||||||
|
int irc_command, irc_action, count, max_number, max_minutes;
|
||||||
|
time_t date_min, date_min2, date;
|
||||||
|
|
||||||
|
/* get pointer on "own_lines" in buffer */
|
||||||
|
ptr_own_lines = weechat_hdata_pointer (weechat_hdata_get ("buffer"),
|
||||||
|
buffer, "own_lines");
|
||||||
|
if (!ptr_own_lines)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* get pointer on "last_line" in lines */
|
||||||
|
ptr_line = weechat_hdata_pointer (weechat_hdata_get ("lines"),
|
||||||
|
ptr_own_lines, "last_line");
|
||||||
|
if (!ptr_line)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* get hdata "line" */
|
||||||
|
ptr_hdata_line = weechat_hdata_get ("line");
|
||||||
|
if (!ptr_hdata_line)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* get hdata "line_data" */
|
||||||
|
ptr_hdata_line_data = weechat_hdata_get ("line_data");
|
||||||
|
if (!ptr_hdata_line_data)
|
||||||
|
return;
|
||||||
|
|
||||||
|
max_number = weechat_config_integer (relay_config_irc_backlog_max_number);
|
||||||
|
max_minutes = weechat_config_integer (relay_config_irc_backlog_max_minutes);
|
||||||
|
date_min = (max_minutes > 0) ? time (NULL) - (max_minutes * 60) : 0;
|
||||||
|
if (weechat_config_boolean (relay_config_irc_backlog_since_last_disconnect))
|
||||||
|
{
|
||||||
|
ptr_server = relay_server_search (client->protocol_string);
|
||||||
|
if (ptr_server && (ptr_server->last_client_disconnect > 0))
|
||||||
|
{
|
||||||
|
date_min2 = ptr_server->last_client_disconnect;
|
||||||
|
if (date_min2 > date_min)
|
||||||
|
date_min = date_min2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* loop on lines in buffer, from last to first, and stop when we have
|
||||||
|
* reached max number of lines (or max minutes)
|
||||||
|
*/
|
||||||
|
count = 0;
|
||||||
|
while (ptr_line)
|
||||||
|
{
|
||||||
|
ptr_line_data = weechat_hdata_pointer (ptr_hdata_line,
|
||||||
|
ptr_line, "data");
|
||||||
|
if (ptr_line_data)
|
||||||
|
{
|
||||||
|
relay_irc_get_line_info (client, buffer,
|
||||||
|
ptr_hdata_line_data, ptr_line_data,
|
||||||
|
&irc_command,
|
||||||
|
NULL, /* irc_action */
|
||||||
|
&date,
|
||||||
|
NULL, /* nick */
|
||||||
|
NULL, /* nick1 */
|
||||||
|
NULL, /* nick2 */
|
||||||
|
NULL, /* tags */
|
||||||
|
NULL, /* host */
|
||||||
|
NULL); /* message */
|
||||||
|
if (irc_command >= 0)
|
||||||
|
{
|
||||||
|
/* if we have reached max minutes, exit loop */
|
||||||
|
if ((date_min > 0) && (date < date_min))
|
||||||
|
break;
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
/* if we have reached max number of messages, exit loop */
|
||||||
|
if ((max_number > 0) && (count > max_number))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
ptr_line = weechat_hdata_move (ptr_hdata_line, ptr_line, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!ptr_line)
|
||||||
|
{
|
||||||
|
/* if we have reached beginning of buffer, start from first line */
|
||||||
|
ptr_line = weechat_hdata_pointer (weechat_hdata_get ("lines"),
|
||||||
|
ptr_own_lines, "first_line");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* start from line + 1 (the current line must not be sent) */
|
||||||
|
ptr_line = weechat_hdata_move (ptr_hdata_line, ptr_line, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* loop on lines from line pointer until last line of buffer, and for each
|
||||||
|
* irc message, sends it to client
|
||||||
|
*/
|
||||||
|
while (ptr_line)
|
||||||
|
{
|
||||||
|
ptr_line_data = weechat_hdata_pointer (ptr_hdata_line,
|
||||||
|
ptr_line, "data");
|
||||||
|
if (ptr_line_data)
|
||||||
|
{
|
||||||
|
relay_irc_get_line_info (client, buffer,
|
||||||
|
ptr_hdata_line_data, ptr_line_data,
|
||||||
|
&irc_command,
|
||||||
|
&irc_action,
|
||||||
|
&date,
|
||||||
|
&ptr_nick,
|
||||||
|
&ptr_nick1,
|
||||||
|
&ptr_nick2,
|
||||||
|
&tags,
|
||||||
|
&host,
|
||||||
|
&message);
|
||||||
|
switch (irc_command)
|
||||||
|
{
|
||||||
|
case RELAY_IRC_CMD_JOIN:
|
||||||
|
relay_irc_sendf (client,
|
||||||
|
"%s:%s%s%s JOIN :%s",
|
||||||
|
(tags) ? tags : "",
|
||||||
|
ptr_nick,
|
||||||
|
(host) ? "!" : "",
|
||||||
|
(host) ? host : "",
|
||||||
|
channel);
|
||||||
|
break;
|
||||||
|
case RELAY_IRC_CMD_PART:
|
||||||
|
relay_irc_sendf (client,
|
||||||
|
"%s:%s%s%s PART %s",
|
||||||
|
(tags) ? tags : "",
|
||||||
|
ptr_nick,
|
||||||
|
(host) ? "!" : "",
|
||||||
|
(host) ? host : "",
|
||||||
|
channel);
|
||||||
|
case RELAY_IRC_CMD_QUIT:
|
||||||
|
relay_irc_sendf (client,
|
||||||
|
"%s:%s%s%s QUIT",
|
||||||
|
(tags) ? tags : "",
|
||||||
|
ptr_nick,
|
||||||
|
(host) ? "!" : "",
|
||||||
|
(host) ? host : "");
|
||||||
|
break;
|
||||||
|
case RELAY_IRC_CMD_NICK:
|
||||||
|
if (ptr_nick1 && ptr_nick2)
|
||||||
|
{
|
||||||
|
relay_irc_sendf (client,
|
||||||
|
"%s:%s NICK :%s",
|
||||||
|
(tags) ? tags : "",
|
||||||
|
ptr_nick1,
|
||||||
|
ptr_nick2);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case RELAY_IRC_CMD_PRIVMSG:
|
||||||
|
if (ptr_nick && message)
|
||||||
|
{
|
||||||
|
relay_irc_sendf (client,
|
||||||
|
"%s:%s PRIVMSG %s :%s%s%s",
|
||||||
|
(tags) ? tags : "",
|
||||||
|
ptr_nick,
|
||||||
|
channel,
|
||||||
|
(irc_action) ? "\01ACTION " : "",
|
||||||
|
message,
|
||||||
|
(irc_action) ? "\01": "");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case RELAY_IRC_NUM_CMD:
|
||||||
|
/* make C compiler happy */
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (tags)
|
||||||
|
free (tags);
|
||||||
|
if (host)
|
||||||
|
free (host);
|
||||||
|
if (message)
|
||||||
|
free (message);
|
||||||
|
}
|
||||||
|
ptr_line = weechat_hdata_move (ptr_hdata_line, ptr_line, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sends IRC "JOIN" for a channel to client.
|
* Sends IRC "JOIN" for a channel to client.
|
||||||
*/
|
*/
|
||||||
@ -510,6 +935,7 @@ relay_irc_send_join (struct t_relay_client *client,
|
|||||||
char *host;
|
char *host;
|
||||||
int length, length_nicks;
|
int length, length_nicks;
|
||||||
struct t_infolist *infolist_nick, *infolist_channel, *infolist_nicks;
|
struct t_infolist *infolist_nick, *infolist_channel, *infolist_nicks;
|
||||||
|
struct t_gui_buffer *buffer;
|
||||||
|
|
||||||
length = strlen (client->protocol_args) + 1 + strlen (channel) + 1
|
length = strlen (client->protocol_args) + 1 + strlen (channel) + 1
|
||||||
+ strlen (RELAY_IRC_DATA(client, nick)) + 1;
|
+ strlen (RELAY_IRC_DATA(client, nick)) + 1;
|
||||||
@ -533,6 +959,7 @@ relay_irc_send_join (struct t_relay_client *client,
|
|||||||
}
|
}
|
||||||
weechat_infolist_free (infolist_nick);
|
weechat_infolist_free (infolist_nick);
|
||||||
}
|
}
|
||||||
|
|
||||||
relay_irc_sendf (client,
|
relay_irc_sendf (client,
|
||||||
":%s!%s JOIN %s",
|
":%s!%s JOIN %s",
|
||||||
RELAY_IRC_DATA(client, nick),
|
RELAY_IRC_DATA(client, nick),
|
||||||
@ -543,12 +970,15 @@ relay_irc_send_join (struct t_relay_client *client,
|
|||||||
snprintf (infolist_name, length, "%s,%s",
|
snprintf (infolist_name, length, "%s,%s",
|
||||||
client->protocol_args,
|
client->protocol_args,
|
||||||
channel);
|
channel);
|
||||||
|
|
||||||
|
buffer = NULL;
|
||||||
infolist_channel = weechat_infolist_get ("irc_channel", NULL,
|
infolist_channel = weechat_infolist_get ("irc_channel", NULL,
|
||||||
infolist_name);
|
infolist_name);
|
||||||
if (infolist_channel)
|
if (infolist_channel)
|
||||||
{
|
{
|
||||||
if (weechat_infolist_next (infolist_channel))
|
if (weechat_infolist_next (infolist_channel))
|
||||||
{
|
{
|
||||||
|
buffer = weechat_infolist_pointer (infolist_channel, "buffer");
|
||||||
topic = weechat_infolist_string (infolist_channel, "topic");
|
topic = weechat_infolist_string (infolist_channel, "topic");
|
||||||
if (topic && topic[0])
|
if (topic && topic[0])
|
||||||
{
|
{
|
||||||
@ -613,6 +1043,10 @@ relay_irc_send_join (struct t_relay_client *client,
|
|||||||
RELAY_IRC_DATA(client, nick),
|
RELAY_IRC_DATA(client, nick),
|
||||||
channel);
|
channel);
|
||||||
free (infolist_name);
|
free (infolist_name);
|
||||||
|
|
||||||
|
/* send backlog to client */
|
||||||
|
if (buffer)
|
||||||
|
relay_irc_send_channel_backlog (client, channel, buffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -738,6 +1172,99 @@ relay_irc_hook_signals (struct t_relay_client *client)
|
|||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Timer called to hooks signals and send joins for all channels to client.
|
||||||
|
*/
|
||||||
|
|
||||||
|
int
|
||||||
|
relay_irc_timer_hooks_and_joins_cb (void *data, int remaining_calls)
|
||||||
|
{
|
||||||
|
/* make C compiler happy */
|
||||||
|
(void) remaining_calls;
|
||||||
|
|
||||||
|
if (relay_client_valid (data))
|
||||||
|
{
|
||||||
|
/* hook signals */
|
||||||
|
relay_irc_hook_signals (data);
|
||||||
|
|
||||||
|
/* send JOIN for all channels on server to client */
|
||||||
|
relay_irc_send_join_channels (data);
|
||||||
|
}
|
||||||
|
|
||||||
|
return WEECHAT_RC_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Processes the "CAP" irc command (received from client)
|
||||||
|
*/
|
||||||
|
|
||||||
|
void
|
||||||
|
relay_irc_recv_command_capab (struct t_relay_client *client,
|
||||||
|
const char *arguments)
|
||||||
|
{
|
||||||
|
char str_capab[1024], **capabs;
|
||||||
|
const char *ptr_args;
|
||||||
|
int i, num_capabs, capability;
|
||||||
|
|
||||||
|
if (weechat_strcasecmp (arguments, "ls") == 0)
|
||||||
|
{
|
||||||
|
/* return the list of supported server capabilities */
|
||||||
|
str_capab[0] = '\0';
|
||||||
|
for (i = 0; i < RELAY_IRC_NUM_CAPAB; i++)
|
||||||
|
{
|
||||||
|
if (str_capab[0])
|
||||||
|
strcat (str_capab, " ");
|
||||||
|
strcat (str_capab, relay_irc_server_capabilities[i]);
|
||||||
|
relay_irc_sendf (client,
|
||||||
|
":%s CAP %s LS :%s",
|
||||||
|
RELAY_IRC_DATA(client, address),
|
||||||
|
(RELAY_IRC_DATA(client, nick)) ? RELAY_IRC_DATA(client, nick) : "nick",
|
||||||
|
str_capab);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (weechat_strncasecmp (arguments, "req ", 4) == 0)
|
||||||
|
{
|
||||||
|
/* client is asking for one or more server capabilities */
|
||||||
|
ptr_args = arguments + 4;
|
||||||
|
while (ptr_args[0] == ' ')
|
||||||
|
{
|
||||||
|
ptr_args++;
|
||||||
|
}
|
||||||
|
if (ptr_args[0] == ':')
|
||||||
|
ptr_args++;
|
||||||
|
capabs = weechat_string_split (ptr_args, " ", 0, 0, &num_capabs);
|
||||||
|
if (capabs)
|
||||||
|
{
|
||||||
|
str_capab[0] = '\0';
|
||||||
|
for (i = 0; i < num_capabs; i++)
|
||||||
|
{
|
||||||
|
capability = relay_irc_search_server_capability (capabs[i]);
|
||||||
|
if (capability >= 0)
|
||||||
|
{
|
||||||
|
if (str_capab[0])
|
||||||
|
strcat (str_capab, " ");
|
||||||
|
strcat (str_capab,
|
||||||
|
relay_irc_server_capabilities[capability]);
|
||||||
|
RELAY_IRC_DATA(client, server_capabilities) |= 1 << capability;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* if at least one supported capability was enabled, send ACK to
|
||||||
|
* client
|
||||||
|
*/
|
||||||
|
if (str_capab[0])
|
||||||
|
{
|
||||||
|
relay_irc_sendf (client,
|
||||||
|
":%s CAP %s ACK :%s",
|
||||||
|
RELAY_IRC_DATA(client, address),
|
||||||
|
(RELAY_IRC_DATA(client, nick)) ? RELAY_IRC_DATA(client, nick) : "nick",
|
||||||
|
str_capab);
|
||||||
|
}
|
||||||
|
weechat_string_free_split (capabs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reads one message from client.
|
* Reads one message from client.
|
||||||
*/
|
*/
|
||||||
@ -786,7 +1313,10 @@ relay_irc_recv_one_msg (struct t_relay_client *client, char *data)
|
|||||||
if (irc_args)
|
if (irc_args)
|
||||||
irc_argv = weechat_string_split (irc_args, " ", 0, 0, &irc_argc);
|
irc_argv = weechat_string_split (irc_args, " ", 0, 0, &irc_argc);
|
||||||
|
|
||||||
/* process the message */
|
/*
|
||||||
|
* first process the "nick" command (it will be processed again in this
|
||||||
|
* function below)
|
||||||
|
*/
|
||||||
if (irc_command && (weechat_strcasecmp (irc_command, "nick") == 0))
|
if (irc_command && (weechat_strcasecmp (irc_command, "nick") == 0))
|
||||||
{
|
{
|
||||||
if (irc_args && irc_args[0])
|
if (irc_args && irc_args[0])
|
||||||
@ -796,6 +1326,13 @@ relay_irc_recv_one_msg (struct t_relay_client *client, char *data)
|
|||||||
RELAY_IRC_DATA(client, nick) = strdup (irc_args);
|
RELAY_IRC_DATA(client, nick) = strdup (irc_args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* server capabilities */
|
||||||
|
if (irc_command && (weechat_strcasecmp (irc_command, "cap") == 0))
|
||||||
|
{
|
||||||
|
if (irc_args)
|
||||||
|
relay_irc_recv_command_capab (client, irc_args);
|
||||||
|
}
|
||||||
|
/* if client is not yet "connected" */
|
||||||
if (!RELAY_IRC_DATA(client, connected))
|
if (!RELAY_IRC_DATA(client, connected))
|
||||||
{
|
{
|
||||||
if (irc_command && (weechat_strcasecmp (irc_command, "pass") == 0))
|
if (irc_command && (weechat_strcasecmp (irc_command, "pass") == 0))
|
||||||
@ -942,11 +1479,17 @@ relay_irc_recv_one_msg (struct t_relay_client *client, char *data)
|
|||||||
RELAY_IRC_DATA(client, address),
|
RELAY_IRC_DATA(client, address),
|
||||||
RELAY_IRC_DATA(client, nick));
|
RELAY_IRC_DATA(client, nick));
|
||||||
|
|
||||||
/* hook signals */
|
/*
|
||||||
relay_irc_hook_signals (client);
|
* hook a timer which will hook signals and send JOIN for all
|
||||||
|
* channels to client (a timer is needed because we may not have
|
||||||
/* send JOIN for all channels on server to client */
|
* received the server capabilities yet, like server-time)
|
||||||
relay_irc_send_join_channels (client);
|
*/
|
||||||
|
if (RELAY_IRC_DATA(client, hook_timer_signals_joins))
|
||||||
|
weechat_unhook (RELAY_IRC_DATA(client, hook_timer_signals_joins));
|
||||||
|
RELAY_IRC_DATA(client, hook_timer_signals_joins) =
|
||||||
|
weechat_hook_timer (500, 0, 1,
|
||||||
|
&relay_irc_timer_hooks_and_joins_cb,
|
||||||
|
client);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1173,6 +1716,12 @@ void
|
|||||||
relay_irc_close_connection (struct t_relay_client *client)
|
relay_irc_close_connection (struct t_relay_client *client)
|
||||||
{
|
{
|
||||||
RELAY_IRC_DATA(client, connected) = 0;
|
RELAY_IRC_DATA(client, connected) = 0;
|
||||||
|
|
||||||
|
if (RELAY_IRC_DATA(client, hook_timer_signals_joins))
|
||||||
|
{
|
||||||
|
weechat_unhook (RELAY_IRC_DATA(client, hook_timer_signals_joins));
|
||||||
|
RELAY_IRC_DATA(client, hook_timer_signals_joins) = NULL;
|
||||||
|
}
|
||||||
if (RELAY_IRC_DATA(client, hook_signal_irc_in2))
|
if (RELAY_IRC_DATA(client, hook_signal_irc_in2))
|
||||||
{
|
{
|
||||||
weechat_unhook (RELAY_IRC_DATA(client, hook_signal_irc_in2));
|
weechat_unhook (RELAY_IRC_DATA(client, hook_signal_irc_in2));
|
||||||
@ -1215,6 +1764,8 @@ relay_irc_alloc (struct t_relay_client *client)
|
|||||||
RELAY_IRC_DATA(client, nick) = NULL;
|
RELAY_IRC_DATA(client, nick) = NULL;
|
||||||
RELAY_IRC_DATA(client, user_received) = 0;
|
RELAY_IRC_DATA(client, user_received) = 0;
|
||||||
RELAY_IRC_DATA(client, connected) = 0;
|
RELAY_IRC_DATA(client, connected) = 0;
|
||||||
|
RELAY_IRC_DATA(client, server_capabilities) = 0;
|
||||||
|
RELAY_IRC_DATA(client, hook_timer_signals_joins) = NULL;
|
||||||
RELAY_IRC_DATA(client, hook_signal_irc_in2) = NULL;
|
RELAY_IRC_DATA(client, hook_signal_irc_in2) = NULL;
|
||||||
RELAY_IRC_DATA(client, hook_signal_irc_outtags) = NULL;
|
RELAY_IRC_DATA(client, hook_signal_irc_outtags) = NULL;
|
||||||
RELAY_IRC_DATA(client, hook_signal_irc_disc) = NULL;
|
RELAY_IRC_DATA(client, hook_signal_irc_disc) = NULL;
|
||||||
@ -1245,6 +1796,8 @@ relay_irc_alloc_with_infolist (struct t_relay_client *client,
|
|||||||
RELAY_IRC_DATA(client, nick) = NULL;
|
RELAY_IRC_DATA(client, nick) = NULL;
|
||||||
RELAY_IRC_DATA(client, user_received) = weechat_infolist_integer (infolist, "user_received");
|
RELAY_IRC_DATA(client, user_received) = weechat_infolist_integer (infolist, "user_received");
|
||||||
RELAY_IRC_DATA(client, connected) = weechat_infolist_integer (infolist, "connected");
|
RELAY_IRC_DATA(client, connected) = weechat_infolist_integer (infolist, "connected");
|
||||||
|
RELAY_IRC_DATA(client, server_capabilities) = weechat_infolist_integer (infolist, "server_capabilities");
|
||||||
|
RELAY_IRC_DATA(client, hook_timer_signals_joins) = NULL;
|
||||||
if (RELAY_IRC_DATA(client, connected))
|
if (RELAY_IRC_DATA(client, connected))
|
||||||
{
|
{
|
||||||
relay_irc_hook_signals (client);
|
relay_irc_hook_signals (client);
|
||||||
@ -1272,6 +1825,8 @@ relay_irc_free (struct t_relay_client *client)
|
|||||||
free (RELAY_IRC_DATA(client, address));
|
free (RELAY_IRC_DATA(client, address));
|
||||||
if (RELAY_IRC_DATA(client, nick))
|
if (RELAY_IRC_DATA(client, nick))
|
||||||
free (RELAY_IRC_DATA(client, nick));
|
free (RELAY_IRC_DATA(client, nick));
|
||||||
|
if (RELAY_IRC_DATA(client, hook_timer_signals_joins))
|
||||||
|
weechat_unhook (RELAY_IRC_DATA(client, hook_timer_signals_joins));
|
||||||
if (RELAY_IRC_DATA(client, hook_signal_irc_in2))
|
if (RELAY_IRC_DATA(client, hook_signal_irc_in2))
|
||||||
weechat_unhook (RELAY_IRC_DATA(client, hook_signal_irc_in2));
|
weechat_unhook (RELAY_IRC_DATA(client, hook_signal_irc_in2));
|
||||||
if (RELAY_IRC_DATA(client, hook_signal_irc_outtags))
|
if (RELAY_IRC_DATA(client, hook_signal_irc_outtags))
|
||||||
@ -1312,6 +1867,10 @@ relay_irc_add_to_infolist (struct t_infolist_item *item,
|
|||||||
return 0;
|
return 0;
|
||||||
if (!weechat_infolist_new_var_integer (item, "connected", RELAY_IRC_DATA(client, connected)))
|
if (!weechat_infolist_new_var_integer (item, "connected", RELAY_IRC_DATA(client, connected)))
|
||||||
return 0;
|
return 0;
|
||||||
|
if (!weechat_infolist_new_var_integer (item, "server_capabilities", RELAY_IRC_DATA(client, server_capabilities)))
|
||||||
|
return 0;
|
||||||
|
if (!weechat_infolist_new_var_pointer (item, "hook_timer_signals_joins", RELAY_IRC_DATA(client, hook_timer_signals_joins)))
|
||||||
|
return 0;
|
||||||
if (!weechat_infolist_new_var_pointer (item, "hook_signal_irc_in2", RELAY_IRC_DATA(client, hook_signal_irc_in2)))
|
if (!weechat_infolist_new_var_pointer (item, "hook_signal_irc_in2", RELAY_IRC_DATA(client, hook_signal_irc_in2)))
|
||||||
return 0;
|
return 0;
|
||||||
if (!weechat_infolist_new_var_pointer (item, "hook_signal_irc_outtags", RELAY_IRC_DATA(client, hook_signal_irc_outtags)))
|
if (!weechat_infolist_new_var_pointer (item, "hook_signal_irc_outtags", RELAY_IRC_DATA(client, hook_signal_irc_outtags)))
|
||||||
@ -1333,14 +1892,16 @@ relay_irc_print_log (struct t_relay_client *client)
|
|||||||
{
|
{
|
||||||
if (client->protocol_data)
|
if (client->protocol_data)
|
||||||
{
|
{
|
||||||
weechat_log_printf (" address. . . . . . . . : '%s'", RELAY_IRC_DATA(client, address));
|
weechat_log_printf (" address . . . . . . . . : '%s'", RELAY_IRC_DATA(client, address));
|
||||||
weechat_log_printf (" password_ok. . . . . . : %d", RELAY_IRC_DATA(client, password_ok));
|
weechat_log_printf (" password_ok . . . . . . : %d", RELAY_IRC_DATA(client, password_ok));
|
||||||
weechat_log_printf (" nick . . . . . . . . . : '%s'", RELAY_IRC_DATA(client, nick));
|
weechat_log_printf (" nick. . . . . . . . . . : '%s'", RELAY_IRC_DATA(client, nick));
|
||||||
weechat_log_printf (" user_received. . . . . : %d", RELAY_IRC_DATA(client, user_received));
|
weechat_log_printf (" user_received . . . . . : %d", RELAY_IRC_DATA(client, user_received));
|
||||||
weechat_log_printf (" connected. . . . . . . : %d", RELAY_IRC_DATA(client, connected));
|
weechat_log_printf (" connected . . . . . . . : %d", RELAY_IRC_DATA(client, connected));
|
||||||
weechat_log_printf (" hook_signal_irc_in2. . : 0x%lx", RELAY_IRC_DATA(client, hook_signal_irc_in2));
|
weechat_log_printf (" server_capabilities . . : %d", RELAY_IRC_DATA(client, server_capabilities));
|
||||||
weechat_log_printf (" hook_signal_irc_outtags: 0x%lx", RELAY_IRC_DATA(client, hook_signal_irc_outtags));
|
weechat_log_printf (" hook_timer_signals_joins: 0x%lx", RELAY_IRC_DATA(client, hook_timer_signals_joins));
|
||||||
weechat_log_printf (" hook_signal_irc_disc . : 0x%lx", RELAY_IRC_DATA(client, hook_signal_irc_disc));
|
weechat_log_printf (" hook_signal_irc_in2 . . : 0x%lx", RELAY_IRC_DATA(client, hook_signal_irc_in2));
|
||||||
weechat_log_printf (" hook_hsignal_irc_redir : 0x%lx", RELAY_IRC_DATA(client, hook_hsignal_irc_redir));
|
weechat_log_printf (" hook_signal_irc_outtags : 0x%lx", RELAY_IRC_DATA(client, hook_signal_irc_outtags));
|
||||||
|
weechat_log_printf (" hook_signal_irc_disc. . : 0x%lx", RELAY_IRC_DATA(client, hook_signal_irc_disc));
|
||||||
|
weechat_log_printf (" hook_hsignal_irc_redir. : 0x%lx", RELAY_IRC_DATA(client, hook_hsignal_irc_redir));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,12 +34,34 @@ struct t_relay_irc_data
|
|||||||
int user_received; /* command "USER" received */
|
int user_received; /* command "USER" received */
|
||||||
int connected; /* 1 if client is connected as IRC */
|
int connected; /* 1 if client is connected as IRC */
|
||||||
/* client */
|
/* client */
|
||||||
|
int server_capabilities; /* server capabilities enabled (one */
|
||||||
|
/* bit per capability) */
|
||||||
|
struct t_hook *hook_timer_signals_joins;/* timer to hooks signals and */
|
||||||
|
/* send joins to client */
|
||||||
struct t_hook *hook_signal_irc_in2; /* signal "irc_in2" */
|
struct t_hook *hook_signal_irc_in2; /* signal "irc_in2" */
|
||||||
struct t_hook *hook_signal_irc_outtags; /* signal "irc_outtags" */
|
struct t_hook *hook_signal_irc_outtags; /* signal "irc_outtags" */
|
||||||
struct t_hook *hook_signal_irc_disc; /* signal "irc_disconnected" */
|
struct t_hook *hook_signal_irc_disc; /* signal "irc_disconnected" */
|
||||||
struct t_hook *hook_hsignal_irc_redir; /* hsignal "irc_redirection_..."*/
|
struct t_hook *hook_hsignal_irc_redir; /* hsignal "irc_redirection_..."*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum t_relay_irc_command
|
||||||
|
{
|
||||||
|
RELAY_IRC_CMD_JOIN = 0,
|
||||||
|
RELAY_IRC_CMD_PART,
|
||||||
|
RELAY_IRC_CMD_QUIT,
|
||||||
|
RELAY_IRC_CMD_NICK,
|
||||||
|
RELAY_IRC_CMD_PRIVMSG,
|
||||||
|
/* number of relay irc commands */
|
||||||
|
RELAY_IRC_NUM_CMD,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum t_relay_irc_server_capab
|
||||||
|
{
|
||||||
|
RELAY_IRC_CAPAB_SERVER_TIME = 0,
|
||||||
|
/* number of server capabilities */
|
||||||
|
RELAY_IRC_NUM_CAPAB,
|
||||||
|
};
|
||||||
|
|
||||||
extern void relay_irc_recv (struct t_relay_client *client,
|
extern void relay_irc_recv (struct t_relay_client *client,
|
||||||
const char *data);
|
const char *data);
|
||||||
extern void relay_irc_close_connection (struct t_relay_client *client);
|
extern void relay_irc_close_connection (struct t_relay_client *client);
|
||||||
|
@ -647,6 +647,7 @@ relay_client_new (int sock, const char *address, struct t_relay_server *server)
|
|||||||
new_client->address = strdup ((address) ? address : "?");
|
new_client->address = strdup ((address) ? address : "?");
|
||||||
new_client->status = RELAY_STATUS_CONNECTED;
|
new_client->status = RELAY_STATUS_CONNECTED;
|
||||||
new_client->protocol = server->protocol;
|
new_client->protocol = server->protocol;
|
||||||
|
new_client->protocol_string = (server->protocol_string) ? strdup (server->protocol_string) : NULL;
|
||||||
new_client->protocol_args = (server->protocol_args) ? strdup (server->protocol_args) : NULL;
|
new_client->protocol_args = (server->protocol_args) ? strdup (server->protocol_args) : NULL;
|
||||||
new_client->listen_start_time = server->start_time;
|
new_client->listen_start_time = server->start_time;
|
||||||
new_client->start_time = time (NULL);
|
new_client->start_time = time (NULL);
|
||||||
@ -794,6 +795,8 @@ relay_client_new_with_infolist (struct t_infolist *infolist)
|
|||||||
new_client->address = strdup (weechat_infolist_string (infolist, "address"));
|
new_client->address = strdup (weechat_infolist_string (infolist, "address"));
|
||||||
new_client->status = weechat_infolist_integer (infolist, "status");
|
new_client->status = weechat_infolist_integer (infolist, "status");
|
||||||
new_client->protocol = weechat_infolist_integer (infolist, "protocol");
|
new_client->protocol = weechat_infolist_integer (infolist, "protocol");
|
||||||
|
str = weechat_infolist_string (infolist, "protocol_string");
|
||||||
|
new_client->protocol_string = (str) ? strdup (str) : NULL;
|
||||||
str = weechat_infolist_string (infolist, "protocol_args");
|
str = weechat_infolist_string (infolist, "protocol_args");
|
||||||
new_client->protocol_args = (str) ? strdup (str) : NULL;
|
new_client->protocol_args = (str) ? strdup (str) : NULL;
|
||||||
new_client->listen_start_time = weechat_infolist_time (infolist, "listen_start_time");
|
new_client->listen_start_time = weechat_infolist_time (infolist, "listen_start_time");
|
||||||
@ -859,12 +862,18 @@ void
|
|||||||
relay_client_set_status (struct t_relay_client *client,
|
relay_client_set_status (struct t_relay_client *client,
|
||||||
enum t_relay_status status)
|
enum t_relay_status status)
|
||||||
{
|
{
|
||||||
|
struct t_relay_server *ptr_server;
|
||||||
|
|
||||||
client->status = status;
|
client->status = status;
|
||||||
|
|
||||||
if (RELAY_CLIENT_HAS_ENDED(client))
|
if (RELAY_CLIENT_HAS_ENDED(client))
|
||||||
{
|
{
|
||||||
client->end_time = time (NULL);
|
client->end_time = time (NULL);
|
||||||
|
|
||||||
|
ptr_server = relay_server_search (client->protocol_string);
|
||||||
|
if (ptr_server)
|
||||||
|
ptr_server->last_client_disconnect = client->end_time;
|
||||||
|
|
||||||
relay_client_outqueue_free_all (client);
|
relay_client_outqueue_free_all (client);
|
||||||
|
|
||||||
if (client->hook_fd)
|
if (client->hook_fd)
|
||||||
@ -951,8 +960,12 @@ relay_client_free (struct t_relay_client *client)
|
|||||||
(client->next_client)->prev_client = client->prev_client;
|
(client->next_client)->prev_client = client->prev_client;
|
||||||
|
|
||||||
/* free data */
|
/* free data */
|
||||||
|
if (client->desc)
|
||||||
|
free (client->desc);
|
||||||
if (client->address)
|
if (client->address)
|
||||||
free (client->address);
|
free (client->address);
|
||||||
|
if (client->protocol_string)
|
||||||
|
free (client->protocol_string);
|
||||||
if (client->protocol_args)
|
if (client->protocol_args)
|
||||||
free (client->protocol_args);
|
free (client->protocol_args);
|
||||||
#ifdef HAVE_GNUTLS
|
#ifdef HAVE_GNUTLS
|
||||||
@ -1075,6 +1088,8 @@ relay_client_add_to_infolist (struct t_infolist *infolist,
|
|||||||
return 0;
|
return 0;
|
||||||
if (!weechat_infolist_new_var_string (ptr_item, "protocol_string", relay_protocol_string[client->protocol]))
|
if (!weechat_infolist_new_var_string (ptr_item, "protocol_string", relay_protocol_string[client->protocol]))
|
||||||
return 0;
|
return 0;
|
||||||
|
if (!weechat_infolist_new_var_string (ptr_item, "protocol_string", client->protocol_string))
|
||||||
|
return 0;
|
||||||
if (!weechat_infolist_new_var_string (ptr_item, "protocol_args", client->protocol_args))
|
if (!weechat_infolist_new_var_string (ptr_item, "protocol_args", client->protocol_args))
|
||||||
return 0;
|
return 0;
|
||||||
if (!weechat_infolist_new_var_time (ptr_item, "listen_start_time", client->listen_start_time))
|
if (!weechat_infolist_new_var_time (ptr_item, "listen_start_time", client->listen_start_time))
|
||||||
@ -1138,6 +1153,7 @@ relay_client_print_log ()
|
|||||||
weechat_log_printf (" protocol. . . . . . . : %d (%s)",
|
weechat_log_printf (" protocol. . . . . . . : %d (%s)",
|
||||||
ptr_client->protocol,
|
ptr_client->protocol,
|
||||||
relay_protocol_string[ptr_client->protocol]);
|
relay_protocol_string[ptr_client->protocol]);
|
||||||
|
weechat_log_printf (" protocol_string . . . : '%s'", ptr_client->protocol_string);
|
||||||
weechat_log_printf (" protocol_args . . . . : '%s'", ptr_client->protocol_args);
|
weechat_log_printf (" protocol_args . . . . : '%s'", ptr_client->protocol_args);
|
||||||
weechat_log_printf (" listen_start_time . . : %ld", ptr_client->listen_start_time);
|
weechat_log_printf (" listen_start_time . . : %ld", ptr_client->listen_start_time);
|
||||||
weechat_log_printf (" start_time. . . . . . : %ld", ptr_client->start_time);
|
weechat_log_printf (" start_time. . . . . . : %ld", ptr_client->start_time);
|
||||||
|
@ -70,6 +70,7 @@ struct t_relay_client
|
|||||||
char *address; /* string with IP address */
|
char *address; /* string with IP address */
|
||||||
enum t_relay_status status; /* status (connecting, active,..) */
|
enum t_relay_status status; /* status (connecting, active,..) */
|
||||||
enum t_relay_protocol protocol; /* protocol (irc,..) */
|
enum t_relay_protocol protocol; /* protocol (irc,..) */
|
||||||
|
char *protocol_string; /* example: "ipv6.ssl.irc.freenode" */
|
||||||
char *protocol_args; /* arguments used for protocol */
|
char *protocol_args; /* arguments used for protocol */
|
||||||
/* example: server for irc protocol */
|
/* example: server for irc protocol */
|
||||||
time_t listen_start_time; /* when listening started */
|
time_t listen_start_time; /* when listening started */
|
||||||
|
@ -58,9 +58,18 @@ struct t_config_option *relay_config_network_max_clients;
|
|||||||
struct t_config_option *relay_config_network_password;
|
struct t_config_option *relay_config_network_password;
|
||||||
struct t_config_option *relay_config_network_ssl_cert_key;
|
struct t_config_option *relay_config_network_ssl_cert_key;
|
||||||
|
|
||||||
|
/* relay config, irc section */
|
||||||
|
|
||||||
|
struct t_config_option *relay_config_irc_backlog_max_number;
|
||||||
|
struct t_config_option *relay_config_irc_backlog_max_minutes;
|
||||||
|
struct t_config_option *relay_config_irc_backlog_since_last_disconnect;
|
||||||
|
struct t_config_option *relay_config_irc_backlog_tags;
|
||||||
|
struct t_config_option *relay_config_irc_backlog_time_format;
|
||||||
|
|
||||||
/* other */
|
/* other */
|
||||||
|
|
||||||
regex_t *relay_config_regex_allowed_ips = NULL;
|
regex_t *relay_config_regex_allowed_ips = NULL;
|
||||||
|
struct t_hashtable *relay_config_hashtable_irc_backlog_tags = NULL;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -178,6 +187,46 @@ relay_config_change_network_ssl_cert_key (void *data,
|
|||||||
relay_network_set_ssl_cert_key (1);
|
relay_network_set_ssl_cert_key (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Callback for changes on option "relay.irc.backlog_tags".
|
||||||
|
*/
|
||||||
|
|
||||||
|
void
|
||||||
|
relay_config_change_irc_backlog_tags (void *data,
|
||||||
|
struct t_config_option *option)
|
||||||
|
{
|
||||||
|
char **items;
|
||||||
|
int num_items, i;
|
||||||
|
|
||||||
|
/* make C compiler happy */
|
||||||
|
(void) data;
|
||||||
|
(void) option;
|
||||||
|
|
||||||
|
if (!relay_config_hashtable_irc_backlog_tags)
|
||||||
|
{
|
||||||
|
relay_config_hashtable_irc_backlog_tags = weechat_hashtable_new (8,
|
||||||
|
WEECHAT_HASHTABLE_STRING,
|
||||||
|
WEECHAT_HASHTABLE_STRING,
|
||||||
|
NULL,
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
weechat_hashtable_remove_all (relay_config_hashtable_irc_backlog_tags);
|
||||||
|
|
||||||
|
items = weechat_string_split (weechat_config_string (relay_config_irc_backlog_tags),
|
||||||
|
";", 0, 0, &num_items);
|
||||||
|
if (items)
|
||||||
|
{
|
||||||
|
for (i = 0; i < num_items; i++)
|
||||||
|
{
|
||||||
|
weechat_hashtable_set (relay_config_hashtable_irc_backlog_tags,
|
||||||
|
items[i],
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
weechat_string_free_split (items);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Checks if a port is valid.
|
* Checks if a port is valid.
|
||||||
*
|
*
|
||||||
@ -401,6 +450,7 @@ relay_config_init ()
|
|||||||
if (!relay_config_file)
|
if (!relay_config_file)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
/* section look */
|
||||||
ptr_section = weechat_config_new_section (relay_config_file, "look",
|
ptr_section = weechat_config_new_section (relay_config_file, "look",
|
||||||
0, 0,
|
0, 0,
|
||||||
NULL, NULL, NULL, NULL,
|
NULL, NULL, NULL, NULL,
|
||||||
@ -424,6 +474,7 @@ relay_config_init ()
|
|||||||
"closed (messages will be displayed when opening raw data buffer)"),
|
"closed (messages will be displayed when opening raw data buffer)"),
|
||||||
NULL, 0, 65535, "256", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
|
NULL, 0, 65535, "256", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||||
|
|
||||||
|
/* section color */
|
||||||
ptr_section = weechat_config_new_section (relay_config_file, "color",
|
ptr_section = weechat_config_new_section (relay_config_file, "color",
|
||||||
0, 0,
|
0, 0,
|
||||||
NULL, NULL, NULL, NULL,
|
NULL, NULL, NULL, NULL,
|
||||||
@ -490,6 +541,7 @@ relay_config_init ()
|
|||||||
NULL, 0, 0, "lightred", NULL, 0,
|
NULL, 0, 0, "lightred", NULL, 0,
|
||||||
NULL, NULL, &relay_config_refresh_cb, NULL, NULL, NULL);
|
NULL, NULL, &relay_config_refresh_cb, NULL, NULL, NULL);
|
||||||
|
|
||||||
|
/* section network */
|
||||||
ptr_section = weechat_config_new_section (relay_config_file, "network",
|
ptr_section = weechat_config_new_section (relay_config_file, "network",
|
||||||
0, 0,
|
0, 0,
|
||||||
NULL, NULL, NULL, NULL,
|
NULL, NULL, NULL, NULL,
|
||||||
@ -555,6 +607,56 @@ relay_config_init ()
|
|||||||
NULL, 0, 0, "%h/ssl/relay.pem", NULL, 0, NULL, NULL,
|
NULL, 0, 0, "%h/ssl/relay.pem", NULL, 0, NULL, NULL,
|
||||||
&relay_config_change_network_ssl_cert_key, NULL, NULL, NULL);
|
&relay_config_change_network_ssl_cert_key, NULL, NULL, NULL);
|
||||||
|
|
||||||
|
/* section irc */
|
||||||
|
ptr_section = weechat_config_new_section (relay_config_file, "irc",
|
||||||
|
0, 0,
|
||||||
|
NULL, NULL, NULL, NULL,
|
||||||
|
NULL, NULL, NULL, NULL,
|
||||||
|
NULL, NULL);
|
||||||
|
if (!ptr_section)
|
||||||
|
{
|
||||||
|
weechat_config_free (relay_config_file);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
relay_config_irc_backlog_max_number = weechat_config_new_option (
|
||||||
|
relay_config_file, ptr_section,
|
||||||
|
"backlog_max_number", "integer",
|
||||||
|
N_("maximum number of lines in backlog per IRC channel "
|
||||||
|
"(0 = unlimited)"),
|
||||||
|
NULL, 0, INT_MAX, "256", NULL, 0,
|
||||||
|
NULL, NULL, NULL, NULL, NULL, NULL);
|
||||||
|
relay_config_irc_backlog_max_minutes = weechat_config_new_option (
|
||||||
|
relay_config_file, ptr_section,
|
||||||
|
"backlog_max_minutes", "integer",
|
||||||
|
N_("maximum number of minutes in backlog per IRC channel "
|
||||||
|
"(0 = unlimited, examples: 1440 = one day, 10080 = one week, "
|
||||||
|
"43200 = one month, 525600 = one year)"),
|
||||||
|
NULL, 0, INT_MAX, "1440", NULL, 0,
|
||||||
|
NULL, NULL, NULL, NULL, NULL, NULL);
|
||||||
|
relay_config_irc_backlog_since_last_disconnect = weechat_config_new_option (
|
||||||
|
relay_config_file, ptr_section,
|
||||||
|
"backlog_since_last_disconnect", "boolean",
|
||||||
|
N_("display backlog starting from last client disconnect"),
|
||||||
|
NULL, 0, 0, "on", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||||
|
relay_config_irc_backlog_tags = weechat_config_new_option (
|
||||||
|
relay_config_file, ptr_section,
|
||||||
|
"backlog_tags", "string",
|
||||||
|
N_("tags of messages which are displayed in backlog per IRC channel "
|
||||||
|
"(supported tags: \"irc_join\", \"irc_part\", \"irc_quit\", "
|
||||||
|
"\"irc_nick\", \"irc_privmsg\"), \"*\" = all supported tags"),
|
||||||
|
NULL, 0, 0, "irc_privmsg", NULL, 0, NULL, NULL,
|
||||||
|
&relay_config_change_irc_backlog_tags, NULL, NULL, NULL);
|
||||||
|
relay_config_irc_backlog_time_format = weechat_config_new_option (
|
||||||
|
relay_config_file, ptr_section,
|
||||||
|
"backlog_time_format", "string",
|
||||||
|
N_("format for time in backlog messages (see man strftime for format) "
|
||||||
|
"(not used if server capability \"server-time\" was enabled by "
|
||||||
|
"client, because time is sent as irc tag); empty string = disable "
|
||||||
|
"time in backlog messages"),
|
||||||
|
NULL, 0, 0, "[%H:%M] ", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||||
|
|
||||||
|
/* section port */
|
||||||
ptr_section = weechat_config_new_section (relay_config_file, "port",
|
ptr_section = weechat_config_new_section (relay_config_file, "port",
|
||||||
1, 1,
|
1, 1,
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
@ -580,7 +682,15 @@ relay_config_init ()
|
|||||||
int
|
int
|
||||||
relay_config_read ()
|
relay_config_read ()
|
||||||
{
|
{
|
||||||
return weechat_config_read (relay_config_file);
|
int rc;
|
||||||
|
|
||||||
|
rc = weechat_config_read (relay_config_file);
|
||||||
|
if (rc == WEECHAT_CONFIG_READ_OK)
|
||||||
|
{
|
||||||
|
relay_config_change_network_allowed_ips (NULL, NULL);
|
||||||
|
relay_config_change_irc_backlog_tags (NULL, NULL);
|
||||||
|
}
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -592,3 +702,26 @@ relay_config_write ()
|
|||||||
{
|
{
|
||||||
return weechat_config_write (relay_config_file);
|
return weechat_config_write (relay_config_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Frees relay configuration.
|
||||||
|
*/
|
||||||
|
|
||||||
|
void
|
||||||
|
relay_config_free ()
|
||||||
|
{
|
||||||
|
weechat_config_free (relay_config_file);
|
||||||
|
|
||||||
|
if (relay_config_regex_allowed_ips)
|
||||||
|
{
|
||||||
|
regfree (relay_config_regex_allowed_ips);
|
||||||
|
free (relay_config_regex_allowed_ips);
|
||||||
|
relay_config_regex_allowed_ips = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (relay_config_hashtable_irc_backlog_tags)
|
||||||
|
{
|
||||||
|
weechat_hashtable_free (relay_config_hashtable_irc_backlog_tags);
|
||||||
|
relay_config_hashtable_irc_backlog_tags = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -44,7 +44,14 @@ extern struct t_config_option *relay_config_network_max_clients;
|
|||||||
extern struct t_config_option *relay_config_network_password;
|
extern struct t_config_option *relay_config_network_password;
|
||||||
extern struct t_config_option *relay_config_network_ssl_cert_key;
|
extern struct t_config_option *relay_config_network_ssl_cert_key;
|
||||||
|
|
||||||
|
extern struct t_config_option *relay_config_irc_backlog_max_number;
|
||||||
|
extern struct t_config_option *relay_config_irc_backlog_max_minutes;
|
||||||
|
extern struct t_config_option *relay_config_irc_backlog_since_last_disconnect;
|
||||||
|
extern struct t_config_option *relay_config_irc_backlog_tags;
|
||||||
|
extern struct t_config_option *relay_config_irc_backlog_time_format;
|
||||||
|
|
||||||
extern regex_t *relay_config_regex_allowed_ips;
|
extern regex_t *relay_config_regex_allowed_ips;
|
||||||
|
extern struct t_hashtable *relay_config_hashtable_irc_backlog_tags;
|
||||||
|
|
||||||
extern int relay_config_create_option_port (void *data,
|
extern int relay_config_create_option_port (void *data,
|
||||||
struct t_config_file *config_file,
|
struct t_config_file *config_file,
|
||||||
@ -54,5 +61,6 @@ extern int relay_config_create_option_port (void *data,
|
|||||||
extern int relay_config_init ();
|
extern int relay_config_init ();
|
||||||
extern int relay_config_read ();
|
extern int relay_config_read ();
|
||||||
extern int relay_config_write ();
|
extern int relay_config_write ();
|
||||||
|
extern void relay_config_free ();
|
||||||
|
|
||||||
#endif /* __WEECHAT_RELAY_CONFIG_H */
|
#endif /* __WEECHAT_RELAY_CONFIG_H */
|
||||||
|
@ -501,6 +501,7 @@ relay_server_new (const char *protocol_string, enum t_relay_protocol protocol,
|
|||||||
new_server->sock = -1;
|
new_server->sock = -1;
|
||||||
new_server->hook_fd = NULL;
|
new_server->hook_fd = NULL;
|
||||||
new_server->start_time = 0;
|
new_server->start_time = 0;
|
||||||
|
new_server->last_client_disconnect = 0;
|
||||||
|
|
||||||
if (!relay_server_create_socket (new_server))
|
if (!relay_server_create_socket (new_server))
|
||||||
{
|
{
|
||||||
@ -595,6 +596,53 @@ relay_server_free_all ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Adds a server in an infolist.
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* 1: OK
|
||||||
|
* 0: error
|
||||||
|
*/
|
||||||
|
|
||||||
|
int
|
||||||
|
relay_server_add_to_infolist (struct t_infolist *infolist,
|
||||||
|
struct t_relay_server *server)
|
||||||
|
{
|
||||||
|
struct t_infolist_item *ptr_item;
|
||||||
|
|
||||||
|
if (!infolist || !server)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
ptr_item = weechat_infolist_new_item (infolist);
|
||||||
|
if (!ptr_item)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (!weechat_infolist_new_var_string (ptr_item, "protocol_string", server->protocol_string))
|
||||||
|
return 0;
|
||||||
|
if (!weechat_infolist_new_var_integer (ptr_item, "protocol", server->protocol))
|
||||||
|
return 0;
|
||||||
|
if (!weechat_infolist_new_var_string (ptr_item, "protocol_args", server->protocol_args))
|
||||||
|
return 0;
|
||||||
|
if (!weechat_infolist_new_var_integer (ptr_item, "port", server->port))
|
||||||
|
return 0;
|
||||||
|
if (!weechat_infolist_new_var_integer (ptr_item, "ipv4", server->ipv4))
|
||||||
|
return 0;
|
||||||
|
if (!weechat_infolist_new_var_integer (ptr_item, "ipv6", server->ipv6))
|
||||||
|
return 0;
|
||||||
|
if (!weechat_infolist_new_var_integer (ptr_item, "ssl", server->ssl))
|
||||||
|
return 0;
|
||||||
|
if (!weechat_infolist_new_var_integer (ptr_item, "sock", server->sock))
|
||||||
|
return 0;
|
||||||
|
if (!weechat_infolist_new_var_pointer (ptr_item, "hook_fd", server->hook_fd))
|
||||||
|
return 0;
|
||||||
|
if (!weechat_infolist_new_var_time (ptr_item, "start_time", server->start_time))
|
||||||
|
return 0;
|
||||||
|
if (!weechat_infolist_new_var_time (ptr_item, "last_client_disconnect", server->last_client_disconnect))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Prints servers in WeeChat log file (usually for crash dump).
|
* Prints servers in WeeChat log file (usually for crash dump).
|
||||||
*/
|
*/
|
||||||
@ -609,19 +657,20 @@ relay_server_print_log ()
|
|||||||
{
|
{
|
||||||
weechat_log_printf ("");
|
weechat_log_printf ("");
|
||||||
weechat_log_printf ("[relay server (addr:0x%lx)]", ptr_server);
|
weechat_log_printf ("[relay server (addr:0x%lx)]", ptr_server);
|
||||||
weechat_log_printf (" protocol_string . . : '%s'", ptr_server->protocol_string);
|
weechat_log_printf (" protocol_string . . . : '%s'", ptr_server->protocol_string);
|
||||||
weechat_log_printf (" protocol. . . . . . : %d (%s)",
|
weechat_log_printf (" protocol. . . . . . . : %d (%s)",
|
||||||
ptr_server->protocol,
|
ptr_server->protocol,
|
||||||
relay_protocol_string[ptr_server->protocol]);
|
relay_protocol_string[ptr_server->protocol]);
|
||||||
weechat_log_printf (" protocol_args . . . : '%s'", ptr_server->protocol_args);
|
weechat_log_printf (" protocol_args . . . . : '%s'", ptr_server->protocol_args);
|
||||||
weechat_log_printf (" port. . . . . . . . : %d", ptr_server->port);
|
weechat_log_printf (" port. . . . . . . . . : %d", ptr_server->port);
|
||||||
weechat_log_printf (" ipv4. . . . . . . . : %d", ptr_server->ipv4);
|
weechat_log_printf (" ipv4. . . . . . . . . : %d", ptr_server->ipv4);
|
||||||
weechat_log_printf (" ipv6. . . . . . . . : %d", ptr_server->ipv6);
|
weechat_log_printf (" ipv6. . . . . . . . . : %d", ptr_server->ipv6);
|
||||||
weechat_log_printf (" ssl . . . . . . . . : %d", ptr_server->ssl);
|
weechat_log_printf (" ssl . . . . . . . . . : %d", ptr_server->ssl);
|
||||||
weechat_log_printf (" sock. . . . . . . . : %d", ptr_server->sock);
|
weechat_log_printf (" sock. . . . . . . . . : %d", ptr_server->sock);
|
||||||
weechat_log_printf (" hook_fd . . . . . . : 0x%lx", ptr_server->hook_fd);
|
weechat_log_printf (" hook_fd . . . . . . . : 0x%lx", ptr_server->hook_fd);
|
||||||
weechat_log_printf (" start_time. . . . . : %ld", ptr_server->start_time);
|
weechat_log_printf (" start_time. . . . . . : %ld", ptr_server->start_time);
|
||||||
weechat_log_printf (" prev_server . . . . : 0x%lx", ptr_server->prev_server);
|
weechat_log_printf (" last_client_disconnect: %ld", ptr_server->last_client_disconnect);
|
||||||
weechat_log_printf (" next_server . . . . : 0x%lx", ptr_server->next_server);
|
weechat_log_printf (" prev_server . . . . . : 0x%lx", ptr_server->prev_server);
|
||||||
|
weechat_log_printf (" next_server . . . . . : 0x%lx", ptr_server->next_server);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,7 @@ struct t_relay_server
|
|||||||
int sock; /* socket for connection */
|
int sock; /* socket for connection */
|
||||||
struct t_hook *hook_fd; /* hook for socket */
|
struct t_hook *hook_fd; /* hook for socket */
|
||||||
time_t start_time; /* start time */
|
time_t start_time; /* start time */
|
||||||
|
time_t last_client_disconnect; /* last time a client disconnected */
|
||||||
struct t_relay_server *prev_server;/* link to previous server */
|
struct t_relay_server *prev_server;/* link to previous server */
|
||||||
struct t_relay_server *next_server;/* link to next server */
|
struct t_relay_server *next_server;/* link to next server */
|
||||||
};
|
};
|
||||||
@ -61,6 +62,8 @@ extern struct t_relay_server *relay_server_new (const char *protocol_string,
|
|||||||
extern void relay_server_update_port (struct t_relay_server *server, int port);
|
extern void relay_server_update_port (struct t_relay_server *server, int port);
|
||||||
extern void relay_server_free (struct t_relay_server *server);
|
extern void relay_server_free (struct t_relay_server *server);
|
||||||
extern void relay_server_free_all ();
|
extern void relay_server_free_all ();
|
||||||
|
extern int relay_server_add_to_infolist (struct t_infolist *infolist,
|
||||||
|
struct t_relay_server *server);
|
||||||
extern void relay_server_print_log ();
|
extern void relay_server_print_log ();
|
||||||
|
|
||||||
#endif /* __WEECHAT_RELAY_SERVER_H */
|
#endif /* __WEECHAT_RELAY_SERVER_H */
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include "relay-buffer.h"
|
#include "relay-buffer.h"
|
||||||
#include "relay-client.h"
|
#include "relay-client.h"
|
||||||
#include "relay-raw.h"
|
#include "relay-raw.h"
|
||||||
|
#include "relay-server.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -43,10 +44,31 @@ int
|
|||||||
relay_upgrade_save_all_data (struct t_upgrade_file *upgrade_file)
|
relay_upgrade_save_all_data (struct t_upgrade_file *upgrade_file)
|
||||||
{
|
{
|
||||||
struct t_infolist *infolist;
|
struct t_infolist *infolist;
|
||||||
|
struct t_relay_server *ptr_server;
|
||||||
struct t_relay_client *ptr_client;
|
struct t_relay_client *ptr_client;
|
||||||
struct t_relay_raw_message *ptr_raw_message;
|
struct t_relay_raw_message *ptr_raw_message;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
/* save servers */
|
||||||
|
for (ptr_server = relay_servers; ptr_server;
|
||||||
|
ptr_server = ptr_server->next_server)
|
||||||
|
{
|
||||||
|
infolist = weechat_infolist_new ();
|
||||||
|
if (!infolist)
|
||||||
|
return 0;
|
||||||
|
if (!relay_server_add_to_infolist (infolist, ptr_server))
|
||||||
|
{
|
||||||
|
weechat_infolist_free (infolist);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
rc = weechat_upgrade_write_object (upgrade_file,
|
||||||
|
RELAY_UPGRADE_TYPE_SERVER,
|
||||||
|
infolist);
|
||||||
|
weechat_infolist_free (infolist);
|
||||||
|
if (!rc)
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* save clients */
|
/* save clients */
|
||||||
for (ptr_client = last_relay_client; ptr_client;
|
for (ptr_client = last_relay_client; ptr_client;
|
||||||
ptr_client = ptr_client->prev_client)
|
ptr_client = ptr_client->prev_client)
|
||||||
@ -162,6 +184,9 @@ relay_upgrade_read_cb (void *data,
|
|||||||
int object_id,
|
int object_id,
|
||||||
struct t_infolist *infolist)
|
struct t_infolist *infolist)
|
||||||
{
|
{
|
||||||
|
const char *str;
|
||||||
|
struct t_relay_server *ptr_server;
|
||||||
|
|
||||||
/* make C compiler happy */
|
/* make C compiler happy */
|
||||||
(void) data;
|
(void) data;
|
||||||
(void) upgrade_file;
|
(void) upgrade_file;
|
||||||
@ -171,6 +196,19 @@ relay_upgrade_read_cb (void *data,
|
|||||||
{
|
{
|
||||||
switch (object_id)
|
switch (object_id)
|
||||||
{
|
{
|
||||||
|
case RELAY_UPGRADE_TYPE_SERVER:
|
||||||
|
str = weechat_infolist_string (infolist, "protocol_string");
|
||||||
|
if (str)
|
||||||
|
{
|
||||||
|
ptr_server = relay_server_search (str);
|
||||||
|
if (ptr_server)
|
||||||
|
{
|
||||||
|
ptr_server->last_client_disconnect =
|
||||||
|
weechat_infolist_time (infolist,
|
||||||
|
"last_client_disconnect");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case RELAY_UPGRADE_TYPE_CLIENT:
|
case RELAY_UPGRADE_TYPE_CLIENT:
|
||||||
relay_client_new_with_infolist (infolist);
|
relay_client_new_with_infolist (infolist);
|
||||||
break;
|
break;
|
||||||
|
@ -28,6 +28,7 @@ enum t_relay_upgrade_type
|
|||||||
{
|
{
|
||||||
RELAY_UPGRADE_TYPE_CLIENT = 0,
|
RELAY_UPGRADE_TYPE_CLIENT = 0,
|
||||||
RELAY_UPGRADE_TYPE_RAW_MESSAGE,
|
RELAY_UPGRADE_TYPE_RAW_MESSAGE,
|
||||||
|
RELAY_UPGRADE_TYPE_SERVER,
|
||||||
};
|
};
|
||||||
|
|
||||||
extern int relay_upgrade_save ();
|
extern int relay_upgrade_save ();
|
||||||
|
@ -260,5 +260,7 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
|
|||||||
|
|
||||||
relay_network_end ();
|
relay_network_end ();
|
||||||
|
|
||||||
|
relay_config_free ();
|
||||||
|
|
||||||
return WEECHAT_RC_OK;
|
return WEECHAT_RC_OK;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user