Mercurial > pidgin
diff 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 |
line wrap: on
line diff
--- a/src/protocols/jabber/chat.c Tue Oct 21 16:34:12 2003 +0000 +++ b/src/protocols/jabber/chat.c Tue Oct 21 17:18:46 2003 +0000 @@ -21,6 +21,7 @@ #include "internal.h" #include "debug.h" #include "multi.h" /* for proto_chat_entry */ +#include "notify.h" #include "chat.h" #include "message.h" @@ -171,6 +172,24 @@ if(!room || !server || !handle) return; + if(!jabber_nodeprep_validate(room)) { + char *buf = g_strdup_printf(_("%s is not a valid room name"), room); + gaim_notify_error(gc, _("Invalid Room Name"), _("Invalid Room Name"), + buf); + g_free(buf); + return; + } else if(!jabber_nameprep_validate(server)) { + char *buf = g_strdup_printf(_("%s is not a valid server name"), server); + gaim_notify_error(gc, _("Invalid Server Name"), + _("Invalid Server Name"), buf); + g_free(buf); + return; + } else if(!jabber_resourceprep_validate(handle)) { + char *buf = g_strdup_printf(_("%s is not a valid room handle"), handle); + gaim_notify_error(gc, _("Invalid Room Handle"), + _("Invalid Room Handle"), buf); + } + if(jabber_chat_find(js, room, server)) return;