| 169 passwd = g_hash_table_lookup(data, "password"); |
170 passwd = g_hash_table_lookup(data, "password"); |
| 170 |
171 |
| 171 if(!room || !server || !handle) |
172 if(!room || !server || !handle) |
| 172 return; |
173 return; |
| 173 |
174 |
| |
175 if(!jabber_nodeprep_validate(room)) { |
| |
176 char *buf = g_strdup_printf(_("%s is not a valid room name"), room); |
| |
177 gaim_notify_error(gc, _("Invalid Room Name"), _("Invalid Room Name"), |
| |
178 buf); |
| |
179 g_free(buf); |
| |
180 return; |
| |
181 } else if(!jabber_nameprep_validate(server)) { |
| |
182 char *buf = g_strdup_printf(_("%s is not a valid server name"), server); |
| |
183 gaim_notify_error(gc, _("Invalid Server Name"), |
| |
184 _("Invalid Server Name"), buf); |
| |
185 g_free(buf); |
| |
186 return; |
| |
187 } else if(!jabber_resourceprep_validate(handle)) { |
| |
188 char *buf = g_strdup_printf(_("%s is not a valid room handle"), handle); |
| |
189 gaim_notify_error(gc, _("Invalid Room Handle"), |
| |
190 _("Invalid Room Handle"), buf); |
| |
191 } |
| |
192 |
| 174 if(jabber_chat_find(js, room, server)) |
193 if(jabber_chat_find(js, room, server)) |
| 175 return; |
194 return; |
| 176 |
195 |
| 177 tmp = g_strdup_printf("%s@%s", room, server); |
196 tmp = g_strdup_printf("%s@%s", room, server); |
| 178 room_jid = g_strdup(jabber_normalize(tmp)); |
197 room_jid = g_strdup(jabber_normalize(tmp)); |