Mercurial > pidgin.yaz
comparison src/protocols/jabber/chat.c @ 7310:dd4b4a187171
[gaim-migrate @ 7894]
assorted jabber tweaks
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Tue, 21 Oct 2003 17:18:46 +0000 |
parents | e5d0f5cb61fb |
children | ab828b8c3f22 |
comparison
equal
deleted
inserted
replaced
7309:153fbf9b6a7f | 7310:dd4b4a187171 |
---|---|
19 * | 19 * |
20 */ | 20 */ |
21 #include "internal.h" | 21 #include "internal.h" |
22 #include "debug.h" | 22 #include "debug.h" |
23 #include "multi.h" /* for proto_chat_entry */ | 23 #include "multi.h" /* for proto_chat_entry */ |
24 #include "notify.h" | |
24 | 25 |
25 #include "chat.h" | 26 #include "chat.h" |
26 #include "message.h" | 27 #include "message.h" |
27 #include "presence.h" | 28 #include "presence.h" |
28 | 29 |
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)); |