- Timestamp:
- 2019-02-03T15:18:54Z (6 years ago)
- Branches:
- master
- Children:
- e17d0a4
- Parents:
- 9de451d
- git-author:
- dequis <dx@…> (03-02-19 15:18:17)
- git-committer:
- dequis <dx@…> (03-02-19 15:18:54)
- Location:
- protocols
- Files:
-
- 39 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/account.c
r9de451d re5d2c56 86 86 /* Hardcode some more clever tag guesses. */ 87 87 strcpy(tag, prpl->name); 88 if (strcmp(prpl->name, "oscar") == 0) { 89 if (g_ascii_isdigit(a->user[0])) { 90 strcpy(tag, "icq"); 91 } else { 92 strcpy(tag, "aim"); 93 } 94 } else if (strcmp(prpl->name, "jabber") == 0) { 88 if (strcmp(prpl->name, "jabber") == 0) { 95 89 if (strstr(a->user, "@gmail.com") || 96 90 strstr(a->user, "@googlemail.com")) { -
protocols/nogaim.c
r9de451d re5d2c56 240 240 241 241 #else 242 if (strcmp(name, "aim") == 0 || strcmp(name, "icq") == 0) {243 return g_strdup("This account uses libpurple specific aliases for oscar. "244 "Re-add the account with `account add oscar ...'");245 }246 247 242 extramsg = "If this is a libpurple plugin, you might need to install bitlbee-libpurple instead."; 248 243 #endif … … 254 249 void nogaim_init() 255 250 { 256 extern void oscar_initmodule();257 251 extern void jabber_initmodule(); 258 252 extern void twitter_initmodule(); 259 253 extern void purple_initmodule(); 260 261 #ifdef WITH_OSCAR262 oscar_initmodule();263 #endif264 254 265 255 #ifdef WITH_JABBER -
protocols/purple/purple.c
r9de451d re5d2c56 107 107 } 108 108 109 static char *purple_get_account_prpl_id(account_t *acc)110 {111 /* "oscar" is how non-purple bitlbee calls it,112 * and it might be icq or aim, depending on the username */113 if (g_strcmp0(acc->prpl->name, "oscar") == 0) {114 return (g_ascii_isdigit(acc->user[0])) ? "prpl-icq" : "prpl-aim";115 }116 117 return acc->prpl->data;118 }119 120 109 static gboolean purple_account_should_set_nick(account_t *acc) 121 110 { … … 127 116 "prpl-hangouts", 128 117 "prpl-eionrobb-funyahoo-plusplus", 129 "prpl-icq",130 118 "prpl-line", 131 119 NULL, … … 144 132 static void purple_init(account_t *acc) 145 133 { 146 char *prpl_id = purple_get_account_prpl_id(acc);134 char *prpl_id = acc->prpl->data; 147 135 PurplePlugin *prpl = purple_plugins_find_with_id(prpl_id); 148 136 PurplePluginProtocolInfo *pi = prpl->info->extra_info; … … 399 387 400 388 ic->proto_data = pd = g_new0(struct purple_data, 1); 401 pd->account = purple_account_new(acc->user, purple_get_account_prpl_id(acc));389 pd->account = purple_account_new(acc->user, acc->prpl->data); 402 390 pd->input_requests = g_hash_table_new_full(g_direct_hash, g_direct_equal, 403 391 NULL, g_free); … … 1957 1945 g_string_append_printf(help, "\n* %s (%s)", ret->name, prot->info->name); 1958 1946 1959 /* libpurple doesn't define a protocol called OSCAR, but we1960 need it to be compatible with normal BitlBee. */1961 if (g_strcasecmp(prot->info->id, "prpl-aim") == 0) {1962 ret = g_memdup(&funcs, sizeof(funcs));1963 ret->name = "oscar";1964 /* purple_get_account_prpl_id() determines the actual protocol ID (icq/aim) */1965 ret->data = NULL;1966 register_protocol(ret);1967 }1968 1969 1947 info = g_new0(struct plugin_info, 1); 1970 1948 info->abiver = BITLBEE_ABI_VERSION_CODE;
Note: See TracChangeset
for help on using the changeset viewer.