From 36c5269b0ef1773eb1b578e8d288785c19581bbf Mon Sep 17 00:00:00 2001 From: "louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13" Date: Fri, 21 May 2010 13:16:40 +0000 Subject: [PATCH] non-anonymous authentication, fixed #1185 --- Makefile | 2 +- data/default_config.cfg | 15 ++- launch.sh | 2 +- locale/poezio.pot | 206 ++++++++++++++++++++++++---------------- src/connection.py | 32 ++++++- src/gui.py | 2 +- 6 files changed, 165 insertions(+), 94 deletions(-) diff --git a/Makefile b/Makefile index 0ec1f08c..0484b1c5 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ install:all $(INSTALL) -m644 src/xmpp/* $(DATADIR)/poezio/src/xmpp/ echo "#!/usr/bin/env sh" > $(BINDIR)/poezio - echo "cd $(DATADIR)/poezio/src/ && python client.py" >> $(BINDIR)/poezio + echo "cd $(DATADIR)/poezio/src/ && python poezio.py" >> $(BINDIR)/poezio chmod 755 $(BINDIR)/poezio for localename in `find locale/ -maxdepth 1 -type d | grep -v '.svn' | sed 's:locale/::g'` ; do \ diff --git a/data/default_config.cfg b/data/default_config.cfg index a9873eb3..c7cef3d5 100644 --- a/data/default_config.cfg +++ b/data/default_config.cfg @@ -1,4 +1,5 @@ [Poezio] + # the server. Make sure the server you're using accepts anonymous authentification server = louiz.org @@ -11,12 +12,22 @@ resource = poezio # the nick you will use when joining a room with no associated nick default_nick = poezio +# Jabber identifiant. Specify it only if you want to connect using an existing +# account on a server. This is optional and useful only for some features, +# like room administration, nickname registration. +# The 'server' option will be ignored if you specify a JID (Jabber identifiant) +# It should be in the form nickname@server.tld +jid = + +# A password is needed only if you specified a jid. It will be ignored otherwise +password = + # the rooms you will join automatically on startup, with associated nickname or not rooms = poezio@conference.codingteam.net:discussion@kikoo.louiz.org # PROXY # set to true if you want to use an http proxy server -# if false, no proxy will be used and the proxy_* settings have no effect +# if false, no proxy will be used and the proxy_* settings will have no effect use_proxy = false proxy_server = proxy_port = @@ -45,7 +56,7 @@ highlight_on = # 0: the notices will NEVER be displayed # n: On any other number, the notices will only be displayed # if the user involved has talked since the last n seconds -# The join messages will be hidden only if hide_exit_join is 0 +# The quit messages will be hidden only if hide_exit_join is 0 # if the value is incorrect, -1 is assumed hide_exit_join = -1 # all quit and join notices will be displayed hide_status_change = 120 # status changes won't be displayed unless diff --git a/launch.sh b/launch.sh index f38a5a5e..9024603e 100644 --- a/launch.sh +++ b/launch.sh @@ -1,4 +1,4 @@ #!/usr/bin/env sh -cd src/ && python client.py "$@" +cd src/ && python poezio.py "$@" diff --git a/locale/poezio.pot b/locale/poezio.pot index 731b745c..ab288fad 100644 --- a/locale/poezio.pot +++ b/locale/poezio.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-02-13 17:55+0100\n" +"POT-Creation-Date: 2010-05-12 15:08+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,128 +16,99 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: src/gui.py:125 +#: src/connection.py:91 #, python-format -msgid "Your nickname is %s" +msgid "" +"Error: Could not authenticate. Please make sure the server you chose (%s) " +"supports anonymous authentication" msgstr "" -#: src/gui.py:126 -#, python-format -msgid "%s is in the room" -msgstr "" - -#: src/gui.py:134 -#, python-format -msgid "%(nick)s joined the room %(roomname)s" -msgstr "" - -#: src/gui.py:141 -#, python-format -msgid "%(old_nick)s is now known as %(new_nick)s" -msgstr "" - -#: src/gui.py:153 -#, python-format -msgid "You have been kicked by %(by)s. Reason: %(reason)s" -msgstr "" - -#: src/gui.py:155 -#, python-format -msgid "You have been kicked. Reason: %s" -msgstr "" - -#: src/gui.py:158 -#, python-format -msgid "%(nick)s has been kicked by %(by)s. Reason: %(reason)s" -msgstr "" - -#: src/gui.py:160 -#, python-format -msgid "%(nick)s has been kicked. Reason: %(reason)s" -msgstr "" - -#: src/gui.py:165 -#, python-format -msgid "%s has left the room" -msgstr "" - -#: src/gui.py:170 -#, python-format -msgid "%(nick)s changed his/her status : %(a)s, %(b)s, %(c)s, %(d)s" -msgstr "" - -#: src/gui.py:191 +#: src/gui.py:67 msgid "OLOL, this is SOOO recursive" msgstr "" -#: src/gui.py:192 +#: src/gui.py:68 msgid "" -"Usage: /join [room_name][/nick]\n" +"Usage: /join [room_name][/nick] [password]\n" "Join: Join the specified room. You can specify a nickname after a slash (/). " "If no nickname is specified, you will use the default_nick in the " "configuration file. You can omit the room name: you will then join the room " -"you're looking at (useful if you were kicked). Examples:\n" +"you're looking at (useful if you were kicked). You can also provide a " +"password to join the room.\n" +"Examples:\n" "/join room@server.tld\n" "/join room@server.tld/John\n" "/join /me_again\n" -"/join" +"/join\n" +"/join room@server.tld/my_nick password\n" +"/join / pass" msgstr "" -#: src/gui.py:193 +#: src/gui.py:69 msgid "" "Usage: /quit\n" "Quit: Just disconnect from the server and exit poezio." msgstr "" -#: src/gui.py:194 +#: src/gui.py:70 msgid "" "Usage: /exit\n" "Exit: Just disconnect from the server and exit poezio." msgstr "" -#: src/gui.py:195 +#: src/gui.py:71 msgid "" "Usage: /next\n" "Next: Go to the next room." msgstr "" -#: src/gui.py:196 +#: src/gui.py:72 msgid "" "Usage: /n\n" "N: Go to the next room." msgstr "" -#: src/gui.py:197 +#: src/gui.py:73 msgid "" "Usage: /prev\n" "Prev: Go to the previous room." msgstr "" -#: src/gui.py:198 +#: src/gui.py:74 msgid "" "Usage: /p\n" "P: Go to the previous room." msgstr "" -#: src/gui.py:199 +#: src/gui.py:75 msgid "" "Usage: /win \n" "Win: Go to the specified room." msgstr "" -#: src/gui.py:200 +#: src/gui.py:76 msgid "" "Usage: /w \n" "W: Go to the specified room." msgstr "" -#: src/gui.py:201 +#: src/gui.py:77 +msgid "Usage: /ignore \\Ignore: Ignore a specified nickname." +msgstr "" + +#: src/gui.py:78 +msgid "" +"Usage: /unignore \\Unignore: Remove the specified nickname from " +"the ignore list." +msgstr "" + +#: src/gui.py:79 msgid "" "Usage: /part [message]\n" "Part: disconnect from a room. You can specify an optional message." msgstr "" -#: src/gui.py:202 +#: src/gui.py:80 msgid "" "Usage: /show [status]\n" "Show: Change your availability and (optionaly) your status. The " @@ -146,45 +117,45 @@ msgid "" "message" msgstr "" -#: src/gui.py:203 +#: src/gui.py:81 msgid "" "Usage: /away [message]\n" "Away: Sets your availability to away and (optional) sets your status " "message. This is equivalent to \"/show away [message]\"" msgstr "" -#: src/gui.py:204 +#: src/gui.py:82 msgid "" "Usage: /busy [message]\n" "Busy: Sets your availability to busy and (optional) sets your status " "message. This is equivalent to \"/show busy [message]\"" msgstr "" -#: src/gui.py:205 +#: src/gui.py:83 msgid "" "Usage: /avail [message]\n" "Avail: Sets your availability to available and (optional) sets your status " "message. This is equivalent to \"/show available [message]\"" msgstr "" -#: src/gui.py:206 +#: src/gui.py:84 msgid "" "Usage: /available [message]\n" "Available: Sets your availability to available and (optional) sets your " "status message. This is equivalent to \"/show available [message]\"" msgstr "" -#: src/gui.py:207 +#: src/gui.py:85 msgid "" "Usage: /bookmark [roomname][/nick]\n" "Bookmark: Bookmark the specified room (you will then auto-join it on each " -"poezio start). This commands uses the same syntaxe as /nick. Type /help nick " +"poezio start). This commands uses the same syntaxe as /join. Type /help join " "for syntaxe examples. Note that when typing \"/bookmark\" on its own, the " "room will be bookmarked with the nickname you're currently using in this " "room (instead of default_nick)" msgstr "" -#: src/gui.py:208 +#: src/gui.py:86 msgid "" "Usage: /set