After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 604347 - /join command doesn't accept multi rooms
/join command doesn't accept multi rooms
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Multi User Chat
2.29.x
Other Linux
: Normal enhancement
: ---
Assigned To: empathy-maint
Depends on:
Blocks:
 
 
Reported: 2009-12-11 08:41 UTC by Guillaume Desmottes
Modified: 2010-02-20 14:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
this patch allows /join to take multiple rooms as arguments (907 bytes, patch)
2010-01-02 19:24 UTC, Thomas Meire
none Details | Review
Same patch as 150696, but now freeing memory (928 bytes, patch)
2010-01-02 19:34 UTC, Thomas Meire
reviewed Details | Review
Allow multiple channels for /join (940 bytes, patch)
2010-01-06 16:57 UTC, Thomas Meire
committed Details | Review

Description Guillaume Desmottes 2009-12-11 08:41:46 UTC
From bug #573407:

joining multi channels like /join #ubuntu,#ubuntu+1 gives: - Failed to join chatroom
Comment 1 Thomas Meire 2010-01-02 19:24:52 UTC
Created attachment 150696 [details] [review]
this patch allows /join to take multiple rooms as arguments

this patch splits the argument for /join using g_strsplit_set on ", ". As a side-effect, it's allowed to use "/join #ubuntu, #ubuntu+1" as well as "/join #ubuntu #ubuntu+1".
Perhaps a cleaner patch would allow a variable number of arguments in chat_command_parse?
Comment 2 Thomas Meire 2010-01-02 19:34:30 UTC
Created attachment 150697 [details] [review]
Same patch as 150696, but now freeing memory
Comment 3 Guillaume Desmottes 2010-01-06 11:32:01 UTC
Review of attachment 150697 [details] [review]:

Thanks a lot for your patch. I inlined some comments.

I see you are using git. Maybe you could push your branch to a public repo?

::: libempathy-gtk/empathy-chat.c
@@ +696,3 @@
 		   GStrv        strv)
 {
+	int i = 0;

Use a guint.

@@ +701,1 @@
+	GStrv rooms = g_strsplit_set(strv[1], ", ", -1);

your coding style is function (arg); You can use "make check" to check if you didn't introduce any coding style regression.

@@ +702,3 @@
+
+	while (rooms[i] != NULL) {
+		// ignore empty strings

Please don't use C++ style comments.

@@ +703,3 @@
+	while (rooms[i] != NULL) {
+		// ignore empty strings
+		if (rooms[i][0] != '\0') {

You can use EMP_STR_EMPTY to check that.
Comment 4 Thomas Meire 2010-01-06 16:54:40 UTC
(In reply to comment #3)
> Review of attachment 150697 [details] [review]:
> 
> Thanks a lot for your patch. I inlined some comments.
> I see you are using git. Maybe you could push your branch to a public repo?

Thank you very much for the review. I'll attach an improved patch. The changes are also in my git repository at http://github.com/blackskad/empathy

> your coding style is function (arg); You can use "make check" to check if you
> didn't introduce any coding style regression.

I'll remember to run this before I submit a patch :)
Comment 5 Thomas Meire 2010-01-06 16:57:16 UTC
Created attachment 150910 [details] [review]
Allow multiple channels for /join
Comment 6 Guillaume Desmottes 2010-01-06 17:29:52 UTC
Great. I squashed your 2 patches and merged them to master.

It's generally a good idea to keep your "master" branch as a bare copy of upstream's master and to create one branch per bug fixed or feature added.

Also, please configure your git to set a real email address. You can use "git config" to do that.

Thanks a lot for your good work on Empathy. :)


This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 7 Omer Akram 2010-02-20 13:08:32 UTC
seems to me this bug still exists. /join #ubuntu-bugs, #moblin only entered me to #ubuntu-bugs and there was an error.
Comment 8 Thomas Meire 2010-02-20 13:51:54 UTC
What version do you use? I'm using the ubuntu ppa version (2.29.90) and "/join #ubuntu-bugs, #moblin" works just fine. Could you please also attach that error, thanks.
Comment 9 Omer Akram 2010-02-20 14:10:29 UTC
Funny now its working might be a mistake by me. but happened twice. btw empathy 2.29.90 Lucid