Mercurial > pidgin
comparison libgaim/protocols/qq/sys_msg.c @ 14629:6b8bc59414f0
[gaim-migrate @ 17375]
Get rid of these useless checks.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Huetsch <markhuetsch> |
---|---|
date | Tue, 26 Sep 2006 22:54:24 +0000 |
parents | 3c58357772a2 |
children | c039c920e11c |
comparison
equal
deleted
inserted
replaced
14628:58202142e9ad | 14629:6b8bc59414f0 |
---|---|
50 { | 50 { |
51 GaimLog *log; | 51 GaimLog *log; |
52 GaimAccount *account; | 52 GaimAccount *account; |
53 | 53 |
54 account = gaim_connection_get_account(gc); | 54 account = gaim_connection_get_account(gc); |
55 g_return_if_fail(gc != NULL && gc->proto_data != NULL); | |
56 | 55 |
57 log = gaim_log_new(GAIM_LOG_IM, | 56 log = gaim_log_new(GAIM_LOG_IM, |
58 "systemim", | 57 "systemim", |
59 account, | 58 account, |
60 NULL, | 59 NULL, |
139 GaimBuddy *b; | 138 GaimBuddy *b; |
140 guint32 uid; | 139 guint32 uid; |
141 gc_and_uid *g; | 140 gc_and_uid *g; |
142 gchar *name; | 141 gchar *name; |
143 | 142 |
144 g_return_if_fail(gc != NULL && from != NULL && to != NULL); | 143 g_return_if_fail(from != NULL && to != NULL); |
145 | 144 |
146 uid = strtol(from, NULL, 10); | 145 uid = strtol(from, NULL, 10); |
147 name = uid_to_gaim_name(uid); | 146 name = uid_to_gaim_name(uid); |
148 b = gaim_find_buddy(gc->account, name); | 147 b = gaim_find_buddy(gc->account, name); |
149 g_free(name); | 148 g_free(name); |
171 /* you are rejected by the person */ | 170 /* you are rejected by the person */ |
172 static void _qq_process_msg_sys_add_contact_rejected(GaimConnection *gc, gchar *from, gchar *to, gchar *msg_utf8) | 171 static void _qq_process_msg_sys_add_contact_rejected(GaimConnection *gc, gchar *from, gchar *to, gchar *msg_utf8) |
173 { | 172 { |
174 gchar *message, *reason; | 173 gchar *message, *reason; |
175 | 174 |
176 g_return_if_fail(gc != NULL && from != NULL && to != NULL); | 175 g_return_if_fail(from != NULL && to != NULL); |
177 | 176 |
178 message = g_strdup_printf(_("User %s rejected your request"), from); | 177 message = g_strdup_printf(_("User %s rejected your request"), from); |
179 reason = g_strdup_printf(_("Reason: %s"), msg_utf8); | 178 reason = g_strdup_printf(_("Reason: %s"), msg_utf8); |
180 _qq_sys_msg_log_write(gc, message, from); | 179 _qq_sys_msg_log_write(gc, message, from); |
181 | 180 |
188 static void _qq_process_msg_sys_add_contact_approved(GaimConnection *gc, gchar *from, gchar *to, gchar *msg_utf8) | 187 static void _qq_process_msg_sys_add_contact_approved(GaimConnection *gc, gchar *from, gchar *to, gchar *msg_utf8) |
189 { | 188 { |
190 gchar *message; | 189 gchar *message; |
191 qq_data *qd; | 190 qq_data *qd; |
192 | 191 |
193 g_return_if_fail(gc != NULL && from != NULL && to != NULL); | 192 g_return_if_fail(from != NULL && to != NULL); |
194 | 193 |
195 qd = (qq_data *) gc->proto_data; | 194 qd = (qq_data *) gc->proto_data; |
196 qq_add_buddy_by_recv_packet(gc, strtol(from, NULL, 10), TRUE, TRUE); | 195 qq_add_buddy_by_recv_packet(gc, strtol(from, NULL, 10), TRUE, TRUE); |
197 | 196 |
198 message = g_strdup_printf(_("User %s has approved your request"), from); | 197 message = g_strdup_printf(_("User %s has approved your request"), from); |
209 guint32 uid; | 208 guint32 uid; |
210 gc_and_uid *g, *g2; | 209 gc_and_uid *g, *g2; |
211 GaimBuddy *b; | 210 GaimBuddy *b; |
212 gchar *name; | 211 gchar *name; |
213 | 212 |
214 g_return_if_fail(gc != NULL && from != NULL && to != NULL); | 213 g_return_if_fail(from != NULL && to != NULL); |
215 | 214 |
216 uid = strtol(from, NULL, 10); | 215 uid = strtol(from, NULL, 10); |
217 g = g_new0(gc_and_uid, 1); | 216 g = g_new0(gc_and_uid, 1); |
218 g->gc = gc; | 217 g->gc = gc; |
219 g->uid = uid; | 218 g->uid = uid; |
256 qq_data *qd; | 255 qq_data *qd; |
257 gint len; | 256 gint len; |
258 guint8 *data; | 257 guint8 *data; |
259 gchar **segments, *code, *from, *to, *msg, *msg_utf8; | 258 gchar **segments, *code, *from, *to, *msg, *msg_utf8; |
260 | 259 |
261 g_return_if_fail(gc != NULL && gc->proto_data != NULL); | |
262 g_return_if_fail(buf != NULL && buf_len != 0); | 260 g_return_if_fail(buf != NULL && buf_len != 0); |
263 | 261 |
264 qd = (qq_data *) gc->proto_data; | 262 qd = (qq_data *) gc->proto_data; |
265 len = buf_len; | 263 len = buf_len; |
266 data = g_newa(guint8, len); | 264 data = g_newa(guint8, len); |