Mercurial > pidgin
comparison src/protocols/oscar/oscar.c @ 4120:697217b52ebd
[gaim-migrate @ 4337]
stop kicking me in the balls
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Mon, 23 Dec 2002 20:29:00 +0000 |
parents | ee884f1d7ae3 |
children | 69c049c48a96 |
comparison
equal
deleted
inserted
replaced
4119:a6825994ab3a | 4120:697217b52ebd |
---|---|
220 } | 220 } |
221 | 221 |
222 static char *extract_name(const char *name) { | 222 static char *extract_name(const char *name) { |
223 char *tmp; | 223 char *tmp; |
224 int i, j; | 224 int i, j; |
225 char *x = strchr(name, '-'); | 225 char *x; |
226 | |
227 if (!name) | |
228 return NULL; | |
229 | |
230 x = strchr(name, '-'); | |
226 if (!x) return NULL; | 231 if (!x) return NULL; |
227 x = strchr(++x, '-'); | 232 x = strchr(++x, '-'); |
228 if (!x) return NULL; | 233 if (!x) return NULL; |
229 tmp = g_strdup(++x); | 234 tmp = g_strdup(++x); |
230 | 235 |
1875 return 1; | 1880 return 1; |
1876 } | 1881 } |
1877 | 1882 |
1878 if (args->reqclass & AIM_CAPS_CHAT) { | 1883 if (args->reqclass & AIM_CAPS_CHAT) { |
1879 char *name = extract_name(args->info.chat.roominfo.name); | 1884 char *name = extract_name(args->info.chat.roominfo.name); |
1880 int *exch = g_new0(int, 1); | 1885 int *exch; |
1886 | |
1887 if (!name) { | |
1888 /* Well, something weird must've happened here, let's run to church */ | |
1889 debug_printf("somebody tried to kick you in the balls.\n"); | |
1890 return 0; | |
1891 } | |
1892 | |
1893 exch = g_new0(int, 1); | |
1881 GList *m = NULL; | 1894 GList *m = NULL; |
1882 m = g_list_append(m, g_strdup(name ? name : args->info.chat.roominfo.name)); | 1895 m = g_list_append(m, g_strdup(name ? name : args->info.chat.roominfo.name)); |
1883 *exch = args->info.chat.roominfo.exchange; | 1896 *exch = args->info.chat.roominfo.exchange; |
1884 m = g_list_append(m, exch); | 1897 m = g_list_append(m, exch); |
1885 serv_got_chat_invite(gc, | 1898 serv_got_chat_invite(gc, |