Mercurial > pidgin.yaz
annotate plugins/error.c @ 3458:66b1ad9782a9
[gaim-migrate @ 3506]
From KingAnt:
aim.h:
-Change the #defines for AIM client info so they're shorter.
-Add 2 #defines for ICQ--the first one (the default) is what Gaim
has been using, it was taken out of auth.c. The other is what an
ICQ 2002a client uses.
-Add an CLIENTINFO_ICQ_KNOWNGOOD
auth.c:
-Have the ICQ login use the given client info, rather than
using hard coded values.
oscar.c:
-Rename "gaim_caps" to "caps_aim" and added a "caps_icq," so
AIM and ICQ can have different capabilities.
-Make changes to gaim_parse_login so the ICQ sends ICQ client
info, and AIM sends AIM client info.
-Make changes to conninitdone_bos so only ICQ sets the privacy
flag and visibility mask. AIM sets this via SSI.
-Change a few calls to aim_bos_setprofile so ICQ does not
send a profile TLV, and so ICQ uses the ICQ caps and AIM uses
the AIM caps.
-Change a call to g_show_info_text so a pointer to the window
is not left haning around?
-Correctly set the occupied and do not disturb ICQ states.
This is how winicq does it.
-Correctly show winicq users as NA.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Wed, 28 Aug 2002 06:48:14 +0000 |
parents | ece2d1543b20 |
children | cd938f18f3f8 |
rev | line source |
---|---|
391 | 1 #define GAIM_PLUGINS |
2 #include "gaim.h" | |
3 | |
4 #include <stdlib.h> | |
5 #include <time.h> | |
6 | |
1047
ece2d1543b20
[gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
398
diff
changeset
|
7 char *gaim_plugin_error(int); |
ece2d1543b20
[gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
398
diff
changeset
|
8 |
ece2d1543b20
[gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
398
diff
changeset
|
9 char *gaim_plugin_init(GModule *handle) { |
391 | 10 int error; |
11 | |
12 /* so here, we load any callbacks, do the normal stuff */ | |
13 | |
14 srand(time(NULL)); | |
15 error = rand() % 3; | |
398
59d97cd251ff
[gaim-migrate @ 408]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
396
diff
changeset
|
16 error -= 2; |
391 | 17 /* there's a 1 in 3 chance there *won't* be an error :) */ |
1047
ece2d1543b20
[gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
398
diff
changeset
|
18 return gaim_plugin_error(error); |
391 | 19 } |
20 | |
21 void gaim_plugin_remove() { | |
22 /* this only gets called if we get loaded successfully, and then | |
23 * unloaded. */ | |
24 } | |
25 | |
26 char *gaim_plugin_error(int error) { | |
27 /* by the time we've gotten here, all our callbacks are removed. | |
28 * we just have to deal with what the error was (as defined by us) | |
29 * and do any other clean-up stuff we need to do. */ | |
30 switch (error) { | |
398
59d97cd251ff
[gaim-migrate @ 408]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
396
diff
changeset
|
31 case -1: |
1047
ece2d1543b20
[gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
398
diff
changeset
|
32 return "MY BAD"; |
398
59d97cd251ff
[gaim-migrate @ 408]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
396
diff
changeset
|
33 case -2: |
391 | 34 return "Internal plugin error: exiting."; |
1047
ece2d1543b20
[gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
398
diff
changeset
|
35 default: |
ece2d1543b20
[gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
398
diff
changeset
|
36 return NULL; |
391 | 37 } |
38 } | |
39 | |
40 char *name() { | |
396
b1d5c6ab7b0d
[gaim-migrate @ 406]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
393
diff
changeset
|
41 return "Error Tester " VERSION ; |
391 | 42 } |
43 | |
44 char *description() { | |
45 return "A nice little program that causes error messages"; | |
46 } |