aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/oscar/oscar.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-12-14 02:17:25 +0100
committerJelmer Vernooij <jelmer@samba.org>2005-12-14 02:17:25 +0100
commit703f0f7f4622194bce8023712a3a9966be6f8827 (patch)
tree311125ae518c2b277845dc78ec62fc9553081bdf /protocols/oscar/oscar.c
parent22bf64eab8a79352317ee190cddfeef3011aa8dc (diff)
parent568aaf7ce17a4db2dddd13f8baed02a6d2757eb6 (diff)
Merge my pluginable branch
Diffstat (limited to 'protocols/oscar/oscar.c')
-rw-r--r--protocols/oscar/oscar.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c
index 240bab14..b350456e 100644
--- a/protocols/oscar/oscar.c
+++ b/protocols/oscar/oscar.c
@@ -356,10 +356,8 @@ static void oscar_login(struct aim_user *user) {
if (isdigit(*user->username)) {
odata->icq = TRUE;
/* this is odd but it's necessary for a proper do_import and do_export */
- gc->protocol = PROTO_ICQ;
gc->password[8] = 0;
} else {
- gc->protocol = PROTO_TOC;
gc->flags |= OPT_CONN_HTML;
}
@@ -2633,10 +2631,10 @@ void oscar_reject_chat(gpointer w, struct aim_chat_invitation * inv)
g_free(inv);
}
-static struct prpl *my_protocol = NULL;
-
-void oscar_init(struct prpl *ret) {
- ret->protocol = PROTO_OSCAR;
+void oscar_init()
+{
+ struct prpl *ret = g_new0(struct prpl, 1);
+ ret->name = "oscar";
ret->away_states = oscar_away_states;
ret->login = oscar_login;
ret->close = oscar_close;
@@ -2658,8 +2656,7 @@ void oscar_init(struct prpl *ret) {
ret->keepalive = oscar_keepalive;
ret->cmp_buddynames = aim_sncmp;
ret->get_status_string = oscar_get_status_string;
-
ret->send_typing = oscar_send_typing;
- my_protocol = ret;
+ register_protocol(ret);
}