Changeset 62a2bf9


Ignore:
Timestamp:
2013-01-05T13:47:56Z (12 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
cfbecc9
Parents:
e6298e5 (diff), 757e1e0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from vmiklos.

Files:
8 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    re6298e5 r62a2bf9  
    5555        rm -f *.o $(OUTFILE) core utils/bitlbeed init/bitlbee*.service
    5656        $(MAKE) -C tests clean
     57ifdef SKYPE_PI
     58        $(MAKE) -C protocols/skype clean
     59endif
    5760
    5861distclean: clean $(subdirs)
  • lib/json.c

    re6298e5 r62a2bf9  
    213213      json_uchar uchar;
    214214      unsigned char uc_b1, uc_b2, uc_b3, uc_b4;
    215       json_char * string;
    216       unsigned int string_length;
     215      json_char * string = 0;
     216      unsigned int string_length = 0;
    217217
    218218      top = root = 0;
  • protocols/skype/HACKING

    re6298e5 r62a2bf9  
    1717
    18184) irssi
    19 
    20 == Get the code from git
    21 
    22 To get the code directly from git, you need:
    23 
    24 git clone git://vmiklos.hu/bitlbee-skype
    25 cd bitlbee-skype
    26 make autogen
  • protocols/skype/Makefile

    re6298e5 r62a2bf9  
    44endif
    55
    6 VERSION = 0.9.0
    76DATE := $(shell date +%Y-%m-%d)
    8 # latest stable
    9 BITLBEE_VERSION = 3.0.1
    107INSTALL = install
    118ASCIIDOC = yes
     
    1714endif
    1815
    19 ifeq ($(BITLBEE),yes)
    20 LIBS = skype.$(SHARED_EXT)
    21 else
    22 LIBS =
    23 endif
    24 
    25 all: $(LIBS) $(MANPAGES)
    26 
    27 skype.$(SHARED_EXT): $(_SRCDIR_)skype.c config.mak
    28 ifeq ($(BITLBEE),yes)
    29         $(CC) $(CFLAGS) $(SHARED_FLAGS) -o skype.$(SHARED_EXT) $(_SRCDIR_)skype.c $(LDFLAGS)
    30 endif
    31 
    32 install: all install-doc
    33 ifeq ($(BITLBEE),yes)
    34         $(INSTALL) -d $(DESTDIR)$(plugindir)
    35         $(INSTALL) skype.$(SHARED_EXT) $(DESTDIR)$(plugindir)
    36 endif
    37 ifeq ($(SKYPE4PY),yes)
    38         $(INSTALL) -d $(DESTDIR)$(bindir)
    39         $(INSTALL) -d $(DESTDIR)$(sysconfdir)
    40         $(INSTALL) skyped.py $(DESTDIR)$(bindir)/skyped
    41         perl -p -i -e 's|/usr/local/etc/skyped|$(sysconfdir)|' $(DESTDIR)$(bindir)/skyped
    42         $(INSTALL) -m644 skyped.conf.dist $(DESTDIR)$(sysconfdir)/skyped.conf
    43         perl -p -i -e 's|\$${prefix}|$(prefix)|' $(DESTDIR)$(sysconfdir)/skyped.conf
    44         $(INSTALL) -m644 skyped.cnf $(DESTDIR)$(sysconfdir)
    45 endif
    46 
    47 client: $(_SRCDIR_)client.c
    48 
    49 autogen: configure.ac
    50         cp $(shell ls /usr/share/automake-*/install-sh | tail -n1) ./
    51         autoconf
     16all: $(MANPAGES)
    5217
    5318clean:
    54         rm -f $(LIBS) $(MANPAGES)
    55 
    56 distclean: clean
    57         rm -f config.log config.mak config.status $(MANPAGES)
    58 
    59 autoclean: distclean
    60         rm -rf aclocal.m4 autom4te.cache configure install-sh
     19        rm -f $(MANPAGES)
    6120
    6221# take this from the kernel
    6322check:
    64         perl checkpatch.pl --no-tree --file skype.c
     23        perl checkpatch.pl --show-types --ignore LONG_LINE,CAMELCASE --no-tree --file skype.c
    6524
    6625test: all
    6726        $(MAKE) -C t/ all
    68 
    69 dist:
    70         git archive --format=tar --prefix=bitlbee-skype-$(VERSION)/ HEAD | tar xf -
    71         mkdir -p bitlbee-skype-$(VERSION)
    72         git log --no-merges |git name-rev --tags --stdin > bitlbee-skype-$(VERSION)/Changelog
    73         make -C bitlbee-skype-$(VERSION) autogen
    74         tar czf bitlbee-skype-$(VERSION).tar.gz bitlbee-skype-$(VERSION)
    75         rm -rf bitlbee-skype-$(VERSION)
    76 
    77 release:
    78         git tag $(VERSION)
    79         $(MAKE) dist
    80         gpg --comment "See http://vmiklos.hu/gpg/ for info" \
    81                 -ba bitlbee-skype-$(VERSION).tar.gz
    8227
    8328doc: $(MANPAGES)
     
    9237        rm -f $(DESTDIR)$(MANDIR)/man1/skyped.1*
    9338
    94 HEADER.html: README Makefile
    95         asciidoc -a toc -a numbered -a sectids -o HEADER.html -a icons -a data-uri --attribute iconsdir=./images/icons README
    96         sed -i 's|@VERSION@|$(VERSION)|g' HEADER.html
    97         sed -i 's|@BITLBEE_VERSION@|$(BITLBEE_VERSION)|g' HEADER.html
    98 
    99 Changelog: .git/refs/heads/master
    100         git log --no-merges |git name-rev --tags --stdin >Changelog
    101 
    102 AUTHORS: .git/refs/heads/master
    103         git shortlog -s -n |sed 's/.*\t//'> AUTHORS
    104 
    10539%.1: $(_SRCDIR_)%.txt $(_SRCDIR_)asciidoc.conf
    106         a2x --asciidoc-opts="-f $(_SRCDIR_)asciidoc.conf" \
    107                 -a bs_version=$(VERSION) -a bs_date=$(DATE) -f manpage -D . $<
     40        a2x --asciidoc-opts="-f $(_SRCDIR_)asciidoc.conf" -a bee_date=$(DATE) -f manpage -D . $<
  • protocols/skype/README

    re6298e5 r62a2bf9  
    347347  * `account skype set test_join true`
    348348
    349 - Mood texts are not shown by default. If you want to see it:
    350 
    351   * `account skype set show_moods true`
     349- Mood texts are not shown by default.
     350
     351  * If you want to see them: `account skype set show_moods true`
     352  * If you want to change your mood text: `account skype set mood_text 'foo bar'`
    352353
    353354- Group support:
     
    373374
    374375If something does not work and it's not in the TODO section, then please
    375 contact me! Please also try the link:HACKING[git version] before reporting a bug, your
     376contact me! Please also try the bzr version before reporting a bug, your
    376377problem may be already fixed there.
    377378
     
    392393
    393394== Additional resources
    394 
    395 You can reach the Changelog link:Changelog[here], and a gitweb interface
    396 http://vmiklos.hu/gitweb/?p=bitlbee-skype.git[here].
    397395
    398396The Skype API documentation is
  • protocols/skype/asciidoc.conf

    re6298e5 r62a2bf9  
    55<refentry>
    66        <refentryinfo>
    7                 <date>{bs_date}</date>
     7                <date>{bee_date}</date>
    88        </refentryinfo>
    99        <refmeta>
    1010                <refentrytitle>{mantitle}</refentrytitle>
    1111                <manvolnum>{manvolnum}</manvolnum>
    12                 <refmiscinfo class="source">bitlbee-skype</refmiscinfo>
    13                 <refmiscinfo class="version">{bs_version}</refmiscinfo>
    14                 <refmiscinfo class="manual">bitlbee-skype manual</refmiscinfo>
     12                <refmiscinfo class="source">BitlBee</refmiscinfo>
     13                <refmiscinfo class="manual">BitlBee manual</refmiscinfo>
    1514        </refmeta>
    1615        <refnamediv>
  • protocols/skype/skype.c

    re6298e5 r62a2bf9  
    22 *  skype.c - Skype plugin for BitlBee
    33 *
    4  *  Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012 by Miklos Vajna <vmiklos@frugalware.org>
     4 *  Copyright (c) 2007-2013 by Miklos Vajna <vmiklos@frugalware.org>
    55 *
    66 *  This program is free software; you can redistribute it and/or modify
     
    214214        bla->handle = g_strdup(handle);
    215215
    216         buf = g_strdup_printf("The user %s wants to add you to "
    217                 "his/her buddy list, saying: '%s'.", handle, message);
     216        buf = g_strdup_printf("The user %s wants to add you to his/her buddy list, saying: '%s'.", handle, message);
    218217        imcb_ask(ic, buf, bla, skype_buddy_ask_yes, skype_buddy_ask_no);
    219218        g_free(buf);
     
    409408                        g_string_free(st, TRUE);
    410409                }
    411         }
    412         else if (!strncmp(ptr, "BIRTHDAY ", 9)) {
     410        } else if (!strncmp(ptr, "BIRTHDAY ", 9)) {
    413411                sd->info_birthday = g_strdup(ptr + 9);
    414412
     
    566564}
    567565
     566static void skype_parse_chatmessage_said_emoted(struct im_connection *ic, struct groupchat *gc, char *body)
     567{
     568        struct skype_data *sd = ic->proto_data;
     569        char buf[IRC_LINE_SIZE];
     570        if (!strcmp(sd->type, "SAID")) {
     571                if (!sd->is_edit)
     572                        g_snprintf(buf, IRC_LINE_SIZE, "%s", body);
     573                else {
     574                        g_snprintf(buf, IRC_LINE_SIZE, "%s %s", set_getstr(&ic->acc->set, "edit_prefix"), body);
     575                        sd->is_edit = 0;
     576                }
     577        } else
     578                g_snprintf(buf, IRC_LINE_SIZE, "/me %s", body);
     579        if (!gc)
     580                /* Private message */
     581                imcb_buddy_msg(ic, sd->handle, buf, 0, 0);
     582        else
     583                /* Groupchat message */
     584                imcb_chat_msg(gc, sd->handle, buf, 0, 0);
     585}
     586
    568587static void skype_parse_chatmessage(struct im_connection *ic, char *line)
    569588{
    570589        struct skype_data *sd = ic->proto_data;
    571         char buf[IRC_LINE_SIZE];
    572590        char *id = strchr(line, ' ');
    573591
     
    627645                                if (!strcmp(sd->type, "SAID") ||
    628646                                        !strcmp(sd->type, "EMOTED")) {
    629                                         if (!strcmp(sd->type, "SAID")) {
    630                                                 if (!sd->is_edit)
    631                                                         g_snprintf(buf, IRC_LINE_SIZE, "%s",
    632                                                                 body);
    633                                                 else {
    634                                                         g_snprintf(buf, IRC_LINE_SIZE, "%s %s",
    635                                                                 set_getstr(&ic->acc->set, "edit_prefix"),
    636                                                                 body);
    637                                                         sd->is_edit = 0;
    638                                                 }
    639                                         } else
    640                                                 g_snprintf(buf, IRC_LINE_SIZE, "/me %s",
    641                                                         body);
    642                                         if (!gc)
    643                                                 /* Private message */
    644                                                 imcb_buddy_msg(ic,
    645                                                         sd->handle, buf, 0, 0);
    646                                         else
    647                                                 /* Groupchat message */
    648                                                 imcb_chat_msg(gc,
    649                                                         sd->handle, buf, 0, 0);
     647                                        skype_parse_chatmessage_said_emoted(ic, gc, body);
    650648                                } else if (!strcmp(sd->type, "SETTOPIC") && gc)
    651649                                        imcb_chat_topic(gc,
     
    716714                case SKYPE_CALL_RINGING:
    717715                        if (sd->call_out)
    718                                 imcb_log(ic, "You are currently ringing "
    719                                         "the user %s.", info);
     716                                imcb_log(ic, "You are currently ringing the user %s.", info);
    720717                        else {
    721718                                g_snprintf(buf, IRC_LINE_SIZE,
     
    12311228        skype_printf(ic, "SET USERSTATUS OFFLINE\n");
    12321229
    1233         while( ic->groupchats )
     1230        while (ic->groupchats)
    12341231                imcb_chat_free(ic->groupchats->data);
    12351232
     
    13191316
    13201317        skype_printf(ic, "SET PROFILE FULLNAME %s", value);
     1318        return value;
     1319}
     1320
     1321static char *skype_set_mood_text(set_t *set, char *value)
     1322{
     1323        account_t *acc = set->data;
     1324        struct im_connection *ic = acc->ic;
     1325
     1326        skype_printf(ic, "SET PROFILE MOOD_TEXT %s", value);
    13211327        return value;
    13221328}
     
    15141520        s->flags |= ACC_SET_NOSAVE | ACC_SET_ONLINE_ONLY;
    15151521
     1522        s = set_add(&acc->set, "mood_text", NULL, skype_set_mood_text, acc);
     1523        s->flags |= ACC_SET_NOSAVE | ACC_SET_ONLINE_ONLY;
     1524
    15161525        s = set_add(&acc->set, "call", NULL, skype_set_call, acc);
    15171526        s->flags |= ACC_SET_NOSAVE | ACC_SET_ONLINE_ONLY;
  • protocols/skype/skyped.txt

    re6298e5 r62a2bf9  
    1212
    1313Skype supports remote control of the GUI client only via X11 or DBus
    14 messages. This is hard in care you want remote control. This daemon
     14messages. This is hard in case you want remote control. This daemon
    1515listens on a TCP port and runs on the same machine where the GUI client
    1616runs. It passes all the input it gets to Skype directly, except for a
Note: See TracChangeset for help on using the changeset viewer.