Wed, 11 Dec 2002 02:09:43 +0000
[gaim-migrate @ 4269]
spelling and such:
" <Smigs> what's the 'proper' terminology? 'Buddies List'
or 'Buddy List'? It's inconsistant, though I'm seeing
more of 'Buddy List' than 'Buddies List' (I'm willing
to go through and correct them :P)
<LSchiere> i'd say "Buddy List"
<Paco-Paco> buddy list
The "Buddies List" -> "Buddy List" corrections are
mostly in gg.c (plus all the .po's). Other typos have
been corrected that I saw as I went through:
"buddylist" -> "buddy list" (I also corrected the .po's
in another instance of this that had already been fixed
in the actual file)
"sucessfully" -> "successfully"
"communicating to" -> "communicating with"
"Pleae tryagain" -> "Please try again"
"this users profile" -> "this user's profile"
"passord" -> "password"
All adds up to a pretty big patch.. hopefully it's all
correct :)"
--Matthew Smith (smigs)
committer: Luke Schierer <lschiere@pidgin.im>
| 391 | 1 | #define GAIM_PLUGINS |
| 2 | #include "gaim.h" | |
| 3 | ||
| 4 | #include <stdlib.h> | |
| 5 | #include <time.h> | |
| 6 | ||
|
1047
783f8520d9a0
[gaim-migrate @ 1057]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
398
diff
changeset
|
7 | char *gaim_plugin_error(int); |
|
783f8520d9a0
[gaim-migrate @ 1057]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
398
diff
changeset
|
8 | |
|
783f8520d9a0
[gaim-migrate @ 1057]
Eric Warmenhoven <warmenhoven@yahoo.com>
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
c426f81e75ce
[gaim-migrate @ 408]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
396
diff
changeset
|
16 | error -= 2; |
| 391 | 17 | /* there's a 1 in 3 chance there *won't* be an error :) */ |
|
1047
783f8520d9a0
[gaim-migrate @ 1057]
Eric Warmenhoven <warmenhoven@yahoo.com>
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
c426f81e75ce
[gaim-migrate @ 408]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
396
diff
changeset
|
31 | case -1: |
|
1047
783f8520d9a0
[gaim-migrate @ 1057]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
398
diff
changeset
|
32 | return "MY BAD"; |
|
398
c426f81e75ce
[gaim-migrate @ 408]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
396
diff
changeset
|
33 | case -2: |
| 391 | 34 | return "Internal plugin error: exiting."; |
|
1047
783f8520d9a0
[gaim-migrate @ 1057]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
398
diff
changeset
|
35 | default: |
|
783f8520d9a0
[gaim-migrate @ 1057]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
398
diff
changeset
|
36 | return NULL; |
| 391 | 37 | } |
| 38 | } | |
| 39 | ||
| 3551 | 40 | struct gaim_plugin_description desc; |
| 41 | struct gaim_plugin_description *gaim_plugin_desc() { | |
| 42 | desc.api_version = PLUGIN_API_VERSION; | |
| 43 | desc.name = g_strdup("Error Tester"); | |
| 44 | desc.version = g_strdup(VERSION); | |
| 45 | desc.description = g_strdup("A plugin that causes error messages."); | |
| 46 | desc.authors = g_strdup("Eric Warmehoven <eric@warmenhoven.org>"); | |
| 47 | desc.url = g_strdup(WEBSITE); | |
| 48 | return &desc; | |
| 49 | } | |
| 50 | ||
| 391 | 51 | char *name() { |
|
396
fbdaa6b9fb14
[gaim-migrate @ 406]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
393
diff
changeset
|
52 | return "Error Tester " VERSION ; |
| 391 | 53 | } |
| 54 | ||
| 55 | char *description() { | |
| 56 | return "A nice little program that causes error messages"; | |
| 57 | } |