comparison plugins/SIGNALS @ 1000:91b7377e7b45

[gaim-migrate @ 1010] Plugins work again, I think. There may still be some bugginess. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 16 Oct 2000 20:11:18 +0000
parents 15d005f8baaf
children daad2440a642
comparison
equal deleted inserted replaced
999:0b5db8cdd30f 1000:91b7377e7b45
7 event_im_send, 7 event_im_send,
8 event_buddy_signon, 8 event_buddy_signon,
9 event_buddy_signoff, 9 event_buddy_signoff,
10 event_buddy_away, 10 event_buddy_away,
11 event_buddy_back, 11 event_buddy_back,
12 event_buddy_idle,
13 event_buddy_unidle,
12 event_blist_update, 14 event_blist_update,
13 event_chat_invited, 15 event_chat_invited,
14 event_chat_join, 16 event_chat_join,
15 event_chat_leave, 17 event_chat_leave,
16 event_chat_buddy_join, 18 event_chat_buddy_join,
49 one. Sorry, that's just the way it works. 51 one. Sorry, that's just the way it works.
50 52
51 So here are the args that get passed to your functions in various events: 53 So here are the args that get passed to your functions in various events:
52 54
53 event_signon: 55 event_signon:
54 (none) 56 struct gaim_connection *gc
55 57
56 Note that you can get the username (which would probably be the only 58 'gc' is the new connection.
57 useful information here) from other places. (Read gaim.h for details.)
58 59
59 event_signoff: 60 event_signoff:
60 (none) 61 struct gaim_connection *gc
62
63 'gc' is the connection that is about to go offline. This is called before
64 serv_close is, so you still have a chance to get one last message out.
61 65
62 event_away: 66 event_away:
63 (none) 67 (none)
64 68
65 Note that the away message that's being used can be retrieved from a 69 This is fucked up for now. Currently all connections are told to use the
66 global variable. (Read gaim.h for details.) 70 same away message when the user wants to be Away. The away message that
71 is used can be obtained from global variables.
67 72
68 event_back: 73 event_back:
69 (none) 74 (none)
70 75
71 event_im_recv: 76 event_im_recv:
72 char **who, char **text 77 struct gaim_connection *gc, char **who, char **text
73 78
79 'gc' is the connection that received the message.
74 'who' is the username of the person who sent the message. 80 'who' is the username of the person who sent the message.
75 'text' is the actual strict text (with HTML tags and all) of the 81 'text' is the actual strict text (with HTML tags and all) of the
76 message they sent. 82 message they sent.
77 83
78 Note that you can modify these values. (You are encouraged to do so!) 84 Note that you can modify these values. (You are encouraged to do so!)
79 Note that *other* plugins can also modify these values, so you should 85 Note that *other* plugins can also modify these values, so you should
80 check that they are not NULL, and try not to leave them as NULL. 86 check that they are not NULL, and try not to leave them as NULL.
81 87
88 gc was placed as the first arg as opposed to the third for intuitiveness.
89 Unfortunately, it means that most plugins that use this event need to be
90 slightly modified and then recompiled.
91
82 event_im_send: 92 event_im_send:
83 char *who, char **text 93 struct gaim_connection *gc, char *who, char **text
84 94
95 'gc' is the connection that you are about to send the message through.
85 'who' is the username of the person you're sending the message to. 96 'who' is the username of the person you're sending the message to.
86 'text' is the actual strict text (with HTML tags and all) of the 97 'text' is the actual strict text (with HTML tags and all) of the
87 message you're sending. 98 message you're sending.
88 99
89 Note that you can modify outgoing text. (You are _not_ encouraged to 100 Note that you can modify outgoing text. (You are _not_ encouraged to
90 do so ;-) .) 101 do so ;-) .)
91 102
92 event_buddy_signon: 103 event_buddy_signon:
93 char *who 104 char *who
94 105
95 'who' is who signed on. 106 'who' is who signed on. (There is currently no way to see which connection
107 reported that the buddy came online. Hopefully this will happen soon.)
96 108
97 event_buddy_signoff: 109 event_buddy_signoff:
98 char *who 110 char *who
99 111
100 'who' is who signed off. 112 'who' is who signed off.
106 118
107 event_buddy_back: 119 event_buddy_back:
108 char *who 120 char *who
109 121
110 'who' is who is no longer away. 122 'who' is who is no longer away.
123
124 event_buddy_idle:
125 char *who
126
127 'who' is who went idle.
128
129 event_buddy_unidle:
130 char *who
131
132 'who' is who is no longer idle.
111 133
112 event_blist_update: 134 event_blist_update:
113 (none) 135 (none)
114 136
115 This event is called when the buddylist is updated (automatically every 137 This event is called when the buddylist is updated (automatically every
116 20 seconds) 138 20 seconds for every connection, though the updates are usually syncopated)
117 139
118 event_chat_invited: 140 event_chat_invited:
119 char *who, char *room, char *message 141 struct gaim_connection *gc, char *who, char *room, char *message
120 142
143 'gc' is the connection that received the invitation.
121 'who' is who invited you to a chat room. 144 'who' is who invited you to a chat room.
122 'room' is the room they invited you to. 145 'room' is the room they invited you to.
123 'message' is the (optional) message they sent to invite you, and may be 146 'message' is the (optional) message they sent to invite you, and may be
124 an empty string. 147 an empty string.
125 148
126 event_chat_join: 149 event_chat_join:
127 char *room 150 struct gaim_connection *gc, char *room
128 151
152 'gc' is the connection that joined the room.
129 'room' is the chat room that you have just joined. 153 'room' is the chat room that you have just joined.
130 154
131 event_chat_leave: 155 event_chat_leave:
132 char *room 156 struct gaim_connection *gc, char *room
133 157
158 'gc' is the connection that joined the room.
134 'room' is the chat room that you have just left. 159 'room' is the chat room that you have just left.
135 160
136 event_chat_buddy_join: 161 event_chat_buddy_join:
137 char *room, char *who 162 struct gaim_connection *gc, char *room, char *who
138 163
164 'gc' is the connection that the chat room is attached to.
139 'room' is the room the person joined. 165 'room' is the room the person joined.
140 'who' is the screenname of the person who joined. 166 'who' is the screenname of the person who joined.
141 167
142 This is also triggered upon entering the room for every person in the 168 This is also triggered upon entering the room for every person in the
143 room, including yourself. (E.g. if you join a room that already had 3 169 room, including yourself. (E.g. if you join a room that already had 3
144 people in it this will be called 4 times, once for each of them and 170 people in it this will be called 4 times, once for each of them and
145 once again for you. You will not always be the last one this is called 171 once again for you. You will not always be the last one this is called
146 for though.) 172 for though.)
147 173
148 event_chat_buddy_leave: 174 event_chat_buddy_leave:
149 char *room, char *who 175 struct gaim_connection *gc, char *room, char *who
150 176
177 'gc' is the connection that the chat room is attached to.
151 'room' is the room the person left. 178 'room' is the room the person left.
152 'who' is the screenname of the person who left. 179 'who' is the screenname of the person who left.
153 180
154 event_chat_recv: 181 event_chat_recv:
155 char *room, char *who, char *text 182 struct gaim_connection *gc, char *room, char *who, char *text
156 183
184 'gc' is the connection that received the message.
157 'room' should be obvious by now. 185 'room' should be obvious by now.
158 'who' should be too. 186 'who' should be too.
159 'text' is the message that got sent. 187 'text' is the message that got sent.
160 188
161 Note that because of the bizarre way chat works, you also receive 189 Note that because of the bizarre way chat works, you also receive
162 messages that you send. I didn't design it, AOL did. 190 messages that you send. I didn't design it, AOL did.
163 191
164 event_chat_send: 192 event_chat_send:
165 char *room, char **text 193 struct gaim_connection *gc, char *room, char **text
166 194
195 'gc' is the connection that the message is about to be sent on.
167 'room'. Need I say more. 196 'room'. Need I say more.
168 'text' is what you're about to say, linkified/HTML-ized, but not 197 'text' is what you're about to say, linkified/HTML-ized, but not
169 TOC-escaped. 198 TOC-escaped.
170 199
171 Be aware that you receive messages you send (as noted above). This 200 Be aware that you receive messages you send (as noted above). This