summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2009-02-10 12:05:39 +0100
committerSebastien Helleu <flashcode@flashtux.org>2009-02-10 12:05:39 +0100
commitedba78129789baef0d67a60154521541353d3b7a (patch)
tree0d758e7b12075118d2d935dabca9d9fe79127ff6
parentb2f34610fd4e1b0414e1181724c964ad08b4ceea (diff)
downloadweechat-edba78129789baef0d67a60154521541353d3b7a.zip
Add irc info "irc_nick" to get current nick on a server
-rw-r--r--doc/de/autogen/irc_infos.xml5
-rw-r--r--doc/en/autogen/irc_infos.xml5
-rw-r--r--doc/fr/autogen/irc_infos.xml5
-rw-r--r--po/cs.po6
-rw-r--r--po/de.po6
-rw-r--r--po/es.po6
-rw-r--r--po/fr.po7
-rw-r--r--po/hu.po6
-rw-r--r--po/ru.po6
-rw-r--r--po/weechat.pot5
-rw-r--r--src/plugins/irc/irc-info.c9
11 files changed, 58 insertions, 8 deletions
diff --git a/doc/de/autogen/irc_infos.xml b/doc/de/autogen/irc_infos.xml
index 2add5d5d3..8f8753ce5 100644
--- a/doc/de/autogen/irc_infos.xml
+++ b/doc/de/autogen/irc_infos.xml
@@ -18,6 +18,11 @@
</row>
<row>
<entry>info</entry>
+ <entry>irc_nick</entry>
+ <entry>get current nick on a server</entry>
+</row>
+<row>
+ <entry>info</entry>
<entry>irc_nick_from_host</entry>
<entry>get nick from IRC host</entry>
</row>
diff --git a/doc/en/autogen/irc_infos.xml b/doc/en/autogen/irc_infos.xml
index 2add5d5d3..8f8753ce5 100644
--- a/doc/en/autogen/irc_infos.xml
+++ b/doc/en/autogen/irc_infos.xml
@@ -18,6 +18,11 @@
</row>
<row>
<entry>info</entry>
+ <entry>irc_nick</entry>
+ <entry>get current nick on a server</entry>
+</row>
+<row>
+ <entry>info</entry>
<entry>irc_nick_from_host</entry>
<entry>get nick from IRC host</entry>
</row>
diff --git a/doc/fr/autogen/irc_infos.xml b/doc/fr/autogen/irc_infos.xml
index 7973f483f..92ae2c393 100644
--- a/doc/fr/autogen/irc_infos.xml
+++ b/doc/fr/autogen/irc_infos.xml
@@ -18,6 +18,11 @@
</row>
<row>
<entry>info</entry>
+ <entry>irc_nick</entry>
+ <entry>get current nick on a server</entry>
+</row>
+<row>
+ <entry>info</entry>
<entry>irc_nick_from_host</entry>
<entry>retourne le pseudo à partir d'un host IRC</entry>
</row>
diff --git a/po/cs.po b/po/cs.po
index b88db95f3..7b062b952 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2009-02-08 23:12+0100\n"
+"POT-Creation-Date: 2009-02-10 11:58+0100\n"
"PO-Revision-Date: 2009-01-03 00:42+0100\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3601,6 +3601,10 @@ msgid "1 if string is an IRC channel"
msgstr "seznam uživatelů na kanálu"
#, fuzzy
+msgid "get current nick on a server"
+msgstr "změnit aktuální přezdívku"
+
+#, fuzzy
msgid "get nick from IRC host"
msgstr "zakázat přezdívky nebo hosty"
diff --git a/po/de.po b/po/de.po
index 5d127cfd8..ab918537a 100644
--- a/po/de.po
+++ b/po/de.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2009-02-08 23:12+0100\n"
+"POT-Creation-Date: 2009-02-10 11:58+0100\n"
"PO-Revision-Date: 2009-01-03 00:42+0100\n"
"Last-Translator: Thomas Schuetz <i18n@internet-villa.de>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3584,6 +3584,10 @@ msgid "1 if string is an IRC channel"
msgstr "Liste von Nicks im Channel"
#, fuzzy
+msgid "get current nick on a server"
+msgstr "aktuellen Nickname wechseln"
+
+#, fuzzy
msgid "get nick from IRC host"
msgstr "Nicknames oder Hosts sperren/verbannen"
diff --git a/po/es.po b/po/es.po
index cb7d94fd2..7f45bf39c 100644
--- a/po/es.po
+++ b/po/es.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2009-02-08 23:12+0100\n"
+"POT-Creation-Date: 2009-02-10 11:58+0100\n"
"PO-Revision-Date: 2009-01-03 00:42+0100\n"
"Last-Translator: Roberto González Cardenete <robert.glez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3572,6 +3572,10 @@ msgid "1 if string is an IRC channel"
msgstr "lista de usuarios en el canal"
#, fuzzy
+msgid "get current nick on a server"
+msgstr "cambiar el nombre de usuario actual"
+
+#, fuzzy
msgid "get nick from IRC host"
msgstr "banea usuarios o máquinas"
diff --git a/po/fr.po b/po/fr.po
index 32b55c3a2..d029ebf1f 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2009-02-08 23:12+0100\n"
-"PO-Revision-Date: 2009-02-08 23:13+0100\n"
+"POT-Creation-Date: 2009-02-10 11:58+0100\n"
+"PO-Revision-Date: 2009-02-10 11:58+0100\n"
"Last-Translator: FlashCode <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"MIME-Version: 1.0\n"
@@ -3709,6 +3709,9 @@ msgstr[1] "canaux"
msgid "1 if string is an IRC channel"
msgstr "1 si la chaîne est un canal IRC"
+msgid "get current nick on a server"
+msgstr "retourne le pseudo utilisé actuellement sur un serveur"
+
msgid "get nick from IRC host"
msgstr "retourne le pseudo à partir d'un host IRC"
diff --git a/po/hu.po b/po/hu.po
index 4d34e1f13..47510b600 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -12,7 +12,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2009-02-08 23:12+0100\n"
+"POT-Creation-Date: 2009-02-10 11:58+0100\n"
"PO-Revision-Date: 2009-01-03 00:42+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3612,6 +3612,10 @@ msgid "1 if string is an IRC channel"
msgstr "felhasználók listája a szobában"
#, fuzzy
+msgid "get current nick on a server"
+msgstr "aktuális név megváltoztatása"
+
+#, fuzzy
msgid "get nick from IRC host"
msgstr "név vagy gép letiltása"
diff --git a/po/ru.po b/po/ru.po
index 7be32a7b3..d2de54fe0 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2009-02-08 23:12+0100\n"
+"POT-Creation-Date: 2009-02-10 11:58+0100\n"
"PO-Revision-Date: 2009-01-03 00:42+0100\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3605,6 +3605,10 @@ msgid "1 if string is an IRC channel"
msgstr "список ников на канале"
#, fuzzy
+msgid "get current nick on a server"
+msgstr "сменить текущий ник"
+
+#, fuzzy
msgid "get nick from IRC host"
msgstr "банит ник или хост"
diff --git a/po/weechat.pot b/po/weechat.pot
index 88ed968f5..ebe0dd9b3 100644
--- a/po/weechat.pot
+++ b/po/weechat.pot
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2009-02-08 23:12+0100\n"
+"POT-Creation-Date: 2009-02-10 11:58+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -3069,6 +3069,9 @@ msgstr[1] ""
msgid "1 if string is an IRC channel"
msgstr ""
+msgid "get current nick on a server"
+msgstr ""
+
msgid "get nick from IRC host"
msgstr ""
diff --git a/src/plugins/irc/irc-info.c b/src/plugins/irc/irc-info.c
index 83c516d55..c5894a101 100644
--- a/src/plugins/irc/irc-info.c
+++ b/src/plugins/irc/irc-info.c
@@ -78,6 +78,13 @@ irc_info_get_info_cb (void *data, const char *info_name,
return str_true;
return NULL;
}
+ else if (weechat_strcasecmp (info_name, "irc_nick") == 0)
+ {
+ ptr_server = irc_server_search (arguments);
+ if (ptr_server)
+ return ptr_server->nick;
+ return NULL;
+ }
else if (weechat_strcasecmp (info_name, "irc_nick_from_host") == 0)
{
return irc_protocol_get_nick_from_host (arguments);
@@ -365,6 +372,8 @@ irc_info_init ()
/* info hooks */
weechat_hook_info ("irc_is_channel", N_("1 if string is an IRC channel"),
&irc_info_get_info_cb, NULL);
+ weechat_hook_info ("irc_nick", N_("get current nick on a server"),
+ &irc_info_get_info_cb, NULL);
weechat_hook_info ("irc_nick_from_host", N_("get nick from IRC host"),
&irc_info_get_info_cb, NULL);
weechat_hook_info ("irc_buffer", N_("get buffer pointer for an IRC server/channel"),