Changeset 9f03c47
- Timestamp:
- 2016-11-14T00:37:14Z (8 years ago)
- Branches:
- master
- Children:
- 537d9b9, b4f496e
- Parents:
- ea90275
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
otr.c
rea90275 r9f03c47 429 429 430 430 /* don't do OTR on certain (not classic IM) protocols, e.g. twitter */ 431 if (a->prpl->options & OPT_NOOTR) {431 if (a->prpl->options & PRPL_OPT_NOOTR) { 432 432 return 0; 433 433 } … … 457 457 458 458 /* don't do OTR on certain (not classic IM) protocols, e.g. twitter */ 459 if (ic->acc->prpl->options & OPT_NOOTR ||459 if (ic->acc->prpl->options & PRPL_OPT_NOOTR || 460 460 iu->bu->flags & BEE_USER_NOOTR) { 461 461 return msg; -
protocols/nogaim.h
rea90275 r9f03c47 140 140 }; 141 141 142 /* This enum takes a few things from libpurple and a few things from old OPT_ flags. 143 * The only flag that was used before this struct was PRPL_OPT_NOOTR. 144 * 145 * The libpurple ones only use the same values as the PurpleProtocolOptions 146 * enum for convenience, but there's no promise of direct compatibility with 147 * those values. As of libpurple 2.8.0 they use up to 0x800 (1 << 11), which is 148 * a nice coincidence. 149 */ 150 typedef enum { 151 /* The protocol doesn't use passwords 152 * Mirrors libpurple's OPT_PROTO_NO_PASSWORD */ 153 PRPL_OPT_NO_PASSWORD = 1 << 4, 154 155 /* The protocol doesn't require passwords, but may use them 156 * Mirrors libpurple's OPT_PROTO_PASSWORD_OPTIONAL */ 157 PRPL_OPT_PASSWORD_OPTIONAL = 1 << 7, 158 159 /* The protocol is not suitable for OTR, see OPT_NOOTR */ 160 PRPL_OPT_NOOTR = 1 << 12, 161 } prpl_options_t; 162 142 163 struct prpl { 143 164 int options; -
protocols/purple/purple.c
rea90275 r9f03c47 1725 1725 for (prots = purple_plugins_get_protocols(); prots; prots = prots->next) { 1726 1726 PurplePlugin *prot = prots->data; 1727 PurplePluginProtocolInfo *pi = prot->info->extra_info; 1727 1728 struct prpl *ret; 1728 1729 … … 1738 1739 ret->name += 5; 1739 1740 } 1741 1742 if (pi->options & OPT_PROTO_NO_PASSWORD) { 1743 ret->options |= PRPL_OPT_NO_PASSWORD; 1744 } 1745 1746 if (pi->options & OPT_PROTO_PASSWORD_OPTIONAL) { 1747 ret->options |= PRPL_OPT_PASSWORD_OPTIONAL; 1748 } 1749 1740 1750 register_protocol(ret); 1741 1751 -
protocols/twitter/twitter.c
rea90275 r9f03c47 1092 1092 struct prpl *ret = g_new0(struct prpl, 1); 1093 1093 1094 ret->options = OPT_NOOTR;1094 ret->options = PRPL_OPT_NOOTR | PRPL_OPT_NO_PASSWORD; 1095 1095 ret->name = "twitter"; 1096 1096 ret->login = twitter_login; … … 1119 1119 ret = g_memdup(ret, sizeof(struct prpl)); 1120 1120 ret->name = "identica"; 1121 ret->options = PRPL_OPT_NOOTR; 1121 1122 register_protocol(ret); 1122 1123 } -
root_commands.c
rea90275 r9f03c47 470 470 irc_rootmsg(irc, "No need to enter a password for this " 471 471 "account since it's using OAuth"); 472 } else if (prpl->options & PRPL_OPT_NO_PASSWORD) { 473 *a->pass = '\0'; 474 } else if (prpl->options & PRPL_OPT_PASSWORD_OPTIONAL) { 475 *a->pass = '\0'; 476 irc_rootmsg(irc, "Passwords are optional for this account. " 477 "If you wish to enter the password with /OPER, do " 478 "account %s set -del password", a->tag); 472 479 } else { 473 480 irc_rootmsg(irc, "You can now use the /OPER command to " … … 479 486 } 480 487 } 488 } else if (prpl->options & PRPL_OPT_NO_PASSWORD) { 489 irc_rootmsg(irc, "Note: this account doesn't use password for login"); 481 490 } 482 491
Note: See TracChangeset
for help on using the changeset viewer.