Changeset b4f496e for protocols/nogaim.c
- Timestamp:
- 2016-11-19T07:32:48Z (8 years ago)
- Branches:
- master
- Children:
- a7baf40
- Parents:
- 9f03c47
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.c
r9f03c47 rb4f496e 160 160 GList *protocols = NULL; 161 161 GList *disabled_protocols = NULL; 162 static struct prpl *unknown_prpl; 162 163 163 164 void register_protocol(struct prpl *p) … … 191 192 } 192 193 194 struct prpl *make_unknown_protocol(const char *name) 195 { 196 struct prpl *ret = g_memdup(unknown_prpl, sizeof(struct prpl)); 197 ret->name = g_strdup(name); 198 register_protocol(ret); 199 return ret; 200 } 201 193 202 gboolean is_protocol_disabled(const char *name) 194 203 { 195 204 return g_list_find_custom(disabled_protocols, name, proto_name_cmp) != NULL; 205 } 206 207 /* Returns heap allocated string with text attempting to explain why a protocol is missing 208 * Free the return value with g_free() */ 209 char *explain_unknown_protocol(const char *name) 210 { 211 char *extramsg = NULL; 212 213 if (is_protocol_disabled(name)) { 214 return g_strdup("Protocol disabled in the global config (bitlbee.conf)"); 215 } 216 217 if (strcmp(name, "yahoo") == 0) { 218 return g_strdup("The old yahoo protocol is gone, try the funyahoo++ libpurple plugin instead."); 219 } 220 221 #ifdef WITH_PURPLE 222 if ((strcmp(name, "msn") == 0) || 223 (strcmp(name, "loubserp-mxit") == 0) || 224 (strcmp(name, "myspace") == 0)) { 225 return g_strdup("This protocol has been removed from your libpurple version."); 226 } 227 228 if (strcmp(name, "hipchat") == 0) { 229 return g_strdup("This account type isn't supported by libpurple's jabber."); 230 } 231 232 #else 233 if (strcmp(name, "aim") == 0 || strcmp(name, "icq") == 0) { 234 return g_strdup("This account uses libpurple specific aliases for oscar. " 235 "Re-add the account with `account add oscar ...'"); 236 } 237 238 extramsg = "If this is a libpurple plugin, you might need to install bitlbee-libpurple instead."; 239 #endif 240 return g_strconcat("The protocol plugin is not installed or could not be loaded. " 241 "Use the `plugins' command to list available protocols. ", 242 extramsg, NULL); 196 243 } 197 244 … … 204 251 extern void twitter_initmodule(); 205 252 extern void purple_initmodule(); 253 extern void unknown_prpl_initmodule(); 254 255 unknown_prpl_initmodule(&unknown_prpl); 206 256 207 257 #ifdef WITH_MSN
Note: See TracChangeset
for help on using the changeset viewer.