comparison src/protocols/msn/error.c @ 5309:e2e53316a21d

[gaim-migrate @ 5681] Announcing the new MSN prpl! It probably has some bugs, and for the time being, there is no file transfer. That's good though, because the current MSN file transfer is a little broken. I've had many corrupted files. I'll commit new file transfer code when it's written. I want this heavily tested before 0.63! If you use MSN, please talk to people on it. Let me know of any oddities, crashes, bugs, whatever. I'll fix things as I find them. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Tue, 06 May 2003 02:06:56 +0000
parents
children ad445074d239
comparison
equal deleted inserted replaced
5308:6aa785e55d0f 5309:e2e53316a21d
1 /**
2 * @file error.c Error functions
3 *
4 * gaim
5 *
6 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22 #include "msn.h"
23
24 const char *
25 msn_error_get_text(unsigned int type)
26 {
27 static char msg[MSN_BUF_LEN];
28
29 switch (type) {
30 case 200:
31 g_snprintf(msg, sizeof(msg),
32 _("Syntax Error (probably a Gaim bug)"));
33 break;
34 case 201:
35 g_snprintf(msg, sizeof(msg),
36 _("Invalid Parameter (probably a Gaim bug)"));
37 break;
38 case 205:
39 g_snprintf(msg, sizeof(msg), _("Invalid User"));
40 break;
41 case 206:
42 g_snprintf(msg, sizeof(msg),
43 _("Fully Qualified Domain Name missing"));
44 break;
45 case 207:
46 g_snprintf(msg, sizeof(msg), _("Already Login"));
47 break;
48 case 208:
49 g_snprintf(msg, sizeof(msg), _("Invalid Username"));
50 break;
51 case 209:
52 g_snprintf(msg, sizeof(msg), _("Invalid Friendly Name"));
53 break;
54 case 210:
55 g_snprintf(msg, sizeof(msg), _("List Full"));
56 break;
57 case 215:
58 g_snprintf(msg, sizeof(msg), _("Already there"));
59 break;
60 case 216:
61 g_snprintf(msg, sizeof(msg), _("Not on list"));
62 break;
63 case 217:
64 g_snprintf(msg, sizeof(msg), _("User is offline"));
65 break;
66 case 218:
67 g_snprintf(msg, sizeof(msg), _("Already in the mode"));
68 break;
69 case 219:
70 g_snprintf(msg, sizeof(msg), _("Already in opposite list"));
71 break;
72 case 231:
73 g_snprintf(msg, sizeof(msg),
74 _("Tried to add a contact to a group "
75 "that doesn't exist"));
76 break;
77 case 280:
78 g_snprintf(msg, sizeof(msg), _("Switchboard failed"));
79 break;
80 case 281:
81 g_snprintf(msg, sizeof(msg), _("Notify Transfer failed"));
82 break;
83
84 case 300:
85 g_snprintf(msg, sizeof(msg), _("Required fields missing"));
86 break;
87 case 302:
88 g_snprintf(msg, sizeof(msg), _("Not logged in"));
89 break;
90
91 case 500:
92 g_snprintf(msg, sizeof(msg), _("Internal server error"));
93 break;
94 case 501:
95 g_snprintf(msg, sizeof(msg), _("Database server error"));
96 break;
97 case 510:
98 g_snprintf(msg, sizeof(msg), _("File operation error"));
99 break;
100 case 520:
101 g_snprintf(msg, sizeof(msg), _("Memory allocation error"));
102 break;
103 case 540:
104 g_snprintf(msg, sizeof(msg), _("Wrong CHL value sent to server"));
105 break;
106
107 case 600:
108 g_snprintf(msg, sizeof(msg), _("Server busy"));
109 break;
110 case 601:
111 g_snprintf(msg, sizeof(msg), _("Server unavailable"));
112 break;
113 case 602:
114 g_snprintf(msg, sizeof(msg), _("Peer Notification server down"));
115 break;
116 case 603:
117 g_snprintf(msg, sizeof(msg), _("Database connect error"));
118 break;
119 case 604:
120 g_snprintf(msg, sizeof(msg),
121 _("Server is going down (abandon ship)"));
122 break;
123
124 case 707:
125 g_snprintf(msg, sizeof(msg), _("Error creating connection"));
126 break;
127 case 710:
128 g_snprintf(msg, sizeof(msg),
129 _("CVR parameters are either unknown or not allowed"));
130 break;
131 case 711:
132 g_snprintf(msg, sizeof(msg), _("Unable to write"));
133 break;
134 case 712:
135 g_snprintf(msg, sizeof(msg), _("Session overload"));
136 break;
137 case 713:
138 g_snprintf(msg, sizeof(msg), _("User is too active"));
139 break;
140 case 714:
141 g_snprintf(msg, sizeof(msg), _("Too many sessions"));
142 break;
143 case 715:
144 g_snprintf(msg, sizeof(msg), _("Not expected"));
145 break;
146 case 717:
147 g_snprintf(msg, sizeof(msg), _("Bad friend file"));
148 break;
149
150 case 911:
151 g_snprintf(msg, sizeof(msg), _("Authentication failed"));
152 break;
153 case 913:
154 g_snprintf(msg, sizeof(msg), _("Not allowed when offline"));
155 break;
156 case 920:
157 g_snprintf(msg, sizeof(msg), _("Not accepting new users"));
158 break;
159 case 924:
160 g_snprintf(msg, sizeof(msg),
161 _("Passport account not yet verified"));
162 break;
163
164 default:
165 g_snprintf(msg, sizeof(msg), _("Unknown Error Code %d"), type);
166 break;
167 }
168
169 return msg;
170 }
171
172 void
173 msn_error_handle(unsigned int type)
174 {
175 const char *text;
176
177 text = msn_error_get_text(type);
178
179 do_error_dialog(text, NULL, GAIM_ERROR);
180 }