aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/oscar/oscar.c
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/oscar/oscar.c')
-rw-r--r--protocols/oscar/oscar.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c
index 5a1ddc45..6ff0a742 100644
--- a/protocols/oscar/oscar.c
+++ b/protocols/oscar/oscar.c
@@ -363,10 +363,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;
}
@@ -2466,10 +2464,10 @@ static char *oscar_get_status_string( struct gaim_connection *gc, int number )
}
}
-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;
@@ -2487,5 +2485,5 @@ void oscar_init(struct prpl *ret) {
ret->keepalive = oscar_keepalive;
ret->get_status_string = oscar_get_status_string;
- my_protocol = ret;
+ register_protocol(ret);
}