1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
5 * Copyright (C) 1998-2001, Mark Spencer <markster@marko.net>
6 * Some code borrowed from GtkZephyr, by
7 * Jag/Sean Dilda <agrajag@linuxpower.org>/<smdilda@unity.ncsu.edu>
8 * http://gtkzephyr.linuxpower.org/
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
35 #include "zephyr/zephyr.h"
37 extern Code_t
ZGetLocations(ZLocations_t
*, int *);
38 extern Code_t
ZSetLocation(char *);
39 extern Code_t
ZUnsetLocation();
41 typedef struct _zframe zframe
;
42 typedef struct _zephyr_triple zephyr_triple
;
44 /* struct I need for zephyr_to_html */
46 /* true for everything but @color, since inside the parens of that one is
49 /* </i>, </font>, </b>, etc. */
51 /* text including the opening html thingie. */
53 struct _zframe
*enclosing
;
56 struct _zephyr_triple
{
65 static char *zephyr_name()
70 #define z_call(func) if (func != ZERR_NONE)\
72 #define z_call_r(func) if (func != ZERR_NONE)\
74 #define z_call_s(func, err) if (func != ZERR_NONE) {\
75 hide_login_progress(zgc, err);\
80 static char *zephyr_normalize(const char *);
82 /* this is so bad, and if Zephyr weren't so fucked up to begin with I
83 * wouldn't do this. but it is so i will. */
84 static guint32 nottimer
= 0;
85 static guint32 loctimer
= 0;
86 struct gaim_connection
*zgc
= NULL
;
87 static GList
*pending_zloc_names
= NULL
;
88 static GSList
*subscrips
= NULL
;
89 static int last_id
= 0;
92 static void handle_unknown(ZNotice_t notice)
94 g_print("z_packet: %s\n", notice.z_packet);
95 g_print("z_version: %s\n", notice.z_version);
96 g_print("z_kind: %d\n", notice.z_kind);
97 g_print("z_class: %s\n", notice.z_class);
98 g_print("z_class_inst: %s\n", notice.z_class_inst);
99 g_print("z_opcode: %s\n", notice.z_opcode);
100 g_print("z_sender: %s\n", notice.z_sender);
101 g_print("z_recipient: %s\n", notice.z_recipient);
102 g_print("z_message: %s\n", notice.z_message);
103 g_print("z_message_len: %d\n", notice.z_message_len);
108 static zephyr_triple
*new_triple(const char *c
, const char *i
, const char *r
)
111 zt
= g_new0(zephyr_triple
, 1);
112 zt
->class = g_strdup(c
);
113 zt
->instance
= g_strdup(i
);
114 zt
->recipient
= g_strdup(r
);
115 zt
->name
= g_strdup_printf("%s,%s,%s", c
, i
, r
);
121 static void free_triple(zephyr_triple
*zt
)
124 g_free(zt
->instance
);
125 g_free(zt
->recipient
);
130 /* returns true if zt1 is a subset of zt2, i.e. zt2 has the same thing or
131 * wildcards in each field of zt1. */
132 static gboolean
triple_subset(zephyr_triple
*zt1
, zephyr_triple
*zt2
)
134 if (g_strcasecmp(zt2
->class, zt1
->class) &&
135 g_strcasecmp(zt2
->class, "*")) {
138 if (g_strcasecmp(zt2
->instance
, zt1
->instance
) &&
139 g_strcasecmp(zt2
->instance
, "*")) {
142 if (g_strcasecmp(zt2
->recipient
, zt1
->recipient
) &&
143 g_strcasecmp(zt2
->recipient
, "*")) {
149 static zephyr_triple
*find_sub_by_triple(zephyr_triple
*zt
)
151 zephyr_triple
*curr_t
;
152 GSList
*curr
= subscrips
;
155 if (triple_subset(zt
, curr_t
))
162 static zephyr_triple
*find_sub_by_id(int id
)
165 GSList
*curr
= subscrips
;
175 /* utility macros that are useful for zephyr_to_html */
177 #define IS_OPENER(c) ((c == '{') || (c == '[') || (c == '(') || (c == '<'))
178 #define IS_CLOSER(c) ((c == '}') || (c == ']') || (c == ')') || (c == '>'))
180 /* this parses zephyr formatting and converts it to html. For example, if
181 * you pass in "@{@color(blue)@i(hello)}" you should get out
182 * "<font color=blue><i>hello</i></font>". */
183 static char *zephyr_to_html(char *message
)
186 zframe
*frames
, *curr
;
189 frames
= g_new(zframe
, 1);
190 frames
->text
= g_string_new("");
191 frames
->enclosing
= NULL
;
192 frames
->closing
= "";
193 frames
->has_closer
= FALSE
;
195 len
= strlen(message
);
198 if (message
[cnt
] == '@') {
202 for (end
=1; (cnt
+end
) <= len
&&
203 !IS_OPENER(message
[cnt
+end
]); end
++);
204 buf
= g_new0(char, end
);
206 g_snprintf(buf
, end
, "%s", message
+cnt
+1);
208 if (!g_strcasecmp(buf
, "italic") ||
209 !g_strcasecmp(buf
, "i")) {
210 new_f
= g_new(zframe
, 1);
211 new_f
->enclosing
= frames
;
212 new_f
->text
= g_string_new("<i>");
213 new_f
->closing
= "</i>";
214 new_f
->has_closer
= TRUE
;
216 cnt
+= end
+1; /* cnt points to char after opener */
217 } else if (!g_strcasecmp(buf
, "bold")
218 || !g_strcasecmp(buf
, "b")) {
219 new_f
= g_new(zframe
, 1);
220 new_f
->enclosing
= frames
;
221 new_f
->text
= g_string_new("<b>");
222 new_f
->closing
= "</b>";
223 new_f
->has_closer
= TRUE
;
226 } else if (!g_strcasecmp(buf
, "color")) {
228 new_f
= g_new(zframe
, 1);
229 new_f
->enclosing
= frames
;
230 new_f
->text
= g_string_new("<font color=");
231 for (; (cnt
<= len
) && !IS_CLOSER(message
[cnt
]); cnt
++) {
232 g_string_append_c(new_f
->text
, message
[cnt
]);
234 cnt
++; /* point to char after closer */
235 g_string_append_c(new_f
->text
, '>');
236 new_f
->closing
= "</font>";
237 new_f
->has_closer
= FALSE
;
239 } else if (!g_strcasecmp(buf
, "")) {
240 new_f
= g_new(zframe
, 1);
241 new_f
->enclosing
= frames
;
242 new_f
->text
= g_string_new("");
244 new_f
->has_closer
= TRUE
;
246 cnt
+= end
+1; /* cnt points to char after opener */
248 if ((cnt
+end
) > len
) {
249 g_string_append_c(frames
->text
, '@');
252 /* unrecognized thingie. act like it's not there, but we
253 * still need to take care of the corresponding closer,
254 * make a frame that does nothing. */
255 new_f
= g_new(zframe
, 1);
256 new_f
->enclosing
= frames
;
257 new_f
->text
= g_string_new("");
259 new_f
->has_closer
= TRUE
;
261 cnt
+= end
+1; /* cnt points to char after opener */
264 } else if (IS_CLOSER(message
[cnt
])) {
266 gboolean last_had_closer
;
267 if (frames
->enclosing
) {
270 frames
= frames
->enclosing
;
271 g_string_append(frames
->text
, popped
->text
->str
);
272 g_string_append(frames
->text
, popped
->closing
);
273 g_string_free(popped
->text
, TRUE
);
274 last_had_closer
= popped
->has_closer
;
276 } while (frames
&& frames
->enclosing
&& !last_had_closer
);
278 g_string_append_c(frames
->text
, message
[cnt
]);
281 } else if (message
[cnt
] == '\n') {
282 g_string_append(frames
->text
, "<br>");
285 g_string_append_c(frames
->text
, message
[cnt
++]);
288 /* go through all the stuff that they didn't close */
289 while (frames
->enclosing
) {
291 g_string_append(frames
->enclosing
->text
, frames
->text
->str
);
292 g_string_append(frames
->enclosing
->text
, frames
->closing
);
293 g_string_free(frames
->text
, TRUE
);
294 frames
= frames
->enclosing
;
297 ret
= frames
->text
->str
;
298 g_string_free(frames
->text
, FALSE
);
303 static gboolean
pending_zloc(char *who
)
306 for (curr
= pending_zloc_names
; curr
!= NULL
; curr
= curr
->next
) {
307 if (!g_strcasecmp(who
, (char*)curr
->data
)) {
308 g_free((char*)curr
->data
);
309 pending_zloc_names
= g_list_remove(pending_zloc_names
, curr
->data
);
316 static void handle_message(ZNotice_t notice
, struct sockaddr_in from
)
318 if (!g_strcasecmp(notice
.z_class
, LOGIN_CLASS
)) {
319 /* well, we'll be updating in 2 seconds anyway, might as well ignore this. */
320 } else if (!g_strcasecmp(notice
.z_class
, LOCATE_CLASS
)) {
321 if (!g_strcasecmp(notice
.z_opcode
, LOCATE_LOCATE
)) {
326 if (ZParseLocations(¬ice
, NULL
, &nlocs
, &user
) != ZERR_NONE
)
328 if ((b
= find_buddy(zgc
, user
)) == NULL
) {
329 char *e
= strchr(user
, '@');
331 b
= find_buddy(zgc
, user
);
337 if (pending_zloc(b
->name
)) {
340 GString
*str
= g_string_new("");
341 g_string_sprintfa(str
, "<b>User:</b> %s<br>"
342 "<b>Alias:</b> %s<br>",
345 g_string_sprintfa(str
, "<br>Hidden or not logged-in");
347 for (; nlocs
> 0; nlocs
--) {
348 ZGetLocations(&locs
, &one
);
349 g_string_sprintfa(str
, "<br>At %s since %s", locs
.host
,
352 g_show_info_text(NULL
, NULL
, 2, str
->str
, NULL
);
353 g_string_free(str
, TRUE
);
355 serv_got_update(zgc
, b
->name
, nlocs
, 0, 0, 0, 0, 0);
362 char *ptr
= notice
.z_message
+ strlen(notice
.z_message
) + 1;
363 int len
= notice
.z_message_len
- (ptr
- notice
.z_message
);
366 buf
= g_malloc(len
+ 1);
367 g_snprintf(buf
, len
+ 1, "%s", ptr
);
369 buf2
= zephyr_to_html(buf
);
371 if (!g_strcasecmp(notice
.z_class
, "MESSAGE") &&
372 !g_strcasecmp(notice
.z_class_inst
, "PERSONAL")) {
373 if (!g_strcasecmp(notice
.z_message
, "Automated reply:"))
377 serv_got_im(zgc
, notice
.z_sender
, buf2
, 0, time(NULL
), -1);
379 zephyr_triple
*zt1
, *zt2
;
380 zt1
= new_triple(notice
.z_class
, notice
.z_class_inst
,
382 zt2
= find_sub_by_triple(zt1
);
384 /* we shouldn't be subscribed to this message. ignore. */
388 serv_got_joined_chat(zgc
, zt2
->id
, zt2
->name
);
390 send_inst
= g_strdup_printf("%s %s", notice
.z_sender
,
391 notice
.z_class_inst
);
392 serv_got_chat_in(zgc
, zt2
->id
, send_inst
, FALSE
,
403 static gint
check_notify(gpointer data
)
407 struct sockaddr_in from
;
408 z_call_r(ZReceiveNotice(¬ice
, &from
));
410 switch (notice
.z_kind
) {
414 handle_message(notice
, from
);
417 /* we'll just ignore things for now */
418 debug_printf("ZEPHYR: Unhandled Notice\n");
422 ZFreeNotice(¬ice
);
428 static gint
check_loc(gpointer data
)
431 ZAsyncLocateData_t ald
;
434 memset(&(ald
.uid
), 0, sizeof(ZUnique_Id_t
));
439 struct group
*g
= gr
->data
;
442 struct buddy
*b
= m
->data
;
444 chk
= zephyr_normalize(b
->name
);
445 /* doesn't matter if this fails or not; we'll just move on to the next one */
446 ZRequestLocations(chk
, &ald
, UNACKED
, ZAUTH
);
457 static char *get_exposure_level()
459 char *exposure
= ZGetVariable("exposure");
462 return EXPOSE_REALMVIS
;
463 if (!g_strcasecmp(exposure
, EXPOSE_NONE
))
465 if (!g_strcasecmp(exposure
, EXPOSE_OPSTAFF
))
466 return EXPOSE_OPSTAFF
;
467 if (!g_strcasecmp(exposure
, EXPOSE_REALMANN
))
468 return EXPOSE_REALMANN
;
469 if (!g_strcasecmp(exposure
, EXPOSE_NETVIS
))
470 return EXPOSE_NETVIS
;
471 if (!g_strcasecmp(exposure
, EXPOSE_NETANN
))
472 return EXPOSE_NETANN
;
473 return EXPOSE_REALMVIS
;
476 static void strip_comments(char *str
)
478 char *tmp
= strchr(str
, '#');
485 static void process_zsubs()
491 fname
= g_strdup_printf("%s/.zephyr.subs", g_getenv("HOME"));
492 f
= fopen(fname
, "r");
497 while (fgets(buff
, BUFSIZ
, f
)) {
498 strip_comments(buff
);
500 triple
= g_strsplit(buff
, ",", 3);
501 if (triple
[0] && triple
[1] && triple
[2]) {
502 char *tmp
= g_strdup_printf("%s@%s", g_getenv("USER"),
505 sub
.zsub_class
= triple
[0];
506 sub
.zsub_classinst
= triple
[1];
507 if (!g_strcasecmp(triple
[2], "%me%")) {
508 recip
= g_strdup_printf("%s@%s", g_getenv("USER"),
510 } else if (!g_strcasecmp(triple
[2], "*")) {
512 * form of class,instance,* */
513 recip
= g_malloc0(1);
514 } else if (!g_strcasecmp(triple
[2], tmp
)) {
515 /* form of class,instance,aatharuv@ATHENA.MIT.EDU */
516 recip
= g_strdup(triple
[2]);
517 } else if ((atptr
= strchr(triple
[2], '@')) != NULL
) {
518 /* form of class,instance,*@ANDREW.CMU.EDU
519 * class,instance,@ANDREW.CMU.EDU
520 * If realm is local realm, blank recipient, else
523 char *realmat
= g_strdup_printf("@%s", ZGetRealm());
524 if (!g_strcasecmp(atptr
, realmat
))
525 recip
= g_malloc0(1);
527 recip
= g_strdup(atptr
);
530 recip
= g_strdup(triple
[2]);
533 sub
.zsub_recipient
= recip
;
534 if (ZSubscribeTo(&sub
, 1, 0) != ZERR_NONE
) {
535 debug_printf("Zephyr: Couldn't subscribe to %s, %s, "
541 subscrips
= g_slist_append(subscrips
,
542 new_triple(triple
[0], triple
[1], recip
));
551 static void process_anyone()
554 gchar buff
[BUFSIZ
], *filename
;
556 filename
= g_strconcat(g_get_home_dir(), "/.anyone", NULL
);
557 if ((fd
= fopen(filename
, "r")) != NULL
) {
558 while (fgets(buff
, BUFSIZ
, fd
)) {
559 strip_comments(buff
);
561 add_buddy(zgc
, "Anyone", buff
, buff
);
568 static void zephyr_login(struct aim_user
*user
)
573 do_error_dialog("Already logged in with Zephyr", "Zephyr");
577 zgc
= new_gaim_conn(user
);
579 z_call_s(ZInitialize(), "Couldn't initialize zephyr");
580 z_call_s(ZOpenPort(NULL
), "Couldn't open port");
581 z_call_s(ZSetLocation(get_exposure_level()), "Couldn't set location");
583 sub
.zsub_class
= "MESSAGE";
584 sub
.zsub_classinst
= "PERSONAL";
585 sub
.zsub_recipient
= ZGetSender();
587 /* we don't care if this fails. i'm lying right now. */
588 if (ZSubscribeTo(&sub
, 1, 0) != ZERR_NONE
) {
589 debug_printf("Zephyr: Couldn't subscribe to messages!\n");
593 serv_finish_login(zgc
);
595 if (bud_list_cache_exists(zgc
))
596 do_import(zgc
, NULL
);
600 nottimer
= g_timeout_add(100, check_notify
, NULL
);
601 loctimer
= g_timeout_add(20000, check_loc
, NULL
);
604 static void write_zsubs()
606 GSList
*s
= subscrips
;
611 fname
= g_strdup_printf("%s/.zephyr.subs", g_get_home_dir());
612 fd
= fopen(fname
, "w");
621 fprintf(fd
, "%s\n", zt
->name
);
628 static void write_anyone()
636 fname
= g_strdup_printf("%s/.anyone", g_get_home_dir());
637 fd
= fopen(fname
, "w");
649 if ((ptr
= strchr(b
->name
, '@')) != NULL
)
651 fprintf(fd
, "%s\n", b
->name
);
663 static void zephyr_close(struct gaim_connection
*gc
)
667 l
= pending_zloc_names
;
669 g_free((char*)l
->data
);
672 g_list_free(pending_zloc_names
);
679 free_triple((zephyr_triple
*)s
->data
);
682 g_slist_free(subscrips
);
685 g_source_remove(nottimer
);
688 g_source_remove(loctimer
);
691 z_call(ZCancelSubscriptions(0));
692 z_call(ZUnsetLocation());
693 z_call(ZClosePort());
696 static void zephyr_add_buddy(struct gaim_connection
*gc
, char *buddy
) { }
697 static void zephyr_remove_buddy(struct gaim_connection
*gc
, char *buddy
, char *group
) { }
699 static int zephyr_chat_send(struct gaim_connection
*gc
, int id
, char *im
)
706 zt
= find_sub_by_id(id
);
708 /* this should never happen. */
711 sig
= ZGetVariable("zwrite-signature");
713 sig
= g_get_real_name();
715 buf
= g_strdup_printf("%s%c%s", sig
, '\0', im
);
717 bzero((char *)¬ice
, sizeof(notice
));
718 notice
.z_kind
= ACKED
;
720 notice
.z_opcode
= "";
721 notice
.z_class
= zt
->class;
722 notice
.z_class_inst
= zt
->instance
;
723 if (!g_strcasecmp(zt
->recipient
, "*"))
724 notice
.z_recipient
= zephyr_normalize("");
726 notice
.z_recipient
= zephyr_normalize(zt
->recipient
);
728 notice
.z_default_format
=
729 "Class $class, Instance $instance:\n"
730 "To: @bold($recipient) at $time $date\n"
731 "From: @bold($1) <$sender>\n\n$2";
732 notice
.z_message_len
= strlen(im
) + strlen(sig
) + 4;
733 notice
.z_message
= buf
;
734 ZSendNotice(¬ice
, ZAUTH
);
739 static int zephyr_send_im(struct gaim_connection
*gc
, char *who
, char *im
, int len
, int flags
) {
744 if (flags
& IM_FLAG_AWAY
)
745 sig
= "Automated reply:";
747 sig
= ZGetVariable("zwrite-signature");
749 sig
= g_get_real_name();
752 buf
= g_strdup_printf("%s%c%s", sig
, '\0', im
);
754 bzero((char *)¬ice
, sizeof(notice
));
755 notice
.z_kind
= ACKED
;
757 notice
.z_opcode
= "";
758 notice
.z_class
= "MESSAGE";
759 notice
.z_class_inst
= "PERSONAL";
761 notice
.z_recipient
= who
;
762 notice
.z_default_format
=
763 "Class $class, Instance $instance:\n"
764 "To: @bold($recipient) at $time $date\n"
765 "From: @bold($1) <$sender>\n\n$2";
766 notice
.z_message_len
= strlen(im
) + strlen(sig
) + 4;
767 notice
.z_message
= buf
;
768 ZSendNotice(¬ice
, ZAUTH
);
773 static char *zephyr_normalize(const char *orig
)
776 if (strchr(orig
, '@')) {
777 g_snprintf(buf
, 80, "%s", orig
);
779 g_snprintf(buf
, 80, "%s@%s", orig
, ZGetRealm());
784 static void zephyr_zloc(struct gaim_connection
*gc
, char *who
)
786 ZAsyncLocateData_t ald
;
788 if (ZRequestLocations(zephyr_normalize(who
), &ald
, UNACKED
, ZAUTH
)
792 pending_zloc_names
= g_list_append(pending_zloc_names
,
793 g_strdup(zephyr_normalize(who
)));
796 static GList
*zephyr_buddy_menu(struct gaim_connection
*gc
, char *who
)
799 struct proto_buddy_menu
*pbm
;
801 pbm
= g_new0(struct proto_buddy_menu
, 1);
802 pbm
->label
= _("ZLocate");
803 pbm
->callback
= zephyr_zloc
;
805 m
= g_list_append(m
, pbm
);
810 static void zephyr_set_away(struct gaim_connection
*gc
, char *state
, char *msg
)
815 if (!g_strcasecmp(state
, "Hidden"))
816 ZSetLocation(EXPOSE_OPSTAFF
);
817 else if (!g_strcasecmp(state
, "Online"))
818 ZSetLocation(get_exposure_level());
819 else /* state is GAIM_AWAY_CUSTOM */ if (msg
)
820 gc
->away
= g_strdup(msg
);
823 static GList
*zephyr_away_states(struct gaim_connection
*gc
)
827 m
= g_list_append(m
, "Online");
828 m
= g_list_append(m
, GAIM_AWAY_CUSTOM
);
829 m
= g_list_append(m
, "Hidden");
834 static GList
*zephyr_chat_info(struct gaim_connection
*gc
) {
836 struct proto_chat_entry
*pce
;
838 pce
= g_new0(struct proto_chat_entry
, 1);
839 pce
->label
= _("Class:");
840 m
= g_list_append(m
, NULL
);
842 pce
= g_new0(struct proto_chat_entry
, 1);
843 pce
->label
= _("Instance:");
844 m
= g_list_append(m
, NULL
);
846 pce
= g_new0(struct proto_chat_entry
, 1);
847 pce
->label
= _("Recipient:");
848 m
= g_list_append(m
, NULL
);
853 static void zephyr_join_chat(struct gaim_connection
*gc
, GList
*data
)
856 zephyr_triple
*zt1
, *zt2
;
857 const char *classname
;
858 const char *instname
;
861 if (!data
|| !data
->next
|| !data
->next
->next
)
864 classname
= data
->data
;
865 instname
= data
->next
->data
;
866 recip
= data
->next
->next
->data
;
867 if (!g_strcasecmp(recip
, "%me%"))
868 recip
= g_getenv("USER");
870 zt1
= new_triple(classname
, instname
, recip
);
871 zt2
= find_sub_by_triple(zt1
);
875 serv_got_joined_chat(gc
, zt2
->id
, zt2
->name
);
879 sub
.zsub_class
= zt1
->class;
880 sub
.zsub_classinst
= zt1
->instance
;
881 sub
.zsub_recipient
= zt1
->recipient
;
883 if (ZSubscribeTo(&sub
, 1, 0) != ZERR_NONE
) {
888 subscrips
= g_slist_append(subscrips
, zt1
);
890 serv_got_joined_chat(gc
, zt1
->id
, zt1
->name
);
893 static void zephyr_chat_leave(struct gaim_connection
*gc
, int id
)
896 zt
= find_sub_by_id(id
);
903 static struct prpl
*my_protocol
= NULL
;
905 void zephyr_init(struct prpl
*ret
)
907 ret
->protocol
= PROTO_ZEPHYR
;
908 ret
->options
= OPT_PROTO_NO_PASSWORD
;
909 ret
->name
= zephyr_name
;
910 ret
->login
= zephyr_login
;
911 ret
->close
= zephyr_close
;
912 ret
->add_buddy
= zephyr_add_buddy
;
913 ret
->remove_buddy
= zephyr_remove_buddy
;
914 ret
->send_im
= zephyr_send_im
;
915 ret
->get_info
= zephyr_zloc
;
916 ret
->normalize
= zephyr_normalize
;
917 ret
->buddy_menu
= zephyr_buddy_menu
;
918 ret
->away_states
= zephyr_away_states
;
919 ret
->set_away
= zephyr_set_away
;
920 ret
->chat_info
= zephyr_chat_info
;
921 ret
->join_chat
= zephyr_join_chat
;
922 ret
->chat_send
= zephyr_chat_send
;
923 ret
->chat_leave
= zephyr_chat_leave
;
930 char *gaim_plugin_init(GModule
*handle
)
932 load_protocol(zephyr_init
, sizeof(struct prpl
));
936 void gaim_plugin_remove()
938 struct prpl
*p
= find_prpl(PROTO_ZEPHYR
);
939 if (p
== my_protocol
)
950 return PRPL_DESC("Zephyr");