diff options
Diffstat (limited to 'protocols/oscar')
-rw-r--r-- | protocols/oscar/oscar.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c index 5dda3e90..2b7f9308 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; } @@ -2489,10 +2487,10 @@ int oscar_send_typing(struct gaim_connection *gc, char * who, int typing) return( aim_im_sendmtn(od->sess, 1, who, typing ? 0x0002 : 0x0000) ); } -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; @@ -2510,8 +2508,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); } |