annotate plugins/psychic.c @ 13951:614c56622453

[gaim-migrate @ 16496] Rename gaim_buffer.c and .h to circbuffer.c and .h committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 16 Jul 2006 19:08:31 +0000
parents 85267a333422
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12859
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
1
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
2
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
3 #include "internal.h"
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
4
12924
e841e23a334c [gaim-migrate @ 15277]
Christopher O'Brien <siege@pidgin.im>
parents: 12895
diff changeset
5 #include "account.h"
12859
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
6 #include "blist.h"
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
7 #include "conversation.h"
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
8 #include "debug.h"
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
9 #include "signals.h"
12924
e841e23a334c [gaim-migrate @ 15277]
Christopher O'Brien <siege@pidgin.im>
parents: 12895
diff changeset
10 #include "status.h"
12859
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
11 #include "version.h"
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
12
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
13 #include "plugin.h"
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
14 #include "pluginpref.h"
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
15 #include "prefs.h"
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
16
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
17
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
18 #define PLUGIN_ID "core-psychic"
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
19 #define PLUGIN_NAME N_("Psychic Mode")
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
20 #define PLUGIN_SUMMARY N_("Psychic mode for incoming conversation")
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
21 #define PLUGIN_DESC N_("Causes conversation windows to appear as other" \
13247
c1a75785c8f2 [gaim-migrate @ 15613]
Mark Doliner <mark@kingant.net>
parents: 12925
diff changeset
22 " users begin to message you. This works for" \
c1a75785c8f2 [gaim-migrate @ 15613]
Mark Doliner <mark@kingant.net>
parents: 12925
diff changeset
23 " AIM, ICQ, Jabber, Sametime, and Yahoo!")
12859
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
24 #define PLUGIN_AUTHOR "Christopher O'Brien <siege@preoccupied.net>"
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
25
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
26
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
27 #define PREFS_BASE "/plugins/core/psychic"
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
28 #define PREF_BUDDIES PREFS_BASE "/buddies_only"
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
29 #define PREF_NOTICE PREFS_BASE "/show_notice"
12924
e841e23a334c [gaim-migrate @ 15277]
Christopher O'Brien <siege@pidgin.im>
parents: 12895
diff changeset
30 #define PREF_STATUS PREFS_BASE "/activate_online"
12859
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
31
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
32
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
33 static void
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
34 buddy_typing_cb(GaimAccount *acct, const char *name, void *data) {
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
35 GaimConversation *gconv;
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
36
12924
e841e23a334c [gaim-migrate @ 15277]
Christopher O'Brien <siege@pidgin.im>
parents: 12895
diff changeset
37 if(gaim_prefs_get_bool(PREF_STATUS) &&
12925
fd734d1fb2f4 [gaim-migrate @ 15278]
Christopher O'Brien <siege@pidgin.im>
parents: 12924
diff changeset
38 ! gaim_status_is_available(gaim_account_get_active_status(acct))) {
13683
59a86d70825b [gaim-migrate @ 16086]
Ethan Blanton <elb@pidgin.im>
parents: 13476
diff changeset
39 gaim_debug_info("psychic", "not available, doing nothing\n");
12924
e841e23a334c [gaim-migrate @ 15277]
Christopher O'Brien <siege@pidgin.im>
parents: 12895
diff changeset
40 return;
e841e23a334c [gaim-migrate @ 15277]
Christopher O'Brien <siege@pidgin.im>
parents: 12895
diff changeset
41 }
e841e23a334c [gaim-migrate @ 15277]
Christopher O'Brien <siege@pidgin.im>
parents: 12895
diff changeset
42
e841e23a334c [gaim-migrate @ 15277]
Christopher O'Brien <siege@pidgin.im>
parents: 12895
diff changeset
43 if(gaim_prefs_get_bool(PREF_BUDDIES) &&
e841e23a334c [gaim-migrate @ 15277]
Christopher O'Brien <siege@pidgin.im>
parents: 12895
diff changeset
44 ! gaim_find_buddy(acct, name)) {
13683
59a86d70825b [gaim-migrate @ 16086]
Ethan Blanton <elb@pidgin.im>
parents: 13476
diff changeset
45 gaim_debug_info("psychic", "not in blist, doing nothing\n");
12924
e841e23a334c [gaim-migrate @ 15277]
Christopher O'Brien <siege@pidgin.im>
parents: 12895
diff changeset
46 return;
12859
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
47 }
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
48
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
49 gconv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, name, acct);
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
50 if(! gconv) {
13683
59a86d70825b [gaim-migrate @ 16086]
Ethan Blanton <elb@pidgin.im>
parents: 13476
diff changeset
51 gaim_debug_info("psychic", "no previous conversation exists\n");
12859
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
52 gconv = gaim_conversation_new(GAIM_CONV_TYPE_IM, acct, name);
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
53 gaim_conversation_present(gconv);
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
54
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
55 if(gaim_prefs_get_bool(PREF_NOTICE)) {
12861
6cc43e23ad36 [gaim-migrate @ 15212]
Christopher O'Brien <siege@pidgin.im>
parents: 12859
diff changeset
56 gaim_conversation_write(gconv, NULL,
13700
85267a333422 [gaim-migrate @ 16103]
Richard Laager <rlaager@wiktel.com>
parents: 13683
diff changeset
57 /* This is a quote from Star Wars. You should
85267a333422 [gaim-migrate @ 16103]
Richard Laager <rlaager@wiktel.com>
parents: 13683
diff changeset
58 probably not translate it literally. If
85267a333422 [gaim-migrate @ 16103]
Richard Laager <rlaager@wiktel.com>
parents: 13683
diff changeset
59 you can't find a fitting cultural reference
85267a333422 [gaim-migrate @ 16103]
Richard Laager <rlaager@wiktel.com>
parents: 13683
diff changeset
60 in your language, consider translating
85267a333422 [gaim-migrate @ 16103]
Richard Laager <rlaager@wiktel.com>
parents: 13683
diff changeset
61 something like this instead:
85267a333422 [gaim-migrate @ 16103]
Richard Laager <rlaager@wiktel.com>
parents: 13683
diff changeset
62 "You feel a new message coming." */
12861
6cc43e23ad36 [gaim-migrate @ 15212]
Christopher O'Brien <siege@pidgin.im>
parents: 12859
diff changeset
63 _("You feel a disturbance in the force..."),
13476
465c368366f8 [gaim-migrate @ 15852]
Richard Laager <rlaager@wiktel.com>
parents: 13247
diff changeset
64 GAIM_MESSAGE_SYSTEM | GAIM_MESSAGE_NO_LOG | GAIM_MESSAGE_ACTIVE_ONLY,
12895
a355472257f4 [gaim-migrate @ 15248]
Richard Laager <rlaager@wiktel.com>
parents: 12861
diff changeset
65 time(NULL));
12859
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
66 }
13247
c1a75785c8f2 [gaim-migrate @ 15613]
Mark Doliner <mark@kingant.net>
parents: 12925
diff changeset
67
c1a75785c8f2 [gaim-migrate @ 15613]
Mark Doliner <mark@kingant.net>
parents: 12925
diff changeset
68 gaim_conv_im_set_typing_state(GAIM_CONV_IM(gconv), GAIM_TYPING);
12859
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
69 }
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
70 }
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
71
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
72
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
73 static GaimPluginPrefFrame *
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
74 get_plugin_pref_frame(GaimPlugin *plugin) {
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
75
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
76 GaimPluginPrefFrame *frame;
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
77 GaimPluginPref *pref;
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
78
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
79 frame = gaim_plugin_pref_frame_new();
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
80
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
81 pref = gaim_plugin_pref_new_with_name(PREF_BUDDIES);
12924
e841e23a334c [gaim-migrate @ 15277]
Christopher O'Brien <siege@pidgin.im>
parents: 12895
diff changeset
82 gaim_plugin_pref_set_label(pref, _("Only enable for users on"
e841e23a334c [gaim-migrate @ 15277]
Christopher O'Brien <siege@pidgin.im>
parents: 12895
diff changeset
83 " the buddy list"));
e841e23a334c [gaim-migrate @ 15277]
Christopher O'Brien <siege@pidgin.im>
parents: 12895
diff changeset
84 gaim_plugin_pref_frame_add(frame, pref);
e841e23a334c [gaim-migrate @ 15277]
Christopher O'Brien <siege@pidgin.im>
parents: 12895
diff changeset
85
e841e23a334c [gaim-migrate @ 15277]
Christopher O'Brien <siege@pidgin.im>
parents: 12895
diff changeset
86 pref = gaim_plugin_pref_new_with_name(PREF_STATUS);
e841e23a334c [gaim-migrate @ 15277]
Christopher O'Brien <siege@pidgin.im>
parents: 12895
diff changeset
87 gaim_plugin_pref_set_label(pref, _("Disable when away"));
12859
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
88 gaim_plugin_pref_frame_add(frame, pref);
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
89
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
90 pref = gaim_plugin_pref_new_with_name(PREF_NOTICE);
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
91 gaim_plugin_pref_set_label(pref, _("Display notification message in"
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
92 " conversations"));
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
93 gaim_plugin_pref_frame_add(frame, pref);
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
94
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
95 return frame;
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
96 }
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
97
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
98
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
99 static gboolean
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
100 plugin_load(GaimPlugin *plugin) {
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
101
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
102 void *convs_handle;
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
103 convs_handle = gaim_conversations_get_handle();
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
104
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
105 gaim_signal_connect(convs_handle, "buddy-typing", plugin,
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
106 GAIM_CALLBACK(buddy_typing_cb), NULL);
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
107
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
108 return TRUE;
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
109 }
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
110
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
111
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
112 static GaimPluginUiInfo prefs_info = {
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
113 get_plugin_pref_frame,
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
114 0, /* page_num (Reserved) */
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
115 NULL, /* frame (Reserved) */
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
116 };
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
117
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
118
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
119 static GaimPluginInfo info = {
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
120 GAIM_PLUGIN_MAGIC,
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
121 GAIM_MAJOR_VERSION,
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
122 GAIM_MINOR_VERSION,
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
123 GAIM_PLUGIN_STANDARD, /**< type */
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
124 NULL, /**< ui_requirement */
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
125 0, /**< flags */
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
126 NULL, /**< dependencies */
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
127 GAIM_PRIORITY_DEFAULT, /**< priority */
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
128
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
129 PLUGIN_ID, /**< id */
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
130 PLUGIN_NAME, /**< name */
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
131 VERSION, /**< version */
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
132 PLUGIN_SUMMARY, /**< summary */
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
133 PLUGIN_DESC, /**< description */
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
134 PLUGIN_AUTHOR, /**< author */
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
135 GAIM_WEBSITE, /**< homepage */
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
136
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
137 plugin_load, /**< load */
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
138 NULL, /**< unload */
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
139 NULL, /**< destroy */
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
140
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
141 NULL, /**< ui_info */
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
142 NULL, /**< extra_info */
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
143 &prefs_info, /**< prefs_info */
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
144 NULL, /**< actions */
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
145 };
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
146
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
147
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
148 static void
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
149 init_plugin(GaimPlugin *plugin) {
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
150 gaim_prefs_add_none(PREFS_BASE);
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
151 gaim_prefs_add_bool(PREF_BUDDIES, FALSE);
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
152 gaim_prefs_add_bool(PREF_NOTICE, TRUE);
12924
e841e23a334c [gaim-migrate @ 15277]
Christopher O'Brien <siege@pidgin.im>
parents: 12895
diff changeset
153 gaim_prefs_add_bool(PREF_STATUS, TRUE);
12859
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
154 }
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
155
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
156
02e1ef5bc3d5 [gaim-migrate @ 15210]
Christopher O'Brien <siege@pidgin.im>
parents:
diff changeset
157 GAIM_INIT_PLUGIN(psychic, init_plugin, info)