Changeset e4f5ca8


Ignore:
Timestamp:
2013-02-10T12:48:32Z (12 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
12f500f, 65a5d15
Parents:
be98957 (diff), 875ba16 (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. Adds a "group info" command to list members of a group.

Files:
4 added
7 edited

Legend:

Unmodified
Added
Removed
  • configure

    rbe98957 re4f5ca8  
    645645*gcc* )
    646646        echo CFLAGS+=-MMD -MF .depend/\$@.d >> Makefile.settings
    647         for i in . lib protocols protocols/*/; do
     647        for i in . lib tests protocols protocols/*/; do
    648648                mkdir -p $i/.depend
    649649        done
  • doc/user-guide/commands.xml

    rbe98957 re4f5ca8  
    17841784        <bitlbee-command name="group">
    17851785                <short-description>Contact group management</short-description>
    1786                 <syntax>group list</syntax>
    1787 
    1788                 <description>
    1789                         <para>
    1790                                 Only the <emphasis>group list</emphasis> command is supported at the moment, which shows a list of all groups defined so far.
     1786                <syntax>group [ list | info &lt;group&gt; ]</syntax>
     1787
     1788                <description>
     1789                        <para>
     1790                                The <emphasis>group list</emphasis> command shows a list of all groups defined so far.
     1791                        </para>
     1792                       
     1793                        <para>
     1794                                The <emphasis>group info</emphasis> command shows a list of all members of a the group &lt;group&gt;.
    17911795                        </para>
    17921796                       
  • protocols/skype/README

    rbe98957 re4f5ca8  
    145145=== Configuring
    146146
    147 - Set up `~/.skyped/skyped.conf`: Create the `~/.skyped` directory, copy
    148   `skyped.conf` and `skyped.cnf` from
    149   `/usr/local/etc/skyped/skyped.conf` to `~/.skyped`, adjust `username`
    150   and `password`. The `username` should be your Skype login and the
    151   `password` can be whatever you want, but you will have to specify that
    152   one when adding the Skype account to BitlBee (see later).
    153 
    154 NOTE: Here, and later - `/usr/local/etc` can be different on your installation
    155 if you used the `--sysconfdir` switch when running bitlbee-skype's `configure`.
    156 
    157 - Generate the SSL pem files:
    158 
    159 ----
    160 # cd ~/.skyped
    161 # openssl req -new -x509 -days 365 -nodes -config skyped.cnf -out skyped.cert.pem \
    162         -keyout skyped.key.pem
    163 ----
    164 
    165 NOTE: Maybe you want to adjust the permissions in the `~/.skyped`
    166 dir. For example make it readable by just your user.
    167 
    168 - Start `skyped` (the tcp server):
    169 
    170 ----
    171 $ skyped
    172 ----
    173 
    174 - Start your `IRC` client, connect to BitlBee and add your account:
    175 
    176 ----
    177 account add skype <user> <pass>
    178 account skype set server localhost
    179 ----
    180 
    181 <user> should be your Skype account name, <pass> should be the one you declared
    182 in `skyped.conf`. If you want to run skyped on a remote machine, replace
    183 `localhost` with the name of the machine.
    184 
    185 If you are running skyped on a custom port:
    186 
    187 ----
    188 account skype set port <port>
    189 ----
    190 
    191 If you want to set your full name (optional):
    192 
    193 ----
    194 account skype set display_name "John Smith"
    195 ----
    196 
    197 If you want to see your skypeout contacts online as well (they are
    198 offline by default):
    199 
    200 ----
    201 account skype set skypeout_offline false
    202 ----
     147See the manpage of `skyped`.
    203148
    204149== Setting up Skype in a VNC server (optional)
  • protocols/skype/skype.c

    rbe98957 re4f5ca8  
    4646enum {
    4747        SKYPE_FILETRANSFER_NEW = 1,
     48        SKYPE_FILETRANSFER_TRANSFERRING,
     49        SKYPE_FILETRANSFER_COMPLETED,
    4850        SKYPE_FILETRANSFER_FAILED
    4951};
     
    8183        /* Same for file transfers. */
    8284        int filetransfer_status;
     85        /* Path of the file being transferred. */
     86        char *filetransfer_path;
    8387        /* Using /j #nick we want to have a groupchat with two people. Usually
    8488         * not (default). */
     
    783787                        id);
    784788                sd->filetransfer_status = SKYPE_FILETRANSFER_FAILED;
     789        } else if (!strcmp(info, "STATUS COMPLETED")) {
     790                skype_printf(ic, "GET FILETRANSFER %s PARTNER_HANDLE\n", id);
     791                sd->filetransfer_status = SKYPE_FILETRANSFER_COMPLETED;
     792        } else if (!strcmp(info, "STATUS TRANSFERRING")) {
     793                skype_printf(ic, "GET FILETRANSFER %s PARTNER_HANDLE\n", id);
     794                sd->filetransfer_status = SKYPE_FILETRANSFER_TRANSFERRING;
     795        } else if (!strncmp(info, "FILEPATH ", 9)) {
     796                info += 9;
     797                sd->filetransfer_path = g_strdup(info);
    785798        } else if (!strncmp(info, "PARTNER_HANDLE ", 15)) {
    786799                info += 15;
     
    795808                        imcb_log(ic, "Failed to transfer file from user %s.",
    796809                                info);
     810                        break;
     811                case SKYPE_FILETRANSFER_COMPLETED:
     812                        imcb_log(ic, "File transfer from user %s completed.", info);
     813                        break;
     814                case SKYPE_FILETRANSFER_TRANSFERRING:
     815                        if (sd->filetransfer_path) {
     816                                imcb_log(ic, "File transfer from user %s started, saving to %s.", info, sd->filetransfer_path);
     817                                g_free(sd->filetransfer_path);
     818                                sd->filetransfer_path = NULL;
     819                        }
    797820                        break;
    798821                }
  • protocols/skype/skyped.txt

    rbe98957 re4f5ca8  
    2020== CONFIGURATION
    2121
    22 See the README for information about how to configure this daemon.
     22- Set up `~/.skyped/skyped.conf`: Create the `~/.skyped` directory, copy
     23  `skyped.conf` and `skyped.cnf` from `/usr/local/etc/skyped/` to `~/.skyped`,
     24  adjust `username` and `password`. The `username` should be your Skype login and
     25  the `password` can be whatever you want, but you will have to specify that one
     26  when adding the Skype account to BitlBee (see later).
     27
     28NOTE: Here, and later - `/usr/local/etc` can be different on your installation
     29if you used the `--sysconfdir` switch when running the `configure` of BitlBee.
     30
     31- Generate the SSL pem files:
     32
     33----
     34$ cd ~/.skyped
     35$ openssl req -new -x509 -days 365 -nodes -config skyped.cnf -out skyped.cert.pem \
     36        -keyout skyped.key.pem
     37----
     38
     39- Start `skyped` (the TCP server), initially without detaching and enabling debug messages:
     40
     41----
     42$ skyped -d -n
     43----
     44
     45- Start your `IRC` client, connect to BitlBee and add your account:
     46
     47----
     48account add skype <user> <pass>
     49----
     50
     51`<user>` should be your Skype account name, `<pass>` should be the one you declared
     52in `skyped.conf`.
    2353
    2454== OPTIONS
  • protocols/skype/test.py

    rbe98957 re4f5ca8  
    9797                self.mock("called-no")
    9898
     99        def testFiletransfer(self):
     100                self.mock("filetransfer")
     101
     102        def testGroupRead(self):
     103                self.mock("group-read")
     104
    99105if __name__ == '__main__':
    100106        unittest.main()
  • root_commands.c

    rbe98957 re4f5ca8  
    12901290                }
    12911291                irc_rootmsg( irc, "End of group list" );
     1292        }
     1293        else if( g_strncasecmp(cmd[1], "info", len ) == 0 )
     1294        {
     1295                bee_group_t *bg;
     1296                int n = 0;
     1297
     1298                MIN_ARGS(2);
     1299                bg = bee_group_by_name( irc->b, cmd[2], FALSE );
     1300
     1301                if( bg )
     1302                {
     1303                        if( strchr(irc->umode, 'b') )
     1304                                irc_rootmsg( irc, "Members of %s:", cmd[2] );
     1305                        for( l = irc->b->users; l; l = l->next )
     1306                        {
     1307                                bee_user_t *bu = l->data;
     1308                                if( bu->group == bg )
     1309                                        irc_rootmsg( irc, "%d. %s", n ++, bu->nick ? : bu->handle );
     1310                        }
     1311                        irc_rootmsg( irc, "End of member list" );
     1312                }
     1313                else
     1314                        irc_rootmsg( irc, "Unknown group: %s. Please use \x02group list\x02 to get a list of available groups.", cmd[2] );
    12921315        }
    12931316        else
Note: See TracChangeset for help on using the changeset viewer.