Changes in / [0c42c65:4804b2f]
- Files:
-
- 21 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
r0c42c65 r4804b2f 27 27 subdirobjs = $(foreach dir,$(subdirs),$(dir)/$(dir).o) 28 28 29 all: $(OUTFILE) $(OTR_PI) systemd29 all: $(OUTFILE) $(OTR_PI) $(SKYPE_PI) systemd 30 30 $(MAKE) -C doc 31 ifdef SKYPE_PI 32 $(MAKE) -C protocols/skype doc 33 endif 31 34 32 35 uninstall: uninstall-bin uninstall-doc … … 71 74 install-doc: 72 75 $(MAKE) -C doc install 76 ifdef SKYPE_PI 77 $(MAKE) -C protocols/skype install-doc 78 endif 73 79 74 80 uninstall-doc: 75 81 $(MAKE) -C doc uninstall 82 ifdef SKYPE_PI 83 $(MAKE) -C protocols/skype uninstall-doc 84 endif 76 85 77 86 install-bin: … … 109 118 install -m 0755 otr.so $(DESTDIR)$(PLUGINDIR) 110 119 endif 120 ifdef SKYPE_PI 121 mkdir -p $(DESTDIR)$(PLUGINDIR) 122 install -m 0755 skype.so $(DESTDIR)$(PLUGINDIR) 123 mkdir -p $(DESTDIR)$(ETCDIR)/../skyped 124 install -m 0644 $(SRCDIR)protocols/skype/skyped.cnf $(DESTDIR)$(ETCDIR)/../skyped/skyped.cnf 125 install -m 0644 $(SRCDIR)protocols/skype/skyped.conf $(DESTDIR)$(ETCDIR)/../skyped/skyped.conf 126 install -m 0755 $(SRCDIR)protocols/skype/skyped.py $(DESTDIR)$(BINDIR)/skyped 127 endif 111 128 112 129 systemd: … … 141 158 @$(CC) $(CFLAGS) $(OTRFLAGS) -fPIC -shared $(LDFLAGS) $< -o $@ 142 159 160 $(SKYPE_PI): $(SRCDIR)protocols/skype/skype.c 161 @echo '*' Building plugin skype 162 @$(CC) $(CFLAGS) -fPIC -shared $< -o $@ 163 143 164 $(objects): %.o: $(SRCDIR)%.c 144 165 @echo '*' Compiling $< … … 164 185 165 186 -include .depend/*.d 187 # DO NOT DELETE -
configure
r0c42c65 r4804b2f 36 36 plugins=1 37 37 otr=0 38 skype=0 38 39 39 40 events=glib … … 83 84 --otr=0/1/auto/plugin 84 85 Disable/enable OTR encryption support $otr 86 --skype=0/1/plugin 87 Disable/enable Skype support $skype 85 88 86 89 --events=... Event handler (glib, libevent) $events … … 109 112 ipcsocket=`eval echo "$ipcsocket" | sed 's/\/\{1,\}/\//g'` 110 113 pcdir=`eval echo "$pcdir" | sed 's/\/\{1,\}/\//g'` 114 115 protocols_mods="" 111 116 112 117 cat<<EOF>Makefile.settings … … 538 543 fi 539 544 545 if [ "$skype" = "1" -o "$skype" = "plugin" ]; then 546 echo 'SKYPE_PI=skype.so' >> Makefile.settings 547 protocols_mods="$protocol_mods skype(plugin)" 548 fi 549 540 550 if [ ! -e doc/user-guide/help.txt ] && ! type xmlto > /dev/null 2> /dev/null; then 541 551 echo … … 751 761 752 762 if [ -n "$protocols" ]; then 753 echo ' Building with these protocols:' $protocols 763 echo ' Building with these protocols:' $protocols$protocols_mods 754 764 case "$protocols" in 755 765 *purple*) -
doc/user-guide/commands.xml
r0c42c65 r4804b2f 852 852 853 853 <variablelist> 854 <varlistentry><term>undo [<id>]</term><listitem><para>Delete your last Tweet (or one with the given ID)</para></listitem></varlistentry>855 <varlistentry><term>rt <screenname| id></term><listitem><para>Retweet someone's last Tweet (or one with the given ID)</para></listitem></varlistentry>856 <varlistentry><term>reply <screenname| id></term><listitem><para>Reply to a Tweet (with a reply-to reference)</para></listitem></varlistentry>854 <varlistentry><term>undo #[<id>]</term><listitem><para>Delete your last Tweet (or one with the given ID)</para></listitem></varlistentry> 855 <varlistentry><term>rt <screenname|#id></term><listitem><para>Retweet someone's last Tweet (or one with the given ID)</para></listitem></varlistentry> 856 <varlistentry><term>reply <screenname|#id></term><listitem><para>Reply to a Tweet (with a reply-to reference)</para></listitem></varlistentry> 857 857 <varlistentry><term>follow <screenname></term><listitem><para>Start following a person</para></listitem></varlistentry> 858 858 <varlistentry><term>unfollow <screenname></term><listitem><para>Stop following a person</para></listitem></varlistentry> -
doc/user-guide/quickstart.xml
r0c42c65 r4804b2f 122 122 123 123 <para> 124 Account tagging allows you to use the given account name rather than a number when referencing your account. If you wish to turn off your gtalk account, you may <emphasis>account off gtalk</emphasis> rather than <emphasis>account off 3</emphasis> where "3" is the account number.124 Account tagging allows you to use the given account name rather than a number when referencing your account. If you wish to turn off your gtalk account, you may <emphasis>account gtalk off</emphasis> rather than <emphasis>account 3 off</emphasis> where "3" is the account number. 125 125 </para> 126 126 -
lib/misc.c
r0c42c65 r4804b2f 400 400 cd = g_iconv_open( to_cs, from_cs ); 401 401 if( cd == (GIConv) -1 ) 402 return ( -1 );402 return -1; 403 403 404 404 inbytesleft = size ? size : strlen( src ); … … 408 408 g_iconv_close( cd ); 409 409 410 if( res == (size_t) -1)411 return ( -1 );410 if( res != 0 ) 411 return -1; 412 412 else 413 return ( outbuf - dst );413 return outbuf - dst; 414 414 } 415 415 -
lib/proxy.c
r0c42c65 r4804b2f 85 85 closesocket(source); 86 86 dup2(new_fd, source); 87 closesocket(new_fd); 87 88 phb->inpa = b_input_add(source, B_EV_IO_WRITE, gaim_io_connected, phb); 88 89 return FALSE; -
otr.c
r0c42c65 r4804b2f 8 8 OTR support (cf. http://www.cypherpunks.ca/otr/) 9 9 10 (c) 2008-201 0Sven Moritz Hallberg <pesco@khjk.org>10 (c) 2008-2011 Sven Moritz Hallberg <pesco@khjk.org> 11 11 (c) 2008 funded by stonedcoder.org 12 12 … … 162 162 void otr_smp_or_smpq(irc_t *irc, const char *nick, const char *question, 163 163 const char *secret); 164 165 /* update flags within the irc_user structure to reflect OTR status of context */ 166 void otr_update_uflags(ConnContext *context, irc_user_t *u); 164 167 165 168 /* update op/voice flag of given user according to encryption state and settings … … 237 240 l = g_slist_prepend( l, "always" ); 238 241 s->eval_data = l; 242 243 s = set_add( &irc->b->set, "otr_does_html", "true", set_eval_bool, irc ); 239 244 240 245 return TRUE; … … 385 390 ConnContext *context = otrl_context_find(irc->otr->us, iu->bu->handle, 386 391 ic->acc->user, ic->acc->prpl->name, 0, NULL, NULL, NULL); 387 if(context && context->msgstate == OTRL_MSGSTATE_ENCRYPTED && 388 set_getbool(&ic->bee->set, "otr_color_encrypted")) { 389 /* color according to f'print trust */ 390 int color; 391 const char *trust = context->active_fingerprint->trust; 392 if(trust && trust[0] != '\0') 393 color=3; /* green */ 394 else 395 color=5; /* red */ 396 397 if(newmsg[0] == ',') { 398 /* could be a problem with the color code */ 399 /* insert a space between color spec and message */ 400 colormsg = g_strdup_printf("\x03%.2d %s\x0F", color, newmsg); 401 } else { 402 colormsg = g_strdup_printf("\x03%.2d%s\x0F", color, newmsg); 392 393 if(context && context->msgstate == OTRL_MSGSTATE_ENCRYPTED) { 394 /* HTML decoding */ 395 /* perform any necessary stripping that the top level would miss */ 396 if(set_getbool(&ic->bee->set, "otr_does_html") && 397 !(ic->flags & OPT_DOES_HTML) && 398 set_getbool(&ic->bee->set, "strip_html")) { 399 strip_html(newmsg); 400 } 401 402 /* coloring */ 403 if(set_getbool(&ic->bee->set, "otr_color_encrypted")) { 404 /* color according to f'print trust */ 405 int color; 406 const char *trust = context->active_fingerprint->trust; 407 if(trust && trust[0] != '\0') 408 color=3; /* green */ 409 else 410 color=5; /* red */ 411 412 if(newmsg[0] == ',') { 413 /* could be a problem with the color code */ 414 /* insert a space between color spec and message */ 415 colormsg = g_strdup_printf("\x03%.2d %s\x0F", color, newmsg); 416 } else { 417 colormsg = g_strdup_printf("\x03%.2d%s\x0F", color, newmsg); 418 } 403 419 } 404 420 } else { 405 421 colormsg = g_strdup(newmsg); 406 422 } 423 407 424 otrl_message_free(newmsg); 408 425 return colormsg; … … 421 438 if(ic->acc->prpl->options & OPT_NOOTR) { 422 439 return msg; 440 } 441 442 /* HTML encoding */ 443 /* consider OTR plaintext to be HTML if otr_does_html is set */ 444 if(set_getbool(&ic->bee->set, "otr_does_html") && 445 (g_strncasecmp(msg, "<html>", 6) != 0)) { 446 msg = escape_html(msg); 423 447 } 424 448 … … 608 632 irc_user_t *u; 609 633 irc_t *irc = ic->bee->ui_data; 610 const char *trust;611 634 612 635 u = peeruser(irc, context->username, context->protocol); … … 618 641 } 619 642 620 trust = context->active_fingerprint->trust; 621 if(trust && trust[0]) 622 u->flags |= IRC_USER_OTR_ENCRYPTED | IRC_USER_OTR_TRUSTED; 623 else 624 u->flags = ( u->flags & ~IRC_USER_OTR_TRUSTED ) | IRC_USER_OTR_ENCRYPTED; 625 if(!otr_update_modeflags(irc, u)) 626 irc_usermsg(irc, "conversation with %s is now off the record", u->nick); 643 otr_update_uflags(context, u); 644 if(!otr_update_modeflags(irc, u)) { 645 char *trust = u->flags & IRC_USER_OTR_TRUSTED ? "trusted" : "untrusted!"; 646 irc_usermsg(irc, "conversation with %s is now off the record (%s)", u->nick, trust); 647 } 627 648 } 628 649 … … 641 662 return; 642 663 } 643 u->flags &= ~( IRC_USER_OTR_ENCRYPTED | IRC_USER_OTR_TRUSTED);664 otr_update_uflags(context, u); 644 665 if(!otr_update_modeflags(irc, u)) 645 666 irc_usermsg(irc, "conversation with %s is now in the clear", u->nick); … … 660 681 return; 661 682 } 662 if(context->active_fingerprint->trust[0]) 663 u->flags |= IRC_USER_OTR_ENCRYPTED | IRC_USER_OTR_TRUSTED;664 else665 u->flags = ( u->flags & ~IRC_USER_OTR_TRUSTED ) | IRC_USER_OTR_ENCRYPTED;666 if(!otr_update_modeflags(irc, u))667 irc_usermsg(irc, "otr connection with %s has been refreshed", u->nick);683 684 otr_update_uflags(context, u); 685 if(!otr_update_modeflags(irc, u)) { 686 char *trust = u->flags & IRC_USER_OTR_TRUSTED ? "trusted" : "untrusted!"; 687 irc_usermsg(irc, "otr connection with %s has been refreshed (%s)", u->nick, trust); 688 } 668 689 } 669 690 … … 1312 1333 } 1313 1334 1335 void otr_update_uflags(ConnContext *context, irc_user_t *u) 1336 { 1337 const char *trust; 1338 1339 if(context->active_fingerprint) { 1340 u->flags |= IRC_USER_OTR_ENCRYPTED; 1341 1342 trust = context->active_fingerprint->trust; 1343 if(trust && trust[0]) 1344 u->flags |= IRC_USER_OTR_TRUSTED; 1345 else 1346 u->flags &= ~IRC_USER_OTR_TRUSTED; 1347 } else { 1348 u->flags &= ~IRC_USER_OTR_ENCRYPTED; 1349 } 1350 } 1351 1314 1352 int otr_update_modeflags(irc_t *irc, irc_user_t *u) 1315 1353 { 1316 return 1;1354 return 0; 1317 1355 } 1318 1356 -
protocols/twitter/twitter.c
r0c42c65 r4804b2f 465 465 guint64 id; 466 466 467 if (cmd[1]) 468 id = g_ascii_strtoull(cmd[1], NULL, 10); 469 else 470 id = td->last_status_id; 471 472 /* TODO: User feedback. */ 473 if (id) 467 if (cmd[1] == NULL) 468 twitter_status_destroy(ic, td->last_status_id); 469 else if (sscanf(cmd[1], "%" G_GUINT64_FORMAT, &id) == 1) { 470 if (id < TWITTER_LOG_LENGTH && td->log) 471 id = td->log[id].id; 472 474 473 twitter_status_destroy(ic, id); 475 else474 } else 476 475 twitter_msg(ic, "Could not undo last action"); 477 476 … … 491 490 guint64 id; 492 491 493 if ((bu = bee_user_by_handle(ic->bee, ic, cmd[1])) && 492 if (g_str_has_prefix(cmd[1], "#") && 493 sscanf(cmd[1] + 1, "%" G_GUINT64_FORMAT, &id) == 1) { 494 if (id < TWITTER_LOG_LENGTH && td->log) 495 id = td->log[id].id; 496 } else if ((bu = bee_user_by_handle(ic->bee, ic, cmd[1])) && 494 497 (tud = bu->data) && tud->last_id) 495 498 id = tud->last_id; 496 else { 497 id = g_ascii_strtoull(cmd[1], NULL, 10); 499 else if (sscanf(cmd[1], "%" G_GUINT64_FORMAT, &id) == 1){ 498 500 if (id < TWITTER_LOG_LENGTH && td->log) 499 501 id = td->log[id].id; … … 514 516 guint64 id = 0; 515 517 516 if ((bu = bee_user_by_handle(ic->bee, ic, cmd[1])) && 518 if (g_str_has_prefix(cmd[1], "#") && 519 sscanf(cmd[1] + 1, "%" G_GUINT64_FORMAT, &id) == 1 && 520 (id < TWITTER_LOG_LENGTH) && td->log) { 521 bu = td->log[id].bu; 522 if (g_slist_find(ic->bee->users, bu)) 523 id = td->log[id].id; 524 else 525 bu = NULL; 526 } else if ((bu = bee_user_by_handle(ic->bee, ic, cmd[1])) && 517 527 (tud = bu->data) && tud->last_id) { 518 528 id = tud->last_id; … … 525 535 bu = NULL; 526 536 } 537 527 538 if (!id || !bu) { 528 539 twitter_msg(ic, "User `%s' does not exist or didn't "
Note: See TracChangeset
for help on using the changeset viewer.