Changeset 7869e48


Ignore:
Timestamp:
Jan 12, 2013, 1:43:13 PM (12 years ago)
Author:
Jason Gross <jgross@mit.edu>
Children:
e3a0d71, 4485285
Parents:
4626016
git-author:
Jason Gross <jgross@mit.edu> (01/12/13 13:13:18)
git-committer:
Jason Gross <jgross@mit.edu> (01/12/13 13:43:13)
Message:
Remove trailing whitespace

This commit was made with the command sequence

    for i in $(git ls-files | tr '\n' ' ');
    do
      echo $i; sed -i s'/\s\+$//g' "$(readlink -f $i)";
    done
Files:
146 edited

Legend:

Unmodified
Added
Removed
  • COPYING

    rccc182c r7869e48  
    113113the original authors' reputations.
    114114
    115 
    116115  Finally, any free program is threatened constantly by software
    117116patents.  We wish to avoid the danger that companies distributing free
     
    161160General Public License rather than by this special one.
    162161
    163 
    164162                  GNU LIBRARY GENERAL PUBLIC LICENSE
    165163   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
     
    196194writing it).  Whether that is true depends on what the Library does
    197195and what the program that uses the Library does.
    198  
     196
    199197  1. You may copy and distribute verbatim copies of the Library's
    200198complete source code as you receive it, in any medium, provided that
     
    208206and you may at your option offer warranty protection in exchange for a
    209207fee.
    210 
    211208
    212209  2. You may modify your copy or copies of the Library or any portion
     
    268265these notices.
    269266
    270 
    271267  Once this change is made in a given copy, it is irreversible for
    272268that copy, so the ordinary GNU General Public License applies to all
     
    319315Any executables containing that work also fall under Section 6,
    320316whether or not they are linked directly with the Library itself.
    321 
    322317
    323318  6. As an exception to the Sections above, you may also compile or
     
    375370distribute.
    376371
    377 
    378372  7. You may place library facilities that are a work based on the
    379373Library side-by-side in a single library together with other library
     
    416410You are not responsible for enforcing compliance by third parties to
    417411this License.
    418 
    419412
    420413  11. If, as a consequence of a court judgment or allegation of patent
     
    470463the Free Software Foundation.
    471464
    472 
    473465  14. If you wish to incorporate parts of the Library into other free
    474466programs whose distribution conditions are incompatible with these,
     
    505497                     END OF TERMS AND CONDITIONS
    506498
    507 
    508499           How to Apply These Terms to Your New Libraries
    509500
     
    849840  - "Package" refers to the collection of files distributed by the Copyright
    850841    Holder, and derivatives of that collection of files created through
    851     textual modification. 
     842    textual modification.
    852843  - "Standard Version" refers to such a Package if it has not been modified,
    853844    or has been modified in accordance with the wishes of the Copyright
    854     Holder. 
     845    Holder.
    855846  - "Copyright Holder" is whoever is named in the copyright or copyrights for
    856     the package. 
     847    the package.
    857848  - "You" is you, if you're thinking about copying or distributing this Package.
    858849  - "Reasonable copying fee" is whatever you can justify on the basis of media
    859850    cost, duplication charges, time of people involved, and so on. (You will
    860851    not be required to justify it to the Copyright Holder, but only to the
    861     computing community at large as a market that must bear the fee.) 
     852    computing community at large as a market that must bear the fee.)
    862853  - "Freely Available" means that no fee is charged for the item itself, though
    863854    there may be fees involved in handling the item. It also means that
    864855    recipients of the item may redistribute it under the same conditions they
    865     received it. 
     856    received it.
    866857
    8678581. You may make and give away verbatim copies of the source form of the
  • ChangeLog

    r65ff3f4 r7869e48  
    456456     libncursesw. - asedeno
    457457   * text entry:
    458     first pass at utf-8 text entry. 
     458    first pass at utf-8 text entry.
    459459   * Change wcwidth() calls to mk_wcwidth() - asedeno
    460460   * First pass at outbound zephyr -> iso-8859-1 sanitizing.
     
    730730
    7317312.1.12pre
    732         Don't crash when sending/logging outgoing 
     732        Don't crash when sending/logging outgoing
    733733           AIM message and not logged in [BZ 90]
    734734        Don't crash when senging to someone not on AIM buddy list [BZ 94]
    735735           (patch from Alex Vandiver)
    736        
     736
    7377372.1.11
    738738        Don't crash doing zlocate with bad tickets. [BZ 12]
     
    762762        A fix for certain resize crashes (partly from alexmv) [BZ 55]
    763763        Turn off ISTRIP (gildea)
    764        
     764
    7657652.1.9
    766766        Include /usr/include/kerberosIV if it's found
    767        
     767
    7687682.1.8
    769769        Do OLC formatting for anything coming from olc.matisse
    770770        Improvements to popup size algorithm (from gildea)
    771771        Improved 'show colors' with non-colored labels
    772        
     772
    7737732.1.7
    774774        The colorclass command is added, to make colorization easy
     
    777777        Do ntohs() when printing zephyr port in zephyr info
    778778        Updated man page
    779        
     779
    7807802.1.6
    781781        Fixed three bugs found by Valgrind.
     
    792792        Dropped first brace in muxevents functions for consistency
    793793        Catch SIGHUP and SIGTERM and do a proper logout
    794        
     794
    7957952.1.5
    796796        Added a licence
     
    802802          will also be logged if this is set to 'on'
    803803        Added 'show license'
    804        
     804
    8058052.1.4
    806806        Normalize and downcase AIM names for logging
     
    818818        Do the initial zephyr_buddy_check when pseduologin set to true.
    819819        Updated man page
    820        
     820
    8218212.1.2
    822822        removed unused filter_depth variable
    823823        Fixed memory bug on receiving pings
    824        
     824
    8258252.1.1
    826826        Filters of filters now work.
     
    865865        Don't print extra new lines in popless_file
    866866        New zephyr_get_field function
    867        
     867
    8688682.0.14
    869869        Fixed missing word in startup message
     
    876876        Current directory added to 'status' command
    877877        Massive changes to libfaim and aim
    878        
     878
    8798792.0.13
    880880        Changed startup message for new mailing list
    881881        blist now prints AIM info even if .anyone is unreadable
    882882        Catch SIGPIPE and print an error rather than crashing.
    883                 [It's possible that this may have some portability 
    884                 issues under Solaris and we may need to add some 
     883                [It's possible that this may have some portability
     884                issues under Solaris and we may need to add some
    885885                configure stuff around SA_SIGINFO...]
    886886        Handle the case in aim_bstream_send where aim_send returns -1,
     
    891891        Un-word-wrap text when sending AIM messages.
    892892        Replace the main loop continue in the keyboard handler with an else.
    893        
     893
    8948942.0.12
    895895        Command history now doesn't allow the last entry
     
    909909        Print an error message if trying an invalid color for a filter
    910910        Fixed bug causing > not to go to end of editwin every time
    911        
     911
    9129122.0.11
    913913        Updated basic help
     
    920920        Zpunt now works with weird regex characters
    921921        Smart filters now work with weird regex characters
    922        
     922
    9239232.0.10
    924924        Allow 'hostname' in filters.
     
    927927        An admin message is displayed when you are logged out of AIM
    928928        Print an error message and admin message if an AIM send fails
    929        
     929
    9309302.0.9
    931931        Added the 'fancylines' variable.
     
    941941        Added command "show errors"
    942942        Fixed bug removing newlines in backup files
    943        
     943
    9449442.0.8
    945945        Increased size of screen name field in buddy listing
     
    951951        Add owl::login and owl::auth to legacy variables populated for format_msg.
    952952        Additions to intro.txt and advanced.txt documents.  (Still in progress.)
    953         Add base methods for login_host and login_tty 
     953        Add base methods for login_host and login_tty
    954954                and others that return undef.
    955         New API for perl message formatting functions. 
     955        New API for perl message formatting functions.
    956956                Legacy variables are still supported for owl::format_msg
    957                 and owl::receive_msg, but these functions are now also 
     957                and owl::receive_msg, but these functions are now also
    958958                passed an owl::Message object which contains methods
    959                 for accessing the contents of the message.  See perlwrap.pm 
     959                for accessing the contents of the message.  See perlwrap.pm
    960960                (and docs TBD) for the available methods.
    961961                *** WARNING:  The exact API for owl::Message has
     
    970970        When perl throws an error, the message is put in the msgwin
    971971                if possible.
    972         Added perl functions for:       
     972        Added perl functions for:
    973973                owl::getcurmsg() -- returns an owl::Message object for
    974974                                    the active message
     
    977977                owl::zephyr_getrealm() -- returns the zephyr realm
    978978                owl::zephyr_getsender() -- returns the zephyr sender
    979         Made owl::COMMAND("foo"); be syntactic sugar for 
     979        Made owl::COMMAND("foo"); be syntactic sugar for
    980980                owl::command("COMMAND foo");
    981         Added perlwrap.pm to contain perl code to be compiled into 
     981        Added perlwrap.pm to contain perl code to be compiled into
    982982                the binary.  This is transformed into perlwrap.c by
    983983                encapsulate.pl.
     
    998998        Improved status command
    999999        Fixed bug in buddy stuff
    1000        
     1000
    100110012.0.6
    10021002        aimlogin will now accept the screenname without a password and ask
     
    10091009        Reformatted editwin.c and added capability of doing password-style
    10101010           echoing
    1011        
     1011
    101210122.0.5
    10131013        Fix in finding des for building zcrypt
     
    10211021        Added hostname and tty name to LOGIN/LOGOUT zephyrs on oneline
    10221022          style
    1023        
     1023
    102410242.0.4
    10251025        Made command line option -n actually work
     
    10561056        Translate &lt; &gt; &amp; &quot; &nbsp; &ensp, &emsp, &endash and
    10571057           &emdash
    1058        
     1058
    105910592.0.3
    10601060        Don't ring the terminal bell on mail messages.
     
    10631063        Fixed a bug in fmtext
    10641064        Expanded the size of the hostname buffer
    1065        
     1065
    106610662.0.2
    10671067        Fixed bug in 'startup' command.
     
    11591159        Disabled 'addbuddy' and 'delbuddy' for aim since it doesn't work yet
    11601160        Hacked the Perl build stuff not to link with iconv
    1161        
     1161
    116211621.2.8
    11631163        Class pings are displayed differently now
    11641164        Updated owlconf.simple example to format outgoing messages.
    1165        
     1165
    116611661.2.7
    11671167        Outgoing messages now go through the config for formatting
     
    11791179        Started implementing zcrypt command
    11801180        More updates to the intro doc
    1181        
     1181
    118211821.2.6
    11831183        Started adding code for newmsgproc.  It doesn't fully work yet!
     
    11931193        Implemented the dump command
    11941194        New startup message
    1195        
     1195
    119611961.2.5
    11971197        Patch to fix memory bug in replying to CC messages
     
    12011201        Cast to an int for isspace, to make gcc -Wall quiet
    12021202        Added 'zlist' and 'l' to basic help.
    1203        
     1203
    120412041.2.4
    12051205        'zlog in' will now take an optional thrid argument to set the
     
    12281228        Made daemon.webzephyr a special case for smartstrip
    12291229        Added 'out' as a default filter for outgoing messages
    1230        
     1230
    123112311.2.3
    12321232        Added filters "ping", "auto" and "login" by default.
     
    12471247        Print the zsig used for outgoing messages
    12481248        The tty variable now controls the zephyr location tty name
    1249        
     1249
    125012501.2.2
    12511251        Added the 'search' command.
     
    12581258             When switching from an empty view to one we've previously
    12591259             been in, the new current message position will attempt
    1260              to be close to the current position from the last 
     1260             to be close to the current position from the last
    12611261             time we visited that view.
    12621262        Fixed bug in readconfig.c that prevented building under perl 5.005.
     
    12761276        New framework for command handling.
    12771277        New framework for keymap handling.
    1278         Added commands for everything that is bound 
     1278        Added commands for everything that is bound
    12791279             to a key (do 'show commands' to get the full list).
    12801280        Added 'multi' and '(' commands to allow multiple commands
    1281              to be specified on a line.             
     1281             to be specified on a line.
    12821282        Added user keybindings with bindkey command.
    12831283        Added command aliases (eg, "alias foo bar").
     
    12981298        C-t will transpose characters
    12991299        Fix the scrolling bug where we would sometimes fail to scroll
    1300              the screen down, leaving the current message off 
     1300             the screen down, leaving the current message off
    13011301             the bottom of the screen.
    13021302        Refixed 'login or login' typo in help
     
    13421342        Added owl_sprintf which returns the formatted string, or NULL.
    13431343                The caller must free this string.
    1344                 This will allocate enough memory and thus 
     1344                This will allocate enough memory and thus
    13451345                avoid potential some buffer overrun situations.
    13461346        Simple implementation of 'zwrite -m' (doesn't yet log an outgoing
    13471347                message as having been sent.)
    1348         The "Not logged in or subscribing to messages" error 
     1348        The "Not logged in or subscribing to messages" error
    13491349                now includes the name of the recipient.
    13501350        The "disable-ctrl-d" variable may also be set to "middle"
    1351                 which will result in ctrl-d only sending at the 
     1351                which will result in ctrl-d only sending at the
    13521352                end of the message.  This is now the default.
    13531353                This also added a command "editmulti:done-or-delete".
     
    13591359                The M-n and M-p keys will cycle through the history ring.
    13601360                In particular, it is now possible to edit the command line
    1361                 of a zephyr being composed:  C-c it and restart it 
     1361                of a zephyr being composed:  C-c it and restart it
    13621362                and then M-p to get the aborted composition back.
    13631363        Added owl::send_zwrite(command, message) to the perl glue
    13641364                to allow for the direct sending of multi-line messages.
    1365                 For example:  owl::send_zwrite("-c foo -i bar", "hello"); 
    1366         Changed owl_fmtext_print_plain to return an alloc'd string to 
     1365                For example:  owl::send_zwrite("-c foo -i bar", "hello");
     1366        Changed owl_fmtext_print_plain to return an alloc'd string to
    13671367                avoid buffer overrun risks.
    1368         Added owl::ztext_stylestrip("...") function to perlglue 
     1368        Added owl::ztext_stylestrip("...") function to perlglue
    13691369                 which returns the ztext with formatting stripped out.
    13701370        Added colorztext variable which can be used to disable @color()
     
    13801380        Added opera to the allowed options to the webbrowser variable.
    13811381        Fixed some buffer overruns in the "reply" command.
    1382         When repying to "all" on a message that begins with "CC:" (eg, sent 
     1382        When repying to "all" on a message that begins with "CC:" (eg, sent
    13831383                 with "zwrite -C", the reply line will be constructed
    13841384                 from the sender and the usernames on the CC: line
     
    13911391        Added --no-move option to delete command.
    13921392                In particular, delete-and-always-move-down may now
    1393                 be implemented with 
     1393                be implemented with
    13941394                '( delete --no-move ; next --skip-deleted )'.
    1395         Folded the nextmsg and prevmsg commands and functions together into 
     1395        Folded the nextmsg and prevmsg commands and functions together into
    13961396                one command which takes arguments.
    13971397                Added '--filter <name>' option (eg, for next_personal),
    13981398                '--skip-deleted' option, and
    13991399                '--last-if-none'/'--first-if-none' options.
    1400                 Help updated accordingly. 
    1401                 In particular, the 'personal' filter is now used 
    1402                 for 'next personal'. 
    1403                 Added --smart-filter and --smart-filter-instance options 
     1400                Help updated accordingly.
     1401                In particular, the 'personal' filter is now used
     1402                for 'next personal'.
     1403                Added --smart-filter and --smart-filter-instance options
    14041404                to the next and prev commands.
    14051405        Updated examples/owlconf.erik with the above.
    1406         Made owl_function_fast*filt return a string and not do the 
     1406        Made owl_function_fast*filt return a string and not do the
    14071407                narrowing, to make it more general.
    14081408        Added a smartfilter command that creates a filter
    14091409                based on the current message and returns the name
    14101410                of the filter.
    1411         Added M-C-n and M-C-p keybindings to "move to next message 
    1412                 matching current" and "move to previous message 
     1411        Added M-C-n and M-C-p keybindings to "move to next message
     1412                matching current" and "move to previous message
    14131413                matching current"
    1414         Added variables edit:maxfillcols and edit:maxwrapcols which 
     1414        Added variables edit:maxfillcols and edit:maxwrapcols which
    14151415                will limit how wide editing paragraphs may get before
    14161416                they get wrapped.  This is a max and may be narrower
     
    14191419                edit:maxfillcols and unlimited for edit:maxwrapcols.
    14201420        Added smartzpunt command with key binding of "C-x k".
    1421                 This starts a zpunt command filled in with 
     1421                This starts a zpunt command filled in with
    14221422                the proposed zpunt.
    14231423        Fixed a memory reference bug in delete and undelete commands.
     
    14261426                call back into owl.  This allows perl to get the return
    14271427                value of strings returned by owl commands.
    1428         Added the getview command which returns the name of the current 
    1429                 view's filter. 
     1428        Added the getview command which returns the name of the current
     1429                view's filter.
    14301430        Added the getvar command which returns the value of a variable.
    1431         Added an example to examples/owlconf.erik which uses TAB to 
    1432                 narrow and restore the view. 
    1433         Added an example to examples/owlconf.erik which uses M-c to 
     1431        Added an example to examples/owlconf.erik which uses TAB to
     1432                narrow and restore the view.
     1433        Added an example to examples/owlconf.erik which uses M-c to
    14341434                color messages matching the current one green.
    14351435        Integrated change to fix problem with popup blinking on new zephyrs.
     
    14431443                and new show commands.
    14441444        Show with arguments produces help on show.
    1445         Fix a bug in readconfig caught by efence (where we'd try to read before 
     1445        Fix a bug in readconfig caught by efence (where we'd try to read before
    14461446                the beginning of a string if it was empty).
    14471447        The perl command doesn't do makemsg directly, but instead
    1448              returns the string and it will get printed if it 
     1448             returns the string and it will get printed if it
    14491449             was run interactively.
    1450        
     1450
    145114511.1.3
    14521452        'show subs' and 'show subscriptions' are now the same as 'getsubs'
     
    14941494        Include login/logout messages in auto user filters
    14951495        'V' changes to the home view ('all' by default)
    1496        
     1496
    149714971.1.1
    1498         Fixed perl, aperl, and pperl commands to deal with quoting 
     1498        Fixed perl, aperl, and pperl commands to deal with quoting
    14991499              and spaces in a saner manner.
    15001500        Removed all owl_get_* methods for booleans and switched
    1501               cases where they were used to owl_is_* 
     1501              cases where they were used to owl_is_*
    15021502        Changes to owlconf.erik to use some new features.
    1503         Increased the size of the help buffer (as it 
     1503        Increased the size of the help buffer (as it
    15041504              was overflowing and truncating the help message).
    15051505        Variables prefixed with a _ are not shown in help
    1506               or by printallvars (and prefixed Not Yet Implemented 
     1506              or by printallvars (and prefixed Not Yet Implemented
    15071507              variables with this).
    15081508        Fix typo in help
     
    15171517        display admin message time in 'info' command
    15181518        fixed an editwin M-> last character bug
    1519                
     1519
    152015201.1
    15211521        reply is a normal function now
     
    15671567        Fixed an arg checking bug in delete command
    15681568        Added owl::id to perl namespace with message id
    1569         Fixed a memory corruption bug in readconfig.c (where right 
     1569        Fixed a memory corruption bug in readconfig.c (where right
    15701570              after the strdup to "out", we'd strcat a \n onto the end.
    15711571              This would be triggered whenever owl::format_msg returned
    15721572              a string not ending in a newline
    1573         Added 'X' keybinding which expunges and then switches to 
    1574               a view defined by the variable "view_home" which defaults 
     1573        Added 'X' keybinding which expunges and then switches to
     1574              a view defined by the variable "view_home" which defaults
    15751575              to "all"
    15761576        Consolidated readconfig.c somewhat to remove duplication.
     
    16011601              are generated from variable.c by stubgen.pl.
    16021602              The help.c messages for variables now calls into variable.c
    1603               so all information about most variables is in one place.   
     1603              so all information about most variables is in one place.
    16041604        Cleaned out code from global.c and command.c that was made obselete
    16051605              by variable overhaul.
    16061606        The set command now takes a -q option to not log a message.
    16071607        Fixed a bug where set and print with no arguments would
    1608               print "Undefined variable" in addition 
     1608              print "Undefined variable" in addition
    16091609              to running owl_function_printallvars.
    16101610        debug is now a variable that can be turned on and off.
    16111611        Fixed mail,inbox message parsing in examples/owlconf.erik
    1612         Made zaway_msg and zaway_msg_default into variables 
    1613         Changed owl_function_makemsg and owl_function_debugmsg 
     1612        Made zaway_msg and zaway_msg_default into variables
     1613        Changed owl_function_makemsg and owl_function_debugmsg
    16141614               to use varargs (ie, so they can now take a format
    16151615               string with args).
     
    16311631        Added doc/code.txt which gives a brief overview of the code.
    16321632        Added tags makefile rule and added TAGS to distclean rule.
    1633        
     1633
    163416341.0.1
    16351635        fix frees in loadsubs and loadloginsubs
    16361636        don't return in owl_free
    1637        
     1637
    163816381.0
    16391639        'print' and 'set' with no arguments prints all variables
     
    16651665        you can now reply to an admin message
    16661666        don't display an error about keypress on window resize
    1667        
     1667
    166816680.11
    16691669        fixed bug in viewing messages longer than the screen
     
    16811681        change malloc, realloc, strdup and free to use owl hooks so that
    16821682           debugging can be added
    1683                
     1683
    168416840.10.1
    16851685        fixed a trailing space bug in the parser
     
    16881688        fixed bug in reporting which M- key was pressed
    16891689        C-g will now cancel commands like C-c
    1690        
     1690
    169116910.10
    16921692        implemented owl_function_full_redisplay().
     
    17131713        some build cleanup
    17141714
    1715        
     1715
    171617160.9
    17171717        added owl_message_is_personal and have things use it
     
    17281728        added smart bolding and userclue
    17291729        fixed a bug causing pings to beep even if rxping is off
    1730        
     1730
    173117310.8.1
    17321732        fixed bug in logging code
    1733        
     1733
    173417340.8
    17351735        implemented personal logging
     
    17381738        fixed the backspace problem
    17391739        -v command line option prints the version number
    1740        
     1740
    174117410.7
    17421742        load-subs will report error opening file
     
    17521752        added displayoutgoing variable
    17531753        temporarily removed error printing for zlog in / out
    1754        
     1754
    175517550.61
    17561756        fixed bug in "message sent to <foo>" for zwrite
    1757        
     1757
    175817580.6
    17591759        help updated
     
    17661766        personal bell variable
    17671767        beta message now an admin message
    1768        
     1768
    176917690.5
    17701770        Added the debug command and flag
  • aim.c

    rf271129 r7869e48  
    107107   * future.  It's still called by Owl.
    108108   */
    109      
     109
    110110}
    111111
     
    131131  aim_setdebuggingcb(sess, faimtest_debugcb);
    132132  aim_tx_setenqueue(sess, AIM_TX_IMMEDIATE, NULL);
    133  
     133
    134134  /* this will leak, I know and just don't care right now */
    135135  priv=g_new0(struct owlfaim_priv, 1);
     
    165165  */
    166166
    167    
     167
    168168  aim_conn_addhandler(sess, conn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_FLAPVER, faimtest_flapversion, 0);
    169169  aim_conn_addhandler(sess, conn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_CONNCOMPLETE, faimtest_conncomplete, 0);
     
    174174  /* aim_conn_addhandler(sess, conn, 0x0017, 0x0007, gaim_parse_login, 0); */
    175175  /* aim_conn_addhandler(sess, conn, 0x0017, 0x0003, gaim_parse_auth_resp, 0); */
    176    
     176
    177177  /* start processing AIM events */
    178178  owl_global_set_doaimevents(&g);
     
    338338
    339339  owl_function_debugmsg("owl_aim_search: doing search for %s", email);
    340   ret=aim_search_address(owl_global_get_aimsess(&g), 
     340  ret=aim_search_address(owl_global_get_aimsess(&g),
    341341                         aim_getconn_type(owl_global_get_aimsess(&g), AIM_CONN_TYPE_BOS),
    342342                         email);
     
    358358    len=499;
    359359  }
    360    
     360
    361361  aim_locate_setprofile(owl_global_get_aimsess(&g),
    362362                        NULL, NULL, 0,
     
    367367  aim_bos_setprofile(owl_global_get_aimsess(&g),
    368368                     owl_global_get_bosconn(&g),
    369                      NULL, NULL, 0, "us-ascii", msg, 
     369                     NULL, NULL, 0, "us-ascii", msg,
    370370                     strlen(msg), 0);
    371371  */
     
    421421                               aim_getconn_type(owl_global_get_aimsess(&g), AIM_CONN_TYPE_CHATNAV), name, exchange);
    422422   ret=aim_chat_join(owl_global_get_aimsess(&g), owl_global_get_bosconn(&g), exchange, name, 0x0000);
    423  
     423
    424424}
    425425
     
    468468  if (selstat == -1) {
    469469    owl_aim_logged_out();
    470   } else if (selstat == 0) { 
     470  } else if (selstat == 0) {
    471471    /* no events pending */
    472472  } else if (selstat == 1) { /* outgoing data pending */
     
    474474  } else if (selstat == 2) { /* incoming data pending */
    475475    /* printf("selstat == 2\n"); */
    476    
     476
    477477    if (aim_get_command(aimsess, waitingconn) >= 0) {
    478478      aim_rxdispatch(aimsess);
     
    510510  struct owlfaim_priv *priv = sess->aux_data;
    511511  struct client_info_s info = CLIENTINFO_AIM_KNOWNGOOD;
    512    
     512
    513513  const char *key;
    514514  va_list ap;
     
    519519
    520520  aim_send_login(sess, fr->conn, priv->screenname, priv->password, &info, key);
    521  
     521
    522522  return(1);
    523523}
     
    649649  aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_LOK, 0x0003, faimtest_parse_searchreply, 0);
    650650  */
    651  
     651
    652652  aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_MSG, AIM_CB_MSG_ERROR,              faimtest_parse_msgerr, 0);
    653653  aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_LOC, AIM_CB_LOC_USERINFO,           faimtest_parse_userinfo, 0);
     
    733733  fu16_t code;
    734734  const char *msg;
    735  
     735
    736736  va_start(ap, fr);
    737737  code = va_arg(ap, int);
    738738  msg = va_arg(ap, const char *);
    739739  va_end(ap);
    740  
     740
    741741  owl_function_error("faimtest_parse_connerr: Code 0x%04x: %s\n", code, msg);
    742742  aim_conn_kill(sess, &fr->conn); /* this will break the main loop */
    743  
     743
    744744  priv->connected = 0;
    745  
     745
    746746  return 1;
    747747}
     
    751751  int status;
    752752  va_list ap;
    753  
     753
    754754  va_start(ap, fr);
    755755  status = va_arg(ap, int); /* status code of confirmation request */
     
    758758  /* owl_function_debugmsg("faimtest_accountconfirm: Code 0x%04x: %s\n", code, msg); */
    759759  owl_function_debugmsg("faimtest_accountconfirm: account confirmation returned status 0x%04x (%s)\n", status, (status==0x0000)?"email sent":"unknown");
    760  
     760
    761761  return 1;
    762762}
     
    768768  const char *val;
    769769  va_list ap;
    770  
     770
    771771  va_start(ap, fr);
    772772  change = va_arg(ap, int);
     
    777777  str = va_arg(ap, int);
    778778  va_end(ap);
    779  
     779
    780780  owl_function_debugmsg("faimtest_infochange: info%s: perms = %d, type = %x, length = %d, val = %s", change?" change":"", perms, type, length, str?val:"(not string)");
    781  
     781
    782782  return(1);
    783783}
     
    790790
    791791  owl_function_debugmsg("faimtest_handledirect:");
    792  
     792
    793793  va_start(ap, fr);
    794794  redir = va_arg(ap, struct aim_redirect_data *);
    795  
     795
    796796  if (redir->group == 0x0005) {  /* Adverts */
    797    
     797
    798798  } else if (redir->group == 0x0007) {  /* Authorizer */
    799799    aim_conn_t *tstconn;
    800800
    801801    owl_function_debugmsg("faimtest_handledirect: autorizer");
    802    
     802
    803803    tstconn = aim_newconn(sess, AIM_CONN_TYPE_AUTH, redir->ip);
    804804    if (!tstconn || (tstconn->status & AIM_CONN_STATUS_RESOLVERR)) {
     
    832832  struct aim_icbmparameters *params;
    833833  va_list ap;
    834  
     834
    835835  va_start(ap, fr);
    836836  params = va_arg(ap, struct aim_icbmparameters *);
    837837  va_end(ap);
    838  
     838
    839839  owl_function_debugmsg("faimtest_icbmparaminfo: ICBM Parameters: maxchannel = %d, default flags = 0x%08x, max msg len = %d, max sender evil = %f, max reciever evil = %f, min msg interval = %u",
    840840                       params->maxchan, params->flags, params->maxmsglen, ((float)params->maxsenderwarn)/10.0, ((float)params->maxrecverwarn)/10.0, params->minmsginterval);
    841      
     841
    842842  /*
    843843  * Set these to your taste, or client medium.  Setting minmsginterval
     
    850850  /* aim_seticbmparam(sess, params); */
    851851  aim_im_setparams(sess, params);
    852  
     852
    853853  return 1;
    854854}
     
    858858  va_list ap;
    859859  fu16_t maxbuddies, maxwatchers;
    860  
     860
    861861  va_start(ap, fr);
    862862  maxbuddies = va_arg(ap, int);
    863863  maxwatchers = va_arg(ap, int);
    864864  va_end(ap);
    865  
     865
    866866  owl_function_debugmsg("faimtest_parse_buddyrights: Max buddies = %d / Max watchers = %d\n", maxbuddies, maxwatchers);
    867  
     867
    868868  /* aim_ssi_reqrights(sess, fr->conn); */
    869869  aim_ssi_reqrights(sess);
    870  
     870
    871871  return 1;
    872872}
     
    876876  va_list ap;
    877877  fu16_t maxpermits, maxdenies;
    878  
     878
    879879  va_start(ap, fr);
    880880  maxpermits = va_arg(ap, int);
    881881  maxdenies = va_arg(ap, int);
    882882  va_end(ap);
    883  
     883
    884884  owl_function_debugmsg("faimtest_bosrights: Max permit = %d / Max deny = %d\n", maxpermits, maxdenies);
    885885  aim_clientready(sess, fr->conn);
     
    893893  va_list ap;
    894894  fu16_t maxsiglen;
    895  
     895
    896896  va_start(ap, fr);
    897897  maxsiglen = va_arg(ap, int);
     
    899899
    900900  owl_function_debugmsg("faimtest_locrights: rights: max signature length = %d\n", maxsiglen);
    901  
     901
    902902  return(1);
    903903}
     
    944944
    945945  owl_function_debugmsg("faimtest_parse_motd: %s (%d / %s)\n", msg?msg:"nomsg", id, (id < codeslen)?codes[id]:"unknown");
    946  
     946
    947947  return 1;
    948948}
     
    960960  if (flags & AIM_FLAG_WIRELESS) printf("WIRELESS ");
    961961  if (flags & AIM_FLAG_ACTIVEBUDDY) printf("ACTIVEBUDDY ");
    962  
     962
    963963  return;
    964964}
     
    10731073static int faimtest_parse_incoming_im_chan2(aim_session_t *sess, aim_conn_t *conn, aim_userinfo_t *userinfo, struct aim_incomingim_ch2_args *args)
    10741074{
    1075   /* 
     1075  /*
    10761076  printf("rendezvous: source sn = %s\n", userinfo->sn);
    10771077  printf("rendezvous: \twarnlevel = %f\n", aim_userinfo_warnlevel(userinfo));
     
    10791079  printuserflags(userinfo->flags);
    10801080  printf("\n");
    1081  
     1081
    10821082  printf("rendezvous: \tonlinesince = %lu\n", userinfo->onlinesince);
    10831083  printf("rendezvous: \tidletime = 0x%04x\n", userinfo->idletime);
    1084  
     1084
    10851085  printf("rendezvous: message/description = %s\n", args->msg);
    10861086  printf("rendezvous: encoding = %s\n", args->encoding);
    10871087  printf("rendezvous: language = %s\n", args->language);
    10881088  */
    1089  
     1089
    10901090  if (args->reqclass == AIM_CAPS_SENDFILE) {
    10911091    owl_function_debugmsg("faimtest_parse_incoming_im_chan2: send file!");
     
    11191119  va_list ap;
    11201120  int ret = 0;
    1121  
     1121
    11221122  va_start(ap, fr);
    11231123  channel = (fu16_t)va_arg(ap, unsigned int);
    11241124  userinfo = va_arg(ap, aim_userinfo_t *);
    1125  
     1125
    11261126  if (channel == 1) {
    11271127    struct aim_incomingim_ch1_args *args;
     
    11511151
    11521152  nz_screenname=owl_aim_normalize_screenname(userinfo->sn);
    1153  
     1153
    11541154  owl_buddylist_oncoming(owl_global_get_buddylist(&g), nz_screenname);
    11551155
     
    11731173    owl_function_debugmsg("parse_oncoming sn: %s away flag!", userinfo->sn);
    11741174  }
    1175  
     1175
    11761176  owl_function_debugmsg("parse_oncoming sn: %s idle: %i", userinfo->sn, userinfo->idletime);
    1177    
     1177
    11781178  g_free(nz_screenname);
    1179  
     1179
    11801180  /*
    11811181    printf("%ld  %s is now online (flags: %04x = %s%s%s%s%s%s%s%s) (caps = %s = 0x%08lx)\n",
     
    12011201  char *nz_screenname;
    12021202  va_list ap;
    1203  
     1203
    12041204  va_start(ap, fr);
    12051205  userinfo = va_arg(ap, aim_userinfo_t *);
     
    12291229         userinfo->capabilities);
    12301230  */
    1231  
     1231
    12321232  return 1;
    12331233}
     
    12381238  va_list ap;
    12391239  fu16_t reason;
    1240  
     1240
    12411241  va_start(ap, fr);
    12421242  reason = (fu16_t)va_arg(ap, unsigned int);
    12431243  va_end(ap);
    1244  
     1244
    12451245  /* printf("snac threw error (reason 0x%04x: %s)\n", reason, (reason<msgerrreasonslen)?msgerrreasons[reason]:"unknown"); */
    12461246  if (reason<msgerrreasonslen) owl_function_error("%s", msgerrreasons[reason]);
    1247  
     1247
    12481248  return 1;
    12491249}
     
    12541254  const char *destsn;
    12551255  fu16_t reason;
    1256  
     1256
    12571257  va_start(ap, fr);
    12581258  reason = (fu16_t)va_arg(ap, unsigned int);
    12591259  destsn = va_arg(ap, const char *);
    12601260  va_end(ap);
    1261  
     1261
    12621262  /* printf("message to %s bounced (reason 0x%04x: %s)\n", destsn, reason, (reason<msgerrreasonslen)?msgerrreasons[reason]:"unknown"); */
    12631263  if (reason<msgerrreasonslen) owl_function_error("%s", msgerrreasons[reason]);
     
    12661266    owl_function_adminmsg("", "Could not send AIM message, user not logged on");
    12671267  }
    1268  
     1268
    12691269  return 1;
    12701270}
     
    12751275  const char *destsn;
    12761276  fu16_t reason;
    1277  
     1277
    12781278  va_start(ap, fr);
    12791279  reason = (fu16_t)va_arg(ap, unsigned int);
    12801280  destsn = va_arg(ap, const char *);
    12811281  va_end(ap);
    1282  
     1282
    12831283  /* printf("user information for %s unavailable (reason 0x%04x: %s)\n", destsn, reason, (reason<msgerrreasonslen)?msgerrreasons[reason]:"unknown"); */
    12841284  if (reason<msgerrreasonslen) owl_function_error("%s", msgerrreasons[reason]);
    1285  
     1285
    12861286  return 1;
    12871287}
     
    12971297  };
    12981298  static int missedreasonslen = 5;
    1299  
     1299
    13001300  va_list ap;
    13011301  fu16_t chan, nummissed, reason;
    13021302  aim_userinfo_t *userinfo;
    1303  
     1303
    13041304  va_start(ap, fr);
    13051305  chan = (fu16_t)va_arg(ap, unsigned int);
     
    13081308  reason = (fu16_t)va_arg(ap, unsigned int);
    13091309  va_end(ap);
    1310  
     1310
    13111311  owl_function_debugmsg("faimtest_parse_misses: missed %d messages from %s on channel %d (reason %d: %s)\n", nummissed, userinfo->sn, chan, reason, (reason<missedreasonslen)?missedreasons[reason]:"unknown");
    1312  
     1312
    13131313  return 1;
    13141314}
     
    13221322  fu16_t type;
    13231323  const char *sn = NULL;
    1324  
     1324
    13251325  va_start(ap, fr);
    13261326  type = (fu16_t)va_arg(ap, unsigned int);
    13271327  sn = va_arg(ap, const char *);
    13281328  va_end(ap);
    1329  
     1329
    13301330  owl_function_debugmsg("faimtest_parse_msgack: 0x%04x / %s\n", type, sn);
    1331  
     1331
    13321332  return 1;
    13331333}
     
    13461346  fu32_t windowsize, clear, alert, limit, disconnect;
    13471347  fu32_t currentavg, maxavg;
    1348  
    1349   va_start(ap, fr); 
    1350  
     1348
     1349  va_start(ap, fr);
     1350
    13511351  /* See code explanations below */
    13521352  code = (fu16_t)va_arg(ap, unsigned int);
    1353  
     1353
    13541354  /*
    13551355   * See comments above aim_parse_ratechange_middle() in aim_rxhandlers.c.
    13561356   */
    13571357  rateclass = (fu16_t)va_arg(ap, unsigned int);
    1358  
    1359   /*
    1360    * Not sure what this is exactly.  I think its the temporal 
     1358
     1359  /*
     1360   * Not sure what this is exactly.  I think its the temporal
    13611361   * relation factor (ie, how to make the rest of the numbers
    1362    * make sense in the real world). 
     1362   * make sense in the real world).
    13631363   */
    13641364  windowsize = va_arg(ap, fu32_t);
    1365  
     1365
    13661366  /* Explained below */
    13671367  clear = va_arg(ap, fu32_t);
     
    13711371  currentavg = va_arg(ap, fu32_t);
    13721372  maxavg = va_arg(ap, fu32_t);
    1373  
    1374   va_end(ap);
    1375  
     1373
     1374  va_end(ap);
     1375
    13761376  owl_function_debugmsg("faimtest_parse_ratechange: rate %s (rate class 0x%04x): curavg = %u, maxavg = %u, alert at %u, clear warning at %u, limit at %u, disconnect at %u (window size = %u)",
    13771377                        (code < 5)?codes[code]:"invalid",
     
    13891389  fu16_t newevil;
    13901390  aim_userinfo_t *userinfo;
    1391  
     1391
    13921392  va_start(ap, fr);
    13931393  newevil = (fu16_t)va_arg(ap, unsigned int);
    13941394  userinfo = va_arg(ap, aim_userinfo_t *);
    13951395  va_end(ap);
    1396  
     1396
    13971397  /*
    13981398   * Evil Notifications that are lacking userinfo->sn are anon-warns
     
    14041404   */
    14051405  owl_function_debugmsg("faimtest_parse_evilnotify: new value = %2.1f%% (caused by %s)\n", ((float)newevil)/10, (userinfo && strlen(userinfo->sn))?userinfo->sn:"anonymous");
    1406  
     1406
    14071407  return 1;
    14081408}
     
    14141414  int num, i;
    14151415  GPtrArray *list;
    1416  
     1416
    14171417  va_start(ap, fr);
    14181418  address = va_arg(ap, const char *);
     
    14221422
    14231423  list = g_ptr_array_new();
    1424  
     1424
    14251425  owl_function_debugmsg("faimtest_parse_searchreply: E-Mail Search Results for %s: ", address);
    14261426  for (i=0; i<num; i++) {
     
    14371437  va_list ap;
    14381438  const char *address;
    1439  
     1439
    14401440  va_start(ap, fr);
    14411441  address = va_arg(ap, const char *);
     
    14441444  owl_function_error("No results searching for %s", address);
    14451445  owl_function_debugmsg("faimtest_parse_searcherror: E-Mail Search Results for %s: No Results or Invalid Email\n", address);
    1446  
     1446
    14471447  return(1);
    14481448}
     
    14531453  const char *msg, *url;
    14541454  fu16_t width, height, delay;
    1455  
     1455
    14561456  va_start(ap, fr);
    14571457  msg = va_arg(ap, const char *);
     
    14611461  delay = va_arg(ap, unsigned int);
    14621462  va_end(ap);
    1463  
     1463
    14641464  owl_function_debugmsg("handlepopup: (%dx%x:%d) %s (%s)\n", width, height, delay, msg, url);
    1465  
     1465
    14661466  return 1;
    14671467}
     
    14791479  const char *bosip;
    14801480  fu8_t *cookie;
    1481  
     1481
    14821482  va_start(ap, fr);
    14831483  bosip = va_arg(ap, const char *);
    14841484  cookie = va_arg(ap, fu8_t *);
    14851485  va_end(ap);
    1486  
     1486
    14871487  owl_function_debugmsg("migrate: migration in progress -- new BOS is %s -- disconnecting", bosip);
    14881488  aim_conn_kill(sess, &fr->conn);
    1489  
     1489
    14901490  if (!(bosconn = aim_newconn(sess, AIM_CONN_TYPE_BOS, bosip))) {
    14911491    owl_function_debugmsg("migrate: could not connect to BOS: internal error");
    14921492    return 1;
    1493   } else if (bosconn->status & AIM_CONN_STATUS_CONNERR) {       
     1493  } else if (bosconn->status & AIM_CONN_STATUS_CONNERR) {
    14941494    owl_function_debugmsg("migrate: could not connect to BOS");
    14951495    aim_conn_kill(sess, &bosconn);
    14961496    return 1;
    14971497  }
    1498  
     1498
    14991499  /* Login will happen all over again. */
    15001500  addcb_bos(sess, bosconn);
     
    15081508  /* aim_ssi_reqdata(sess, fr->conn, 0, 0x0000); */
    15091509  aim_ssi_reqdata(sess);
    1510  
     1510
    15111511  return(1);
    15121512}
     
    15231523  struct aim_ssi_item *l;
    15241524  */
    1525  
     1525
    15261526  va_start(ap, fr);
    15271527  fmtver = va_arg(ap, unsigned int);
     
    15301530  list = va_arg(ap, struct aim_ssi_item *);
    15311531  va_end(ap);
    1532  
     1532
    15331533  owl_function_debugmsg("ssiddata: got SSI data (0x%02x, %d items, %u)", fmtver, itemcount, stamp);
    15341534  /*
     
    15401540  */
    15411541  aim_ssi_enable(sess);
    1542  
     1542
    15431543  return 1;
    15441544}
     
    15561556  va_list ap;
    15571557  struct aim_icq_offlinemsg *msg;
    1558  
     1558
    15591559  va_start(ap, fr);
    15601560  msg = va_arg(ap, struct aim_icq_offlinemsg *);
    15611561  va_end(ap);
    1562  
     1562
    15631563  if (msg->type == 0x0001) {
    15641564    owl_function_debugmsg("offlinemsg: from %u at %d/%d/%d %02d:%02d : %s", msg->sender, msg->year, msg->month, msg->day, msg->hour, msg->minute, msg->msg);
     
    15861586  int count;
    15871587  /* int i; */
    1588  
     1588
    15891589  va_start(ap, fr);
    15901590  count = va_arg(ap, int);
     
    16081608  /* int i; */
    16091609
    1610  
     1610
    16111611  va_start(ap, fr);
    16121612  count = va_arg(ap, int);
    16131613  userinfo = va_arg(ap, aim_userinfo_t *);
    16141614  va_end(ap);
    1615  
     1615
    16161616  /*
    16171617    printf("chat: %s:  Some occupants have left:\n", aim_chat_getname(fr->conn));
    1618    
     1618
    16191619    for (i = 0; i < count; i++)
    16201620    printf("chat: %s: \t%s\n", aim_chat_getname(fr->conn), userinfo[i].sn);
     
    16351635  const char *croomname;
    16361636  /* int i; */
    1637  
     1637
    16381638  croomname = aim_chat_getname(fr->conn);
    1639  
     1639
    16401640  va_start(ap, fr);
    16411641  roominfo = va_arg(ap, struct aim_chat_roominfo *);
     
    16621662  for (i = 0; i < usercount; i++)
    16631663    printf("chat: %s:  \t\t%s\n", croomname, userinfo[i].sn);
    1664  
    1665   owl_function_debugmsg("chat: %s:  \tRoom flags: 0x%04x (%s%s%s%s)\n", 
     1664
     1665  owl_function_debugmsg("chat: %s:  \tRoom flags: 0x%04x (%s%s%s%s)\n",
    16661666         croomname, flags,
    16671667         (flags & AIM_CHATROOM_FLAG_EVILABLE) ? "Evilable, " : "",
     
    16751675  printf("chat: %s:  \tMax visible message length: %d bytes\n", croomname, maxvisiblemsglen);
    16761676  */
    1677  
     1677
    16781678  return(1);
    16791679}
     
    16851685  const char *msg;
    16861686  char tmpbuf[1152];
    1687  
    1688   va_start(ap, fr);
    1689   userinfo = va_arg(ap, aim_userinfo_t *);     
     1687
     1688  va_start(ap, fr);
     1689  userinfo = va_arg(ap, aim_userinfo_t *);
    16901690  msg = va_arg(ap, const char *);
    16911691  va_end(ap);
     
    16961696  printf("chat: %s: incoming msg from %s: %s\n", aim_chat_getname(fr->conn), userinfo->sn, msg);
    16971697  */
    1698  
     1698
    16991699  /*
    17001700   * Do an echo for testing purposes.  But not for ourselves ("oops!")
     
    17041704    aim_chat_send_im(sess, fr->conn, 0, tmpbuf, strlen(tmpbuf));
    17051705  }
    1706  
     1706
    17071707  return 1;
    17081708}
     
    17171717  aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_ROOMINFOUPDATE, faimtest_chat_infoupdate, 0);
    17181718  aim_conn_addhandler(sess, fr->conn, AIM_CB_FAM_CHT, AIM_CB_CHT_INCOMINGMSG, faimtest_chat_incomingmsg, 0);
    1719  
     1719
    17201720  aim_clientready(sess, fr->conn);
    1721  
     1721
    17221722  owl_function_debugmsg("Chat ready");
    17231723
     
    17351735
    17361736  owl_function_debugmsg("in faimtest_chatnav_redirect");
    1737  
     1737
    17381738  tstconn = aim_newconn(sess, AIM_CONN_TYPE_CHATNAV, redir->ip);
    17391739  if (!tstconn || (tstconn->status & AIM_CONN_STATUS_RESOLVERR)) {
     
    17431743    return;
    17441744  }
    1745  
     1745
    17461746  aim_conn_addhandler(sess, tstconn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_CONNCOMPLETE, faimtest_conncomplete, 0);
    17471747  aim_conn_addhandler(sess, tstconn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_CONNINITDONE, conninitdone_chat, 0);
     
    17571757
    17581758  owl_function_debugmsg("in chat_redirect");
    1759  
     1759
    17601760  tstconn = aim_newconn(sess, AIM_CONN_TYPE_CHAT, redir->ip);
    17611761  if (!tstconn || (tstconn->status & AIM_CONN_STATUS_RESOLVERR)) {
    17621762    /* printf("unable to connect to chat server\n"); */
    17631763    if (tstconn) aim_conn_kill(sess, &tstconn);
    1764     return; 
    1765   }             
     1764    return;
     1765  }
    17661766  /* printf("chat: connected to %s instance %d on exchange %d\n", redir->chat.room, redir->chat.instance, redir->chat.exchange); */
    1767  
     1767
    17681768  /*
    17691769   * We must do this to attach the stored name to the connection!
     
    17731773  aim_conn_addhandler(sess, tstconn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_CONNINITDONE, conninitdone_chat, 0);
    17741774  aim_sendcookie(sess, tstconn, redir->cookielen, redir->cookie);
    1775   return;       
     1775  return;
    17761776}
    17771777
  • buddylist.c

    r3cdd6d2 r7869e48  
    1212  owl_buddy *b;
    1313  b=g_new(owl_buddy, 1);
    14  
     14
    1515  owl_buddy_create(b, OWL_PROTOCOL_AIM, screenname);
    1616  g_ptr_array_add(bl->buddies, b);
  • cmd.c

    rf271129 r7869e48  
    7979    owl_function_makemsg("Unbalanced quotes");
    8080    return NULL;
    81   } 
    82  
     81  }
     82
    8383  if (argc < 1) {
    8484    g_strfreev(argv);
     
    144144}
    145145
    146 int owl_cmd_is_context_valid(const owl_cmd *cmd, const owl_context *ctx) { 
     146int owl_cmd_is_context_valid(const owl_cmd *cmd, const owl_context *ctx) {
    147147  if (owl_context_matches(ctx, cmd->validctx)) return 1;
    148148  else return 0;
     
    168168      rv = owl_function_command(newcmd);
    169169      g_free(newcmd);
    170     } 
     170    }
    171171    alias_recurse_depth--;
    172172    return rv;
     
    201201  if (cmd->cmd_args_fn) {
    202202    return cmd->cmd_args_fn(argc, argv, cmdbuff);
    203   } else if (cmd->cmd_v_fn) {   
     203  } else if (cmd->cmd_v_fn) {
    204204    cmd->cmd_v_fn();
    205205  } else if (cmd->cmd_i_fn) {
     
    207207  } else if (cmd->cmd_ctxargs_fn) {
    208208    return cmd->cmd_ctxargs_fn(owl_context_get_data(ctx), argc, argv, cmdbuff);
    209   } else if (cmd->cmd_ctxv_fn) {   
     209  } else if (cmd->cmd_ctxv_fn) {
    210210    cmd->cmd_ctxv_fn(owl_context_get_data(ctx));
    211211  } else if (cmd->cmd_ctxi_fn) {
     
    277277  }
    278278
    279   owl_fmtext_append_normal(fm, "\n\n"); 
    280 }
     279  owl_fmtext_append_normal(fm, "\n\n");
     280}
  • codelist.pl

    r06adc25 r7869e48  
    2929            print;
    3030        }
    31            
     31
    3232    }
    3333    close(FILE);
  • commands.c

    r39a531d r7869e48  
    6969              "",
    7070              ""),
    71  
     71
    7272  OWLCMD_ARGS("start-command", owl_command_start_command, OWL_CTX_INTERACTIVE,
    7373              "prompts the user to enter a command",
     
    125125              "send an AIM message",
    126126              "aimwrite <user> [-m <message...>]",
    127               "Send an aim message to a user.\n\n" 
     127              "Send an aim message to a user.\n\n"
    128128              "The following options are available:\n\n"
    129129              "-m    Specifies a message to send without prompting.\n"),
     
    139139              "Behaves like zwrite but uses encryption.  Not for use with\n"
    140140              "personal messages\n"),
    141  
     141
    142142  OWLCMD_ARGS("reply", owl_command_reply,  OWL_CTX_INTERACTIVE,
    143143              "reply to the current message",
     
    217217  OWLCMD_VOID("unsuball", owl_command_unsuball, OWL_CTX_ANY,
    218218              "unsubscribe from all zephyrs", "", ""),
    219  
     219
    220220  OWLCMD_VOID("getsubs", owl_command_getsubs, OWL_CTX_ANY,
    221221              "print all current subscriptions",
     
    299299              "display detailed information about the current message",
    300300              "", ""),
    301  
     301
    302302  OWLCMD_ARGS("help", owl_command_help, OWL_CTX_INTERACTIVE,
    303303              "display help on using BarnOwl",
     
    330330              "scrolls receive window to specified position", "", ""),
    331331
    332   OWLCMD_VOID("recv:pagedown", owl_function_mainwin_pagedown, 
     332  OWLCMD_VOID("recv:pagedown", owl_function_mainwin_pagedown,
    333333              OWL_CTX_INTERACTIVE,
    334334              "scrolls down by a page", "", ""),
     
    346346
    347347  OWLCMD_INT ("recv:scroll", owl_function_page_curmsg, OWL_CTX_INTERACTIVE,
    348               "scrolls current message up or down", 
    349               "recv:scroll <numlines>", 
     348              "scrolls current message up or down",
     349              "recv:scroll <numlines>",
    350350              "Scrolls the current message up or down by <numlines>.\n"
    351351              "Scrolls up if <numlines> is negative, else scrolls down.\n"),
     
    396396
    397397  OWLCMD_VOID("last", owl_command_last, OWL_CTX_INTERACTIVE,
    398               "move the pointer to the last message", "", 
     398              "move the pointer to the last message", "",
    399399              "Moves the pointer to the last message in the view.\n"
    400400              "If we are already at the last message in the view,\n"
     
    509509  OWLCMD_VOID("status", owl_command_status, OWL_CTX_ANY,
    510510              "print status information about the running BarnOwl", "", ""),
    511  
     511
    512512  OWLCMD_ARGS("zlocate", owl_command_zlocate, OWL_CTX_INTERACTIVE,
    513513              "locate a user",
    514               "zlocate [-d] <user> ...", 
     514              "zlocate [-d] <user> ...",
    515515              "Performs a zlocate on one ore more users and puts the result\n"
    516516              "int a popwin.  If -d is specified, does not authenticate\n"
    517517              "the lookup request.\n"),
    518  
     518
    519519  OWLCMD_ARGS("filter", owl_command_filter, OWL_CTX_ANY,
    520520              "create a message filter",
     
    674674              "Show errors will show a list of errors encountered by BarnOwl.\n\n"
    675675              "SEE ALSO: filter, view, alias, bindkey, help\n"),
    676  
     676
    677677  OWLCMD_ARGS("delete", owl_command_delete, OWL_CTX_INTERACTIVE,
    678678              "mark a message for deletion",
     
    799799  /****************************************************************/
    800800
    801   OWLCMD_VOID_CTX("edit:move-next-word", owl_editwin_move_to_nextword, 
     801  OWLCMD_VOID_CTX("edit:move-next-word", owl_editwin_move_to_nextword,
    802802                  OWL_CTX_EDIT,
    803803                  "moves cursor forward a word",
    804804                  "", ""),
    805805
    806   OWLCMD_VOID_CTX("edit:move-prev-word", owl_editwin_move_to_previousword, 
     806  OWLCMD_VOID_CTX("edit:move-prev-word", owl_editwin_move_to_previousword,
    807807                  OWL_CTX_EDIT,
    808808                  "moves cursor backwards a word",
     
    814814                  "", ""),
    815815
    816   OWLCMD_VOID_CTX("edit:move-to-buffer-end", owl_editwin_move_to_end, 
     816  OWLCMD_VOID_CTX("edit:move-to-buffer-end", owl_editwin_move_to_end,
    817817                  OWL_CTX_EDIT,
    818818                  "moves cursor to the bottom right (end) of the buffer",
    819819                  "", ""),
    820820
    821   OWLCMD_VOID_CTX("edit:move-to-line-end", owl_editwin_move_to_line_end, 
     821  OWLCMD_VOID_CTX("edit:move-to-line-end", owl_editwin_move_to_line_end,
    822822                  OWL_CTX_EDIT,
    823823                  "moves cursor to the end of the line",
    824824                  "", ""),
    825825
    826   OWLCMD_VOID_CTX("edit:move-to-line-start", owl_editwin_move_to_line_start, 
     826  OWLCMD_VOID_CTX("edit:move-to-line-start", owl_editwin_move_to_line_start,
    827827                  OWL_CTX_EDIT,
    828828                  "moves cursor to the beginning of the line",
    829829                  "", ""),
    830830
    831   OWLCMD_VOID_CTX("edit:move-left", owl_editwin_key_left, 
     831  OWLCMD_VOID_CTX("edit:move-left", owl_editwin_key_left,
    832832                  OWL_CTX_EDIT,
    833833                  "moves the cursor left by a character",
     
    854854                  "", ""),
    855855
    856   OWLCMD_VOID_CTX("edit:delete-next-char", owl_editwin_delete_char, 
     856  OWLCMD_VOID_CTX("edit:delete-next-char", owl_editwin_delete_char,
    857857                  OWL_CTX_EDIT,
    858858                  "deletes the character to the right of the cursor",
     
    864864                  "", ""),
    865865
    866   OWLCMD_VOID_CTX("edit:delete-all", owl_editwin_clear, 
     866  OWLCMD_VOID_CTX("edit:delete-all", owl_editwin_clear,
    867867                  OWL_CTX_EDIT,
    868868                  "deletes all of the contents of the buffer",
     
    874874                  "", ""),
    875875
    876   OWLCMD_VOID_CTX("edit:fill-paragraph", owl_editwin_fill_paragraph, 
     876  OWLCMD_VOID_CTX("edit:fill-paragraph", owl_editwin_fill_paragraph,
    877877                  OWL_CTX_EDIT,
    878878                  "fills the current paragraph to line-wrap well",
    879879                  "", ""),
    880880
    881   OWLCMD_VOID_CTX("edit:recenter", owl_editwin_recenter, 
     881  OWLCMD_VOID_CTX("edit:recenter", owl_editwin_recenter,
    882882                  OWL_CTX_EDIT,
    883883                  "recenters the buffer",
    884884                  "", ""),
    885885
    886   OWLCMD_ARGS_CTX("edit:insert-text", owl_command_edit_insert_text, 
     886  OWLCMD_ARGS_CTX("edit:insert-text", owl_command_edit_insert_text,
    887887                  OWL_CTX_EDIT,
    888888                  "inserts text into the buffer",
    889889                  "edit:insert-text <text>", ""),
    890890
    891   OWLCMD_VOID_CTX("edit:cancel", owl_command_edit_cancel, 
     891  OWLCMD_VOID_CTX("edit:cancel", owl_command_edit_cancel,
    892892                  OWL_CTX_EDIT,
    893893                  "cancels the current command",
    894894                  "", ""),
    895895
    896   OWLCMD_VOID_CTX("edit:history-next", owl_command_edit_history_next, 
     896  OWLCMD_VOID_CTX("edit:history-next", owl_command_edit_history_next,
    897897                  OWL_CTX_EDIT,
    898898                  "replaces the text with the next history",
    899899                  "", ""),
    900900
    901   OWLCMD_VOID_CTX("edit:history-prev", owl_command_edit_history_prev, 
     901  OWLCMD_VOID_CTX("edit:history-prev", owl_command_edit_history_prev,
    902902                  OWL_CTX_EDIT,
    903903                  "replaces the text with the previous history",
     
    932932  OWLCMD_ALIAS   ("editresponse:done", "edit:done"),
    933933
    934   OWLCMD_VOID_CTX("edit:move-up-line", owl_editwin_key_up, 
     934  OWLCMD_VOID_CTX("edit:move-up-line", owl_editwin_key_up,
    935935                  OWL_CTX_EDITMULTI,
    936936                  "moves the cursor up one line",
    937937                  "", ""),
    938938
    939   OWLCMD_VOID_CTX("edit:move-down-line", owl_editwin_key_down, 
     939  OWLCMD_VOID_CTX("edit:move-down-line", owl_editwin_key_down,
    940940                  OWL_CTX_EDITMULTI,
    941941                  "moves the cursor down one line",
    942942                  "", ""),
    943943
    944   OWLCMD_VOID_CTX("edit:done", owl_command_edit_done, 
     944  OWLCMD_VOID_CTX("edit:done", owl_command_edit_done,
    945945                  OWL_CTX_EDIT,
    946946                  "Finishes entering text in the editwin.",
    947947                  "", ""),
    948948
    949   OWLCMD_VOID_CTX("edit:done-or-delete", owl_command_edit_done_or_delete, 
     949  OWLCMD_VOID_CTX("edit:done-or-delete", owl_command_edit_done_or_delete,
    950950                  OWL_CTX_EDITMULTI,
    951951                  "completes the command, but only if at end of message",
    952                   "", 
     952                  "",
    953953                  "If only whitespace is to the right of the cursor,\n"
    954954                  "runs 'edit:done'.\n"\
     
    971971  /****************************************************************/
    972972
    973   OWLCMD_VOID_CTX("popless:scroll-down-page", owl_viewwin_pagedown, 
     973  OWLCMD_VOID_CTX("popless:scroll-down-page", owl_viewwin_pagedown,
    974974                  OWL_CTX_POPLESS,
    975975                  "scrolls down one page",
    976976                  "", ""),
    977977
    978   OWLCMD_VOID_CTX("popless:scroll-down-line", owl_viewwin_linedown, 
     978  OWLCMD_VOID_CTX("popless:scroll-down-line", owl_viewwin_linedown,
    979979                  OWL_CTX_POPLESS,
    980980                  "scrolls down one line",
    981981                  "", ""),
    982982
    983   OWLCMD_VOID_CTX("popless:scroll-up-page", owl_viewwin_pageup, 
     983  OWLCMD_VOID_CTX("popless:scroll-up-page", owl_viewwin_pageup,
    984984                  OWL_CTX_POPLESS,
    985985                  "scrolls up one page",
    986986                  "", ""),
    987987
    988   OWLCMD_VOID_CTX("popless:scroll-up-line", owl_viewwin_lineup, 
     988  OWLCMD_VOID_CTX("popless:scroll-up-line", owl_viewwin_lineup,
    989989                  OWL_CTX_POPLESS,
    990990                  "scrolls up one line",
    991991                  "", ""),
    992992
    993   OWLCMD_VOID_CTX("popless:scroll-to-top", owl_viewwin_top, 
     993  OWLCMD_VOID_CTX("popless:scroll-to-top", owl_viewwin_top,
    994994                  OWL_CTX_POPLESS,
    995995                  "scrolls to the top of the buffer",
    996996                  "", ""),
    997997
    998   OWLCMD_VOID_CTX("popless:scroll-to-bottom", owl_viewwin_bottom, 
     998  OWLCMD_VOID_CTX("popless:scroll-to-bottom", owl_viewwin_bottom,
    999999                  OWL_CTX_POPLESS,
    10001000                  "scrolls to the bottom of the buffer",
    10011001                  "", ""),
    10021002
    1003   OWLCMD_INT_CTX ("popless:scroll-right", owl_viewwin_right, 
     1003  OWLCMD_INT_CTX ("popless:scroll-right", owl_viewwin_right,
    10041004                  OWL_CTX_POPLESS,
    10051005                  "scrolls right in the buffer",
    10061006                  "popless:scroll-right <num-chars>", ""),
    10071007
    1008   OWLCMD_INT_CTX ("popless:scroll-left", owl_viewwin_left, 
     1008  OWLCMD_INT_CTX ("popless:scroll-left", owl_viewwin_left,
    10091009                  OWL_CTX_POPLESS,
    10101010                  "scrolls left in the buffer",
    10111011                  "popless:scroll-left <num-chars>", ""),
    10121012
    1013   OWLCMD_VOID_CTX("popless:quit", owl_command_popless_quit, 
     1013  OWLCMD_VOID_CTX("popless:quit", owl_command_popless_quit,
    10141014                  OWL_CTX_POPLESS,
    10151015                  "exits the popless window",
     
    10661066    return NULL;
    10671067  }
    1068  
     1068
    10691069  owl_function_help_for_command(argv[1]);
    10701070  return NULL;
     
    12521252{
    12531253  char *filename;
    1254  
     1254
    12551255  if (argc!=2) {
    12561256    owl_function_makemsg("usage: dump <filename>");
     
    12811281    if (argc>=1 && !strcmp(argv[1], "--skip-deleted")) {
    12821282      skip_deleted=1;
    1283       argc-=1; argv+=1; 
     1283      argc-=1; argv+=1;
    12841284    } else if (argc>=1 && !strcmp(argv[1], "--last-if-none")) {
    12851285      last_if_none=1;
    1286       argc-=1; argv+=1; 
     1286      argc-=1; argv+=1;
    12871287    } else if (argc>=2 && !strcmp(argv[1], "--filter")) {
    12881288      filter = g_strdup(argv[2]);
    1289       argc-=2; argv+=2; 
     1289      argc-=2; argv+=2;
    12901290    } else if (argc>=2 && !strcmp(argv[1], "--smart-filter")) {
    12911291      filter = owl_function_smartfilter(0, 0);
    1292       argc-=2; argv+=2; 
     1292      argc-=2; argv+=2;
    12931293    } else if (argc>=2 && !strcmp(argv[1], "--smart-filter-instance")) {
    12941294      filter = owl_function_smartfilter(1, 0);
    1295       argc-=2; argv+=2; 
     1295      argc-=2; argv+=2;
    12961296    } else {
    12971297      owl_function_makemsg("Invalid arguments to command 'next'.");
     
    13111311    if (argc>=1 && !strcmp(argv[1], "--skip-deleted")) {
    13121312      skip_deleted=1;
    1313       argc-=1; argv+=1; 
     1313      argc-=1; argv+=1;
    13141314    } else if (argc>=1 && !strcmp(argv[1], "--first-if-none")) {
    13151315      first_if_none=1;
    1316       argc-=1; argv+=1; 
     1316      argc-=1; argv+=1;
    13171317    } else if (argc>=2 && !strcmp(argv[1], "--filter")) {
    13181318      filter = g_strdup(argv[2]);
    1319       argc-=2; argv+=2; 
     1319      argc-=2; argv+=2;
    13201320    } else if (argc>=2 && !strcmp(argv[1], "--smart-filter")) {
    13211321      filter = owl_function_smartfilter(0, 0);
    1322       argc-=2; argv+=2; 
     1322      argc-=2; argv+=2;
    13231323    } else if (argc>=2 && !strcmp(argv[1], "--smart-filter-instance")) {
    13241324      filter = owl_function_smartfilter(1, 0);
    1325       argc-=2; argv+=2; 
     1325      argc-=2; argv+=2;
    13261326   } else {
    13271327      owl_function_makemsg("Invalid arguments to command 'prev'.");
     
    13871387    filtname = owl_function_smartfilter(1, 0);
    13881388  } else {
    1389     owl_function_makemsg("Wrong number of arguments for %s", argv[0]);   
     1389    owl_function_makemsg("Wrong number of arguments for %s", argv[0]);
    13901390  }
    13911391  return filtname;
     
    15821582    owl_function_printallvars();
    15831583    return NULL;
    1584   } 
     1584  }
    15851585
    15861586  if (argc > 1 && !strcmp("-q",argv[1])) {
     
    16561656
    16571657  var=argv[1];
    1658    
     1658
    16591659  v = owl_variable_get_var(owl_global_get_vardict(&g), var);
    16601660  if (v) {
     
    17081708  int  i;
    17091709  if (argc < 2) {
    1710     owl_function_makemsg("Invalid arguments to 'multi' command.");   
     1710    owl_function_makemsg("Invalid arguments to 'multi' command.");
    17111711    return NULL;
    17121712  }
     
    17181718        break;
    17191719      } else if (newbuff[i] != ' ') {
    1720         owl_function_makemsg("Invalid arguments to 'multi' command.");   
     1720        owl_function_makemsg("Invalid arguments to 'multi' command.");
    17211721        g_free(newbuff);
    17221722        return NULL;
     
    20122012  const char *const *myargv;
    20132013  int myargc;
    2014  
     2014
    20152015  if (!owl_global_is_aimloggedin(&g)) {
    20162016    owl_function_error("You are not logged in to AIM.");
     
    20642064{
    20652065  int edit=0;
    2066  
     2066
    20672067  if (argc>=2 && !strcmp("-e", argv[1])) {
    20682068    edit=1;
     
    20712071  }
    20722072
    2073   if ((argc==1) || (argc==2 && !strcmp(argv[1], "all"))) {   
     2073  if ((argc==1) || (argc==2 && !strcmp(argv[1], "all"))) {
    20742074    owl_function_reply(0, !edit);
    20752075  } else if (argc==2 && !strcmp(argv[1], "sender")) {
     
    20782078    const owl_message *m;
    20792079    const owl_view    *v;
    2080     v = owl_global_get_current_view(&g);   
     2080    v = owl_global_get_current_view(&g);
    20812081    m = owl_view_get_element(v, owl_global_get_curmsg(&g));
    20822082    if (m) owl_zephyr_zaway(m);
     
    20962096{
    20972097  int auth;
    2098  
     2098
    20992099  if (argc<2) {
    21002100    owl_function_makemsg("Too few arguments for zlocate command");
     
    22122212      return(NULL);
    22132213    }
    2214    
     2214
    22152215  }
    22162216  return(NULL);
     
    22302230      owl_function_show_filter(argv[2]);
    22312231    }
    2232   } else if (argc==2 
     2232  } else if (argc==2
    22332233             && (!strcmp(argv[1], "zpunts") || !strcmp(argv[1], "zpunted"))) {
    22342234    owl_function_show_zpunts();
     
    22752275  } else if (!strcmp(argv[1], "startup")) {
    22762276    const char *filename;
    2277    
     2277
    22782278    filename=owl_global_get_startupfile(&g);
    22792279    owl_function_popless_file(filename);
     
    23322332  if (argc>1 && !strcmp(argv[1], "--no-move")) {
    23332333    move_after = 0;
    2334     argc--; 
     2334    argc--;
    23352335    argv++;
    23362336  }
     
    23932393  if (argc>1 && !strcmp(argv[1], "--no-move")) {
    23942394    move_after = 0;
    2395     argc--; 
     2395    argc--;
    23962396    argv++;
    23972397  }
     
    24342434{
    24352435  char *filtname;
    2436  
     2436
    24372437  if (argc < 3 || argc > 4) {
    24382438    owl_function_makemsg("Wrong number of arguments to colorclass command");
     
    25042504    owl_function_smartzpunt(1);
    25052505  } else {
    2506     owl_function_makemsg("Wrong number of arguments for %s", argv[0]);   
     2506    owl_function_makemsg("Wrong number of arguments for %s", argv[0]);
    25072507  }
    25082508  return NULL;
     
    25982598    buffstart=skiptokens(buff, 2);
    25992599  }
    2600    
     2600
    26012601  if (argc==1 || (argc==2 && !strcmp(argv[1], "-r"))) {
    26022602    /* When continuing a search, don't consider the current message. */
     
    26062606    owl_function_search_helper(true, direction);
    26072607  }
    2608  
     2608
    26092609  return(NULL);
    26102610}
     
    26162616  buffstart=skiptokens(buff, 1);
    26172617  owl_function_set_search(*buffstart ? buffstart : NULL);
    2618  
     2618
    26192619  return(NULL);
    26202620}
  • context.c

    rf271129 r7869e48  
    2424  if ((((ctx->mode&OWL_CTX_MODE_BITS) & test)
    2525       || !(test&OWL_CTX_MODE_BITS))
    26       && 
    27       (((ctx->mode&OWL_CTX_ACTIVE_BITS) & test) 
     26      &&
     27      (((ctx->mode&OWL_CTX_ACTIVE_BITS) & test)
    2828       || !(test&OWL_CTX_ACTIVE_BITS))) {
    2929    return 1;
  • dict.c

    rf271129 r7869e48  
    1 /* Dictionary data abstraction. 
     1/* Dictionary data abstraction.
    22 * Maps from strings to pointers.
    33 * Stores as a sorted list of key/value pairs.
     
    6868}
    6969
    70 /* Returns 0 on success.  Will copy the key but make 
    71    a reference to the value.  Will clobber an existing 
     70/* Returns 0 on success.  Will copy the key but make
     71   a reference to the value.  Will clobber an existing
    7272   entry with the same key iff delete_on_replace!=NULL,
    7373   and will run delete_on_replace on the old element.
     
    9393    if (pos!=d->size) {
    9494      /* shift forward to leave us a slot */
    95       memmove(d->els+pos+1, d->els+pos, 
     95      memmove(d->els+pos+1, d->els+pos,
    9696              sizeof(owl_dict_el)*(d->size-pos));
    9797    }
    9898    d->size++;
    9999    d->els[pos].k = g_strdup(k);
    100     d->els[pos].v = v;   
     100    d->els[pos].v = v;
    101101    return(0);
    102102  }
  • doc/advanced.txt

    rc82b055 r7869e48  
    4444     type          message type ('zephyr', 'aim', 'admin')
    4545     direction     either 'in' 'out' or 'none'\n"
    46      login         either 'login' 'logout' or 'none'\n" 
     46     login         either 'login' 'logout' or 'none'\n"
    4747
    4848You can also use the operators 'and' 'or' and 'not' as well as the
     
    6464*** WARNING: This interface is still evolving and may change over time ***
    6565
    66 The ~/.owlconf file is interpreted by the perl interpreter. 
     66The ~/.owlconf file is interpreted by the perl interpreter.
    6767You may specify an alternate file by running owl with "owl -c <configfile>".
    6868
     
    7676    owl::format_msg()  run to format messages when using the perl style.
    7777                       The return value is used to display the message on the
    78                        screen. 
     78                       screen.
    7979    owl::receive_msg() run when a message is received, and after
    8080                       it has been added to the message list
     
    8787     owl::command('set zsigproc "/mit/kretch/bin/getzsig foo"');
    8888
    89 will set the owl variable zsigproc to 
     89will set the owl variable zsigproc to
    9090the value "/mit/kretch/bin/getzsig foo".
    9191Note that you will need to watch out for perl quoting issues.
     
    9393
    9494Both owl::format_msg and owl::receive_msg are passed perl owl::Message
    95 objects which have methods for accessing the attributes of the message. 
     95objects which have methods for accessing the attributes of the message.
    9696
    9797(Caveat: Note that these owl::Message objects are currently only
     
    154154    }
    155155
    156 In the above, $m is the owl::Message object and 
     156In the above, $m is the owl::Message object and
    157157its methods are called with $m->METHODNAME.
    158158
    159 An example receiver function that tags all zephyr pings for 
     159An example receiver function that tags all zephyr pings for
    160160deletion would be:
    161161
     
    187187If you use pperl instead of perl, the return value
    188188of the perl command will be displayed in a pop-up window.
    189 This is particularly useful within key bindings 
     189This is particularly useful within key bindings
    190190and aliases.  For example:
    191191
     
    193193
    194194Will cause the "finger" command to be used to finger at the host
    195 where the current message came from.  You can then bind this 
     195where the current message came from.  You can then bind this
    196196to the "f" key with:
    197197
  • doc/barnowl.1

    r8135737 r7869e48  
    3636\fB\-c\fP, \fB\-\-config\-file\fP=\fIFILE\fP
    3737Specify an alternate config file for \fBBarnOwl\fP to use.  The config file is
    38 an arbitrary Perl script evaluated in the \fImain\fP package, and if it 
    39 overrides the \fIBarnOwl::startup\fP method that is run when \fBBarnOwl\fP 
    40 starts.  (Compare \fI~/.owl/startup\fP, which contains \fBBarnOwl\fP commands 
     38an arbitrary Perl script evaluated in the \fImain\fP package, and if it
     39overrides the \fIBarnOwl::startup\fP method that is run when \fBBarnOwl\fP
     40starts.  (Compare \fI~/.owl/startup\fP, which contains \fBBarnOwl\fP commands
    4141that are run at startup after the config file is loaded.)
    4242
    43 By default, \fBBarnOwl\fP uses the first of \fI~/.owl/init.pl\fP, 
     43By default, \fBBarnOwl\fP uses the first of \fI~/.owl/init.pl\fP,
    4444\fI~/.barnowlconf\fP, or \fI~/.owlconf\fP that exists.
    4545
  • doc/code.txt

    rd40ad8b r7869e48  
    1616             is owl_function_command("foo");
    1717             Commands are only active within specific contexts,
    18              and attempts to call them from invalid contexts will fail.     
     18             and attempts to call them from invalid contexts will fail.
    1919
    20 context:     A context specifies the current state of owl, in terms 
     20context:     A context specifies the current state of owl, in terms
    2121             of which modal window is active and which point
    2222             in its life owl is in (eg, in startup, or running).
    23              This is implemented as a bitmask and there is 
     23             This is implemented as a bitmask and there is
    2424             some hierarchy.  Commands may restrict themselves
    2525             to only running in a limited number of contexts
     
    3434             Sometimes also referred to as typewin.
    3535
    36 filter:      Patterns which match messages.  These may 
    37              contain multiple filterelements which may be 
     36filter:      Patterns which match messages.  These may
     37             contain multiple filterelements which may be
    3838             combined together (eg, by "and" and "or").
    39              
    40 filterelement: An element of a filter which matches on some 
     39
     40filterelement: An element of a filter which matches on some
    4141               attribute of a message.
    4242
     
    4444             These are particularly useful for building up
    4545             text regions that are to be rendered on-screen,
    46              as they resize memory as needed, and they have 
     46             as they resize memory as needed, and they have
    4747             routines for cropping as needed.
    4848
     
    5555             owl.h defines "g" as a singleton instance of owl_global.
    5656             Where possible/appropriate, most accesses to global data should
    57              be from a limited number of files (eg, from owl.c and 
     57             be from a limited number of files (eg, from owl.c and
    5858             functions.c).  Consider whether you really need to before
    5959             adding in uses of global.
     
    103103             Also contains the main loop, which is roughly:
    104104             - handle scheduled resizes, and anything that might result
    105              - while zephyrs are pending, grab incoming zephyrs 
     105             - while zephyrs are pending, grab incoming zephyrs
    106106               and handle them (which includes formatting them
    107107               with either perl extension or default formatter
     
    109109             - updates mainwin display if there are new zephyrs
    110110             - displays and updates popwins and the terminal as necessary
    111              - sends characters to the popwin, recwin/mainwin, 
     111             - sends characters to the popwin, recwin/mainwin,
    112112               or typewin/editwin
    113113
     
    118118                   Created by codelist.pl.
    119119
    120 popwin:      Modal pop-up window container. 
     120popwin:      Modal pop-up window container.
    121121             Usually contains a viewwin for read-only scrolling text.
    122122
     
    126126
    127127util:        Misc utility functions that don't fit anywhere yet:
    128              - sepbar rendering 
     128             - sepbar rendering
    129129             - tokenizing and parsing utilities
    130130             - downstr
     
    186186        something, and this should be the exception to the rule.
    187187
    188         Owl should be generally useful out-of-the-box without 
    189         extensive configuration, for most people's needs. 
     188        Owl should be generally useful out-of-the-box without
     189        extensive configuration, for most people's needs.
    190190        People shouldn't have to spend days tweaking
    191191        with config files before being happy switching to it.
  • doc/intro.txt

    rd7cc50b r7869e48  
    188188variable.  For example:
    189189
    190      set personalbell on 
     190     set personalbell on
    191191
    192192will set the value of the variable 'personalbell' to 'on'.  The
     
    347347    owl::format_msg()  run to format messages when using the perl style.
    348348                       The return value is used to display the message on the
    349                        screen. 
     349                       screen.
    350350    owl::receive_msg() run when a message is received, and after
    351351                       it has been added to the message list
     
    424424For example:
    425425
    426    bindkey recv C-k command delete 
    427 
    428 will bind Control-k to the delete command, but only in the 
     426   bindkey recv C-k command delete
     427
     428will bind Control-k to the delete command, but only in the
    429429recv window context.
    430430
    431 Some keymaps inherit their bindings from more 
     431Some keymaps inherit their bindings from more
    432432general keymaps.  The valid keymaps are:
    433433
     
    438438    |  |-editresponse - single-line responses to questions
    439439    |-popless         - scrolling pop-up windows
    440     |-recv            - the main message list window 
     440    |-recv            - the main message list window
    441441                        where received messages are displayed
    442442
     
    445445Note that not all commands may be used in all contexts.
    446446
    447 Key sequences may be surrounded by quotes and include 
     447Key sequences may be surrounded by quotes and include
    448448a sequence of keys that must be pressed in order
    449449to execute the command.  For example:
  • editwin.c

    r7803326 r7869e48  
    12861286  const char *p;
    12871287  int width = offset;
    1288  
     1288
    12891289  for(p = e->buff + start;
    12901290      p < e->buff + end;
     
    13901390{
    13911391  char *p;
    1392  
     1392
    13931393  p = g_new(char, end - start + 1);
    13941394  memcpy(p, e->buff + start, end - start);
     
    14181418  if (e->win) owl_window_dirty(e->win);
    14191419}
    1420 
    14211420
    14221421
  • examples/owlconf.erik

    rd7cc50b r7869e48  
    1 ### The owlconf config file   -*- perl -*- 
     1### The owlconf config file   -*- perl -*-
    22###
    33### !!!!!WARNING!!!!! !!!!!WARNING!!!!! !!!!!WARNING!!!!! !!!!!WARNING!!!!!
    4 ### This is an example file intended to demonstrate how to use 
     4### This is an example file intended to demonstrate how to use
    55### various features of owl.  Some of the key bindings, in particular,
    66### are more for examples than things you may actually want to use.
     
    3030### The message attributes may be dereferenced with $m->attribute
    3131###
    32 ###   
     32###
    3333
    3434# tokens for sepbar are:
     
    122122}
    123123
    124 # Load in things which don't belong in an owlconf 
     124# Load in things which don't belong in an owlconf
    125125# that people might use as an example...
    126126sub personal_startup {
     
    231231            sepbartokens_add("<$sender");
    232232            sepbartokens_trim(">$sender");
    233         } 
     233        }
    234234    } elsif ($m->is_mail) {
    235235        mail_add_message($m);
     
    249249    my ($b) = @_;
    250250    $b=~s/^/    /g;
    251     $b=~s/\n/\n    /g;   
     251    $b=~s/\n/\n    /g;
    252252    return $b;
    253253}
     
    282282    }
    283283
    284     if (!$m->is_zephyr && !$m->is_aim) { 
     284    if (!$m->is_zephyr && !$m->is_aim) {
    285285        return "Unknown message type: ".$m->type."\n";
    286286    }
     
    308308
    309309    if ($m->is_zephyr) {
    310         $out = sprintf "[mit,%s,%s] / %s / %s", lc($m->class), 
     310        $out = sprintf "[mit,%s,%s] / %s / %s", lc($m->class),
    311311        lc($m->instance), $m->time, lc($m->host);
    312312        if ($m->opcode ne "") {$out.=" op:".$m->opcode;}
     
    322322            }
    323323        }
    324         $out.="\n";             
     324        $out.="\n";
    325325    } else {
    326326        $out = sprintf "[%s] / %s\n", lc($m->type), $m->time;
    327327        $out.= "  \@bold($sender)> ";
    328         $out.="\n";             
     328        $out.="\n";
    329329    }
    330330
     
    380380    }
    381381
    382     if (!$m->is_zephyr && !$m->is_aim) { 
     382    if (!$m->is_zephyr && !$m->is_aim) {
    383383        return "Unknown message type: ".$m->type."\n";
    384384    }
     
    402402        }
    403403        return "$out\n";
    404                
     404
    405405    } elsif ($m->is_zephyr && $m->is_mail) {
    406406        my $body = $m->body;
     
    414414    my $channel = "";
    415415    my $body = $m->body;
    416    
     416
    417417    if ($m->is_zephyr) {
    418418        my $inst = $m->instance;
     
    459459    }
    460460    for my $w (@words) {
    461         if (($outline ne "") 
     461        if (($outline ne "")
    462462            && (length($outline)+length($w) > $width-$unindent)) {
    463463            $out .= $outline."\n";
     
    472472        $outline .= $w;
    473473    }
    474     $out .= $outline . "\n";   
    475 }
     474    $out .= $outline . "\n";
     475}
  • examples/owlconf.simple

    rd7cc50b r7869e48  
    1 ### The owlconf config file   -*- perl -*- 
     1### The owlconf config file   -*- perl -*-
    22
    33### !!!!!WARNING!!!!! !!!!!WARNING!!!!! !!!!!WARNING!!!!! !!!!!WARNING!!!!!
    4 ### This is an example file intended to demonstrate how to use 
     4### This is an example file intended to demonstrate how to use
    55### various features of owl.  Some of the key bindings, in particular,
    66### are more for examples than things you may actually want to use.
     
    3636###     $owl::sender, $owl::opcode, $owl::zsig,
    3737###     $owl::msg, $owl::time, $owl::host, @owl::fields, $owl::id
    38 ###   
     38###
    3939
    4040# NOTE: Lines beginning with a "#" are perl comments.
     
    4949    ## Doing "help" will show you more about each variable.
    5050    ## These lines will set things to the default.
    51     ## You can uncomment them and then change the value to get 
     51    ## You can uncomment them and then change the value to get
    5252    ## a different behavior (remove the "#" to an alternate value).
    5353    ################################################################
     
    6060
    6161    ## Set this to on to enable logging of personal zephyrs
    62     # owl::command('set -q logging off'); 
     62    # owl::command('set -q logging off');
    6363
    6464    ## This directory must exist and is where personal zephyrs are logged.
     
    6767
    6868    ## Set this to on to enable logging of classes
    69     # owl::command('set -q classlogging off'); 
     69    # owl::command('set -q classlogging off');
    7070
    7171    ## This directory must exist and is where class zephyrs are logged.
     
    105105    ################################################################
    106106    ## The following create filters.  Filters can be used to select
    107     ## on multiple zephyrs for operations.  With 'views' you can 
     107    ## on multiple zephyrs for operations.  With 'views' you can
    108108    ## look at only the zephyrs matching a particular filter.
    109109    ## Use the 'view <filtername>' command or the 'v' key to switch views.
     
    114114    ## The filter command creates a filter with the specified name,
    115115    ## or if one already exists it is replaced.  Example filter
    116     ## syntax would be:                                       
     116    ## syntax would be:
    117117    ##
    118118    ##    filter myfilter -c red ( class ^foobar$ ) or ( class ^quux$ and instance ^bar$ )
     
    123123    ## is used it specifies the color that messages matching this filter
    124124    ## should be displayed in.  Do 'show colors' to see the available colors.
    125     ## 
     125    ##
    126126    ################################################################
    127127
     
    137137    ## The 'trash' filter is used when you press 'T' to mark things
    138138    ## for autodeletion.
    139     # owl::command('filter trash class ^mail$ or opcode ^ping$ or type ^admin$ or class ^login$');   
     139    # owl::command('filter trash class ^mail$ or opcode ^ping$ or type ^admin$ or class ^login$');
    140140
    141141}
     
    188188    ## Note that:
    189189    ##   $out .= "foo";  appends "foo" to the end of the variable $out.
    190     ##   lc(bar) will convert bar to lowercase.   
     190    ##   lc(bar) will convert bar to lowercase.
    191191    ##   "ne" does "not equal" for string comparison.
    192192    ##   sprintf fills in the %s's with the arguments later on the line.
     
    213213        # Incoming messages
    214214
    215         $out .= sprintf "[mit,%s,%s] / %s / %s", lc($owl::class), 
     215        $out .= sprintf "[mit,%s,%s] / %s / %s", lc($owl::class),
    216216                        lc($owl::instance), $owl::time, lc($owl::host);
    217217        if ($owl::opcode ne "") {$out.=" op:$owl::opcode";}
     
    228228        }
    229229    }
    230     $out.="\n";         
     230    $out.="\n";
    231231
    232232    # This indents the body of the message and then appends it on.
     
    251251## In most cases you won't need anything here.
    252252sub owl::receive_msg() {
    253    
     253
    254254    ## If this is uncommented, it would mark all messages
    255255    ## with opcode "PING" for immediate deletion:
  • examples/owlconf.vtformat

    rd7cc50b r7869e48  
    1 ### The owlconf config file   -*- perl -*- 
     1### The owlconf config file   -*- perl -*-
    22###
    33### This file is interpreted by the perl interpreter.
     
    2323###     $owl::sender, $owl::opcode, $owl::zsig,
    2424###     $owl::msg, $owl::time, $owl::host, @owl::fields
    25 ###   
     25###
    2626
    2727# classes will be appreviated this way
     
    124124    }
    125125    for my $w (@words) {
    126         if (($outline ne "") 
     126        if (($outline ne "")
    127127            && (length($outline)+length($w) > $width-$unindent)) {
    128128            $out .= $outline."\n";
     
    137137        $outline .= $w;
    138138    }
    139     $out .= $outline . "\n";   
     139    $out .= $outline . "\n";
    140140}
  • filterelement.c

    r7756dde r7869e48  
    7575     */
    7676    return 0;
    77   } 
     77  }
    7878  return owl_filter_message_match(subfilter, m);
    7979}
  • fmtext.c

    rf271129 r7869e48  
    2626{
    2727  int a = 0, fg = 0, bg = 0;
    28  
     28
    2929  if (attr != OWL_FMTEXT_ATTR_NONE) a=1;
    3030  if (fgcolor != OWL_COLOR_DEFAULT) fg=1;
     
    121121    p = strchr(p+1, OWL_FMTEXT_UC_STARTBYTE_UTF8);
    122122  }
    123 } 
     123}
    124124
    125125/* Internal function.  Append text from 'in' between index 'start'
     
    205205  char attr;
    206206  short fg, bg, pair = 0;
    207  
     207
    208208  if (w==NULL) {
    209209    owl_function_debugmsg("Hit a null window in owl_fmtext_curs_waddstr.");
     
    226226      /* Deal with all text from last insert to here. */
    227227      char tmp;
    228    
     228
    229229      tmp = p[0];
    230230      p[0] = '\0';
     
    243243          _owl_fmtext_wattrset(w, attr ^ OWL_FMTEXT_ATTR_REVERSE);
    244244          _owl_fmtext_wcolor_set(w, pair);
    245          
     245
    246246          waddnstr(w, s + start, end - start);
    247247
     
    332332  const char *ptr1, *ptr2;
    333333  int i, offset;
    334  
     334
    335335  /* find the starting line */
    336336  ptr1 = in->buff->str;
     
    340340    ptr1++;
    341341  }
    342  
     342
    343343  /* ptr1 now holds the starting point */
    344344
     
    375375      break;
    376376    }
    377    
     377
    378378    if (ptr_e == ptr_s) {
    379379      owl_fmtext_append_normal(out, "\n");
     
    392392        chwidth = mk_wcwidth(c);
    393393        if (col + chwidth > bcol) break;
    394        
     394
    395395        if (col >= acol) {
    396396          if (st == 0) {
     
    596596        continue;
    597597      }
    598        
     598
    599599      /* if there's no opener, print the @ and continue */
    600600      tmpptr=strpbrk(txtptr, "(<[{ ");
     
    657657        /* if it's a color read the color, set the current color and
    658658           continue */
    659       } else if (!strcasecmp(buff, "@color") 
     659      } else if (!strcasecmp(buff, "@color")
    660660                 && owl_global_is_colorztext(&g)) {
    661661        g_free(buff);
     
    756756
    757757/* requires that the list values are strings or NULL.
    758  * joins the elements together with join_with. 
     758 * joins the elements together with join_with.
    759759 * If format_fn is specified, passes it the list element value
    760760 * and it will return a string which this needs to free. */
     
    837837  if (fg > COLORS || fg < OWL_COLOR_DEFAULT) fg = OWL_COLOR_DEFAULT;
    838838  if (bg > COLORS || bg < OWL_COLOR_DEFAULT) bg = OWL_COLOR_DEFAULT;
    839            
     839
    840840#ifdef HAVE_USE_DEFAULT_COLORS
    841841  if (fg == OWL_COLOR_DEFAULT) fg = -1;
  • functions.c

    r06470d7 r7869e48  
    88{
    99  owl_function_debugmsg("executing command: %s", cmdbuff);
    10   return owl_cmddict_execute(owl_global_get_cmddict(&g), 
     10  return owl_cmddict_execute(owl_global_get_cmddict(&g),
    1111                             owl_global_get_context(&g), cmdbuff);
    1212}
     
    198198  m=g_new(owl_message, 1);
    199199  owl_message_create_admin(m, header, body);
    200  
     200
    201201  /* add it to the global list and current view */
    202202  owl_messagelist_append_element(owl_global_get_msglist(&g), m);
     
    250250  /* error if we're not logged into aim */
    251251  if (!owl_global_is_aimloggedin(&g)) return(NULL);
    252  
     252
    253253  m=g_new(owl_message, 1);
    254254  owl_message_create_aim(m,
     
    455455  if (unwrap)
    456456    owl_text_wordunwrap(format_msg);
    457  
     457
    458458  /* send the message */
    459459  ret=owl_aim_send_im(to, format_msg);
     
    485485  format_msg=g_strdup(msg);
    486486  owl_text_wordunwrap(format_msg);
    487  
     487
    488488  /* send the message */
    489489  ret=owl_aim_send_awaymsg(to, format_msg);
     
    534534
    535535/* If filter is non-null, looks for the next message matching
    536  * that filter.  If skip_deleted, skips any deleted messages. 
     536 * that filter.  If skip_deleted, skips any deleted messages.
    537537 * If last_if_none, will stop at the last message in the view
    538538 * if no matching messages are found.  */
     
    707707
    708708  if (move_after) {
    709     /* move the poiner in the appropriate direction 
     709    /* move the poiner in the appropriate direction
    710710     * to the next undeleted msg */
    711711    if (owl_global_get_direction(&g)==OWL_DIRECTION_UPWARDS) {
     
    723723
    724724  v=owl_global_get_current_view(&g);
    725  
     725
    726726  if (owl_view_get_size(v) < 1) {
    727727    owl_function_error("No current message to undelete");
     
    801801
    802802  owl_function_redisplay_to_nearest(lastmsgid, v);
    803  
     803
    804804  owl_function_makemsg("Messages expunged");
    805805}
     
    820820  v=owl_global_get_current_view(&g);
    821821  oldcurmsg=owl_global_get_curmsg(&g);
    822   curmsg=owl_view_get_size(v)-1; 
     822  curmsg=owl_view_get_size(v)-1;
    823823  if (curmsg<0) curmsg=0;
    824824  owl_global_set_curmsg(&g, curmsg);
     
    830830    owl_global_set_topmsg(&g, curmsg+1);
    831831    owl_global_set_curmsg(&g, curmsg+1);
    832   } 
     832  }
    833833  owl_mainwin_redisplay(owl_global_get_mainwin(&g));
    834834  owl_global_set_direction_downwards(&g);
     
    995995{
    996996  char *ret;
    997  
     997
    998998  /* zlog out if we need to */
    999999  if (owl_global_is_havezephyr(&g) &&
     
    10101010    kill(owl_global_get_newmsgproc_pid(&g), SIGHUP);
    10111011  }
    1012  
     1012
    10131013  /* Quit AIM */
    10141014  if (owl_global_is_aimloggedin(&g)) {
     
    10601060}
    10611061
    1062 /* Returns what the new topmsg should be. 
    1063  * Passed the last direction of movement, 
     1062/* Returns what the new topmsg should be.
     1063 * Passed the last direction of movement,
    10641064 * the current view,
    10651065 * the current message number in the view,
     
    10741074int owl_function_calculate_topmsg_neartop(int direction, const owl_view *v, int curmsg, int topmsg, int recwinlines)
    10751075{
    1076   if (curmsg>0 
     1076  if (curmsg>0
    10771077      && (owl_message_get_numlines(owl_view_get_element(v, curmsg-1))
    10781078          <  recwinlines/2)) {
     
    10821082  }
    10831083}
    1084  
     1084
    10851085int owl_function_calculate_topmsg_center(int direction, const owl_view *v, int curmsg, int topmsg, int recwinlines)
    10861086{
     
    10961096  return(last);
    10971097}
    1098  
     1098
    10991099int owl_function_calculate_topmsg_paged(int direction, const owl_view *v, int curmsg, int topmsg, int recwinlines, int center_on_page)
    11001100{
    11011101  int i, last, lines, savey;
    1102  
    1103   /* If we're off the top of the screen, scroll up such that the 
     1102
     1103  /* If we're off the top of the screen, scroll up such that the
    11041104   * curmsg is near the botton of the screen. */
    11051105  if (curmsg < topmsg) {
     
    11421142
    11431143  if (curmsg<0) return(topmsg);
    1144    
     1144
    11451145  /* If we're off the top of the screen then center */
    11461146  if (curmsg<topmsg) {
     
    11671167    direction=OWL_DIRECTION_UPWARDS;
    11681168  }
    1169  
     1169
    11701170  /* If our bottom line is less than 1/4 down the screen then scroll up */
    11711171  if (direction == OWL_DIRECTION_UPWARDS || direction == OWL_DIRECTION_NONE) {
     
    13861386
    13871387  owl_fmtext_init_null(&fm);
    1388  
     1388
    13891389  v=owl_global_get_current_view(&g);
    13901390  m=owl_view_get_element(v, owl_global_get_curmsg(&g));
     
    14221422  if (owl_message_is_type_zephyr(m)) {
    14231423    owl_fmtext_append_bold(&fm, "\nZephyr Specific Information:\n");
    1424    
     1424
    14251425    owl_fmtext_appendf_normal(&fm, "  Class     : %s\n", owl_message_get_class(m));
    14261426    owl_fmtext_appendf_normal(&fm, "  Instance  : %s\n", owl_message_get_instance(m));
     
    14931493  owl_message_attributes_tofmtext(m, &attrfm);
    14941494  owl_fmtext_append_fmtext(&fm, &attrfm);
    1495  
     1495
    14961496  owl_function_popless_fmtext(&fm);
    14971497  owl_fmtext_cleanup(&fm);
     
    15481548      return;
    15491549    }
    1550    
     1550
    15511551    /* Bail if we're not truncated */
    15521552    if (!owl_mainwin_is_curmsg_truncated(owl_global_get_mainwin(&g))) {
     
    15551555    }
    15561556  }
    1557  
    1558  
     1557
     1558
    15591559  /* don't scroll past the last line */
    15601560  if (step>0) {
     
    15741574    }
    15751575  }
    1576  
     1576
    15771577  /* redisplay */
    15781578  owl_mainwin_redisplay(owl_global_get_mainwin(&g));
     
    16171617    owl_function_popless_text("Error getting subscriptions");
    16181618  }
    1619            
     1619
    16201620  g_free(buff);
    16211621}
     
    16581658  const owl_variable *v;
    16591659  GPtrArray *varnames;
    1660   owl_fmtext fm; 
     1660  owl_fmtext fm;
    16611661  int i;
    16621662  const char *varname;
    16631663
    16641664  owl_fmtext_init_null(&fm);
    1665   owl_fmtext_append_bold(&fm, 
     1665  owl_fmtext_append_bold(&fm,
    16661666      "Variables: (use 'show variable <name>' for details)\n");
    16671667  varnames = owl_variable_dict_get_names(owl_global_get_vardict(&g));
     
    16811681{
    16821682  const owl_variable *v;
    1683   owl_fmtext fm; 
     1683  owl_fmtext fm;
    16841684
    16851685  owl_fmtext_init_null(&fm);
     
    18191819  owl_fmtext_append_normal(&fm, "no\n");
    18201820#endif
    1821  
     1821
    18221822
    18231823  owl_fmtext_append_normal(&fm, "\nAIM Status:\n");
     
    18721872  const owl_message *m;
    18731873  const owl_filter *f;
    1874  
     1874
    18751875  if (owl_view_get_size(owl_global_get_current_view(&g))==0) {
    18761876    owl_function_error("No message selected");
    18771877  } else {
    18781878    char *cmd;
    1879    
     1879
    18801880    m=owl_view_get_element(owl_global_get_current_view(&g), owl_global_get_curmsg(&g));
    18811881    if (!m) {
     
    20202020#if OWL_STDERR_REDIR
    20212021  redirect = " < /dev/null";
    2022 #endif 
     2022#endif
    20232023
    20242024  if (argc<2) {
     
    20362036    out = owl_slurp(p);
    20372037    pclose(p);
    2038    
     2038
    20392039    if (type == OWL_OUTPUT_RETURN) {
    20402040      g_free(newbuff);
     
    20672067
    20682068  perlout = owl_perlconfig_execute(buff);
    2069   if (perlout) { 
     2069  if (perlout) {
    20702070    if (type == OWL_OUTPUT_POPUP) {
    20712071      owl_function_popless_text(perlout);
     
    21142114  /* Figure out what to set the current message to.
    21152115   * - If the view we're leaving has messages in it, go to the closest message
    2116    *   to the last message pointed to in that view. 
     2116   *   to the last message pointed to in that view.
    21172117   * - If the view we're leaving is empty, try to restore the position
    21182118   *   from the last time we were in the new view.  */
     
    22272227
    22282228  owl_function_debugmsg("owl_function_create_negative_filter");
    2229  
     2229
    22302230  if (!strncmp(filtername, "not-", 4)) {
    22312231    newname=g_strdup(filtername+4);
     
    23162316 * If 'related' is nonzero, encompass unclasses and .d classes as well.
    23172317 */
    2318 CALLER_OWN char *owl_function_classinstfilt(const char *c, const char *i, int related) 
     2318CALLER_OWN char *owl_function_classinstfilt(const char *c, const char *i, int related)
    23192319{
    23202320  owl_filter *f;
     
    23502350    }
    23512351  }
    2352  
     2352
    23532353  /* if it already exists then go with it.  This lets users override */
    23542354  if (owl_global_get_filter(&g, filtname)) {
     
    25402540  owl_function_makemsg("%i messages marked for %sdeletion", j, flag?"":"un");
    25412541
    2542   owl_mainwin_redisplay(owl_global_get_mainwin(&g)); 
     2542  owl_mainwin_redisplay(owl_global_get_mainwin(&g));
    25432543}
    25442544
     
    25882588 * If the curmsg is a zephyr class message, instance foo, recip *,
    25892589 *    return a filter name to the class, inst.
    2590  * If the curmsg is a zephyr class message and type==0 then 
     2590 * If the curmsg is a zephyr class message and type==0 then
    25912591 *    return a filter name for just the class.
    2592  * If the curmsg is a zephyr class message and type==1 then 
     2592 * If the curmsg is a zephyr class message and type==1 then
    25932593 *    return a filter name for the class and instance.
    25942594 * If the curmsg is a personal AIM message returna  filter
    2595  *    name to the AIM conversation with that user 
     2595 *    name to the AIM conversation with that user
    25962596 */
    25972597CALLER_OWN char *owl_function_smartfilter(int type, int invert_related)
     
    26702670void owl_function_smartzpunt(int type)
    26712671{
    2672   /* Starts a zpunt command based on the current class,instance pair. 
     2672  /* Starts a zpunt command based on the current class,instance pair.
    26732673   * If type=0, uses just class.  If type=1, uses instance as well. */
    26742674  const owl_view *v;
     
    26762676  const char *mclass, *minst;
    26772677  GString *buf;
    2678  
     2678
    26792679  v=owl_global_get_current_view(&g);
    26802680  m=owl_view_get_element(v, owl_global_get_curmsg(&g));
     
    27592759  }
    27602760  owl_filter_set_fgcolor(f, owl_util_string_to_color(fgcolor));
    2761  
     2761
    27622762  owl_mainwin_redisplay(owl_global_get_mainwin(&g));
    27632763  return(0);
     
    27672767{
    27682768  owl_fmtext fm;
    2769   int i; 
    2770  
     2769  int i;
     2770
    27712771  owl_fmtext_init_null(&fm);
    27722772  owl_fmtext_append_normal(&fm,"default:  ");
     
    28052805     g_free(str2);
    28062806  }
    2807  
     2807
    28082808  owl_function_popless_fmtext(&fm);
    28092809  owl_fmtext_cleanup(&fm);
     
    29232923  }
    29242924  owl_fmtext_append_normal(&fm, "\n");
    2925  
     2925
    29262926  owl_function_popless_fmtext(&fm);
    29272927  owl_ptr_array_free(l, g_free);
     
    29312931CALLER_OWN char *owl_function_keymap_summary(const char *name)
    29322932{
    2933   const owl_keymap *km 
     2933  const owl_keymap *km
    29342934    = owl_keyhandler_get_keymap(owl_global_get_keyhandler(&g), name);
    29352935  if (km) return owl_keymap_summary(km);
     
    29492949  } else {
    29502950    owl_fmtext_append_normal(&fm, "No such keymap...\n");
    2951   } 
     2951  }
    29522952  owl_function_popless_fmtext(&fm);
    29532953  owl_fmtext_cleanup(&fm);
     
    29602960  owl_fmtext_init_null(&fm);
    29612961  owl_cmd_get_help(owl_global_get_cmddict(&g), cmdname, &fm);
    2962   owl_function_popless_fmtext(&fm); 
     2962  owl_function_popless_fmtext(&fm);
    29632963  owl_fmtext_cleanup(&fm);
    29642964}
     
    29932993  viewsize=owl_view_get_size(v);
    29942994  curmsg=owl_global_get_curmsg(&g);
    2995  
     2995
    29962996  if (viewsize==0) {
    29972997    owl_function_makemsg("No messages present");
     
    30413041}
    30423042
    3043 /* strips formatting from ztext and returns the unformatted text. 
     3043/* strips formatting from ztext and returns the unformatted text.
    30443044 * caller is responsible for freeing. */
    30453045CALLER_OWN char *owl_function_ztext_stylestrip(const char *zt)
     
    31673167
    31683168/* Dump messages in the current view to the file 'filename'. */
    3169 void owl_function_dump(const char *filename) 
     3169void owl_function_dump(const char *filename)
    31703170{
    31713171  int i, j;
     
    32213221      }
    32223222    }
    3223    
     3223
    32243224    /* if it exited, spawn a new one */
    32253225    if (owl_global_get_newmsgproc_pid(&g)==0) {
  • global.c

    r0792d99 r7869e48  
    5555  g->lastinputtime=g->starttime;
    5656  g->newmsgproc_pid=0;
    57  
     57
    5858  owl_global_set_config_format(g, 0);
    5959  owl_global_set_no_have_config(g);
     
    596596int owl_global_should_followlast(owl_global *g) {
    597597  const owl_view *v;
    598  
     598
    599599  if (!owl_global_is__followlast(g)) return(0);
    600  
     600
    601601  v=owl_global_get_current_view(g);
    602  
     602
    603603  if (owl_global_get_curmsg(g)==owl_view_get_size(v)-1) return(1);
    604604  return(0);
     
    743743  return(&(g->buddylist));
    744744}
    745  
     745
    746746/* style */
    747747
  • help.c

    rd6b8b50 r7869e48  
    1111  owl_fmtext_init_null(&fm);
    1212  owl_fmtext_append_bold
    13     (&fm, 
     13    (&fm,
    1414     "OWL HELP\n\n");
    1515
    1616  owl_fmtext_append_normal
    17     (&fm, 
     17    (&fm,
    1818     "  If you're new to BarnOwl, the first thing you should type is\n\n"
    1919     "    :show quickstart\n\n"
     
    2424
    2525  owl_fmtext_append_bold
    26     (&fm, 
     26    (&fm,
    2727     "  Basic Keys:\n"
    2828     );
    2929  owl_fmtext_append_normal
    30     (&fm, 
     30    (&fm,
    3131     "    n             Move to next non-deleted message\n"
    3232     "    p             Move to previous non-deleted message\n"
     
    7878     );
    7979  owl_fmtext_append_bold
    80     (&fm, 
     80    (&fm,
    8181     "  Basic Commands:\n"
    8282     );
    8383  owl_fmtext_append_normal
    84     (&fm, 
     84    (&fm,
    8585     "    quit, exit    Exit BarnOwl\n"
    8686     "    help          Get help about commands\n"
     
    125125     "    version       Print the version number of BarnOwl\n"
    126126     "\n");
    127  
     127
    128128  /* help for variables */
    129   owl_fmtext_append_bold(&fm, 
     129  owl_fmtext_append_bold(&fm,
    130130                         "Variables:\n");
    131131  varnames = owl_variable_dict_get_names(owl_global_get_vardict(&g));
  • keybinding.c

    rf271129 r7869e48  
    22
    33/*
    4  * TODO: Idea for allowing functions to be user-specified --- 
    5  *      Have function have a context bitmask that says where it 
     4 * TODO: Idea for allowing functions to be user-specified ---
     5 *      Have function have a context bitmask that says where it
    66 *      can be used, and have keymaps also have one, and compare
    77 *      the two when setting.
    8  *     
     8 *
    99 */
    1010
  • keymap.c

    rf271129 r7869e48  
    4141    return -1;
    4242  /* see if another matching binding, and if so remove it.
    43    * otherwise just add this one. 
     43   * otherwise just add this one.
    4444   */
    4545  for (i = km->bindings->len-1; i >= 0; i--) {
     
    9999    owl_fmtext_append_normal(fm, "\n");
    100100  if (km->default_fn) {
    101     owl_fmtext_append_normal(fm, OWL_TABSTR 
     101    owl_fmtext_append_normal(fm, OWL_TABSTR
    102102     "Has a default keypress handler (default_fn).\n");
    103103  }
     
    107107  }
    108108  if (km->postalways_fn) {
    109     owl_fmtext_append_normal(fm, OWL_TABSTR 
     109    owl_fmtext_append_normal(fm, OWL_TABSTR
    110110     "Executes a function (postalways_fn) after handling every keypress.\n");
    111111  }
    112112
    113   owl_fmtext_append_bold(fm, "\nKey bindings:\n\n"); 
     113  owl_fmtext_append_bold(fm, "\nKey bindings:\n\n");
    114114  if (recurse) {
    115115    _owl_keymap_format_with_parents(km, fm);
     
    136136  int i;
    137137  const owl_keybinding *kb;
    138  
     138
    139139  for (i = 0; i < km->bindings->len; i++) {
    140140    char *kbstr;
     
    160160      owl_fmtext_append_normal(fm, kb->command);
    161161      owl_fmtext_append_normal(fm, "]");
    162     } 
     162    }
    163163    owl_fmtext_append_normal(fm, "\n");
    164164  }
     
    249249    kh->in_esc = 0;
    250250  }
    251  
     251
    252252  kh->kpstack[++(kh->kpstackpos)] = j.ch;
    253253  if (kh->kpstackpos >= OWL_KEYMAP_MAXSTACK) {
     
    301301  owl_keyhandler_invalidkey(kh);
    302302  /* unable to handle */
    303   return(1); 
     303  return(1);
    304304}
    305305
  • keypress.c

    rf271129 r7869e48  
    66} specialmap[] = {
    77#ifdef KEY_CODE_YES
    8    { KEY_CODE_YES,      "CODE_YES" }, 
     8   { KEY_CODE_YES,      "CODE_YES" },
    99#endif
    10    { KEY_MIN,           "MIN" }, 
    11    { KEY_BREAK,         "BREAK" }, 
    12    { KEY_DOWN,          "DOWN" }, 
    13    { KEY_UP,            "UP" }, 
    14    { KEY_LEFT,          "LEFT" }, 
    15    { KEY_RIGHT,         "RIGHT" }, 
    16    { KEY_HOME,          "HOME" }, 
    17    { KEY_BACKSPACE,     "BACKSPACE" }, 
    18    { KEY_F0,            "F0" }, 
    19    { KEY_F(1),          "F1" }, 
    20    { KEY_F(2),          "F2" }, 
    21    { KEY_F(3),          "F3" }, 
    22    { KEY_F(4),          "F4" }, 
    23    { KEY_F(5),          "F5" }, 
    24    { KEY_F(6),          "F6" }, 
    25    { KEY_F(7),          "F7" }, 
    26    { KEY_F(8),          "F8" }, 
    27    { KEY_F(9),          "F9" }, 
    28    { KEY_F(10),         "F10" }, 
    29    { KEY_F(11),         "F11" }, 
    30    { KEY_F(12),         "F12" }, 
    31    { KEY_DL,            "DL" }, 
    32    { KEY_IL,            "IL" }, 
    33    { KEY_DC,            "DC" }, 
    34    { KEY_IC,            "IC" }, 
    35    { KEY_EIC,           "EIC" }, 
    36    { KEY_CLEAR,         "CLEAR" }, 
    37    { KEY_EOS,           "EOS" }, 
    38    { KEY_EOL,           "EOL" }, 
    39    { KEY_SF,            "SF" }, 
    40    { KEY_SR,            "SR" }, 
    41    { KEY_NPAGE,         "NPAGE" }, 
    42    { KEY_PPAGE,         "PPAGE" }, 
    43    { KEY_STAB,          "STAB" }, 
    44    { KEY_CTAB,          "CTAB" }, 
    45    { KEY_CATAB,         "CATAB" }, 
    46    { KEY_ENTER,         "ENTER" }, 
    47    { KEY_SRESET,        "SRESET" }, 
    48    { KEY_RESET,         "RESET" }, 
    49    { KEY_PRINT,         "PRINT" }, 
    50    { KEY_LL,            "LL" }, 
    51    { KEY_A1,            "A1" }, 
    52    { KEY_A3,            "A3" }, 
    53    { KEY_B2,            "B2" }, 
    54    { KEY_C1,            "C1" }, 
    55    { KEY_C3,            "C3" }, 
    56    { KEY_BTAB,          "BTAB" }, 
    57    { KEY_BEG,           "BEG" }, 
    58    { KEY_CANCEL,        "CANCEL" }, 
    59    { KEY_CLOSE,         "CLOSE" }, 
    60    { KEY_COMMAND,       "COMMAND" }, 
    61    { KEY_COPY,          "COPY" }, 
    62    { KEY_CREATE,        "CREATE" }, 
    63    { KEY_END,           "END" }, 
    64    { KEY_EXIT,          "EXIT" }, 
    65    { KEY_FIND,          "FIND" }, 
    66    { KEY_HELP,          "HELP" }, 
    67    { KEY_MARK,          "MARK" }, 
    68    { KEY_MESSAGE,       "MESSAGE" }, 
    69    { KEY_MOVE,          "MOVE" }, 
    70    { KEY_NEXT,          "NEXT" }, 
    71    { KEY_OPEN,          "OPEN" }, 
    72    { KEY_OPTIONS,       "OPTIONS" }, 
    73    { KEY_PREVIOUS,      "PREVIOUS" }, 
    74    { KEY_REDO,          "REDO" }, 
    75    { KEY_REFERENCE,     "REFERENCE" }, 
    76    { KEY_REFRESH,       "REFRESH" }, 
    77    { KEY_REPLACE,       "REPLACE" }, 
    78    { KEY_RESTART,       "RESTART" }, 
    79    { KEY_RESUME,        "RESUME" }, 
    80    { KEY_SAVE,          "SAVE" }, 
    81    { KEY_SBEG,          "SBEG" }, 
    82    { KEY_SCANCEL,       "SCANCEL" }, 
    83    { KEY_SCOMMAND,      "SCOMMAND" }, 
    84    { KEY_SCOPY,         "SCOPY" }, 
    85    { KEY_SCREATE,       "SCREATE" }, 
    86    { KEY_SDC,           "SDC" }, 
    87    { KEY_SDL,           "SDL" }, 
    88    { KEY_SELECT,        "SELECT" }, 
    89    { KEY_SEND,          "SEND" }, 
    90    { KEY_SEOL,          "SEOL" }, 
    91    { KEY_SEXIT,         "SEXIT" }, 
    92    { KEY_SFIND,         "SFIND" }, 
    93    { KEY_SHELP,         "SHELP" }, 
    94    { KEY_SHOME,         "SHOME" }, 
    95    { KEY_SIC,           "SIC" }, 
    96    { KEY_SLEFT,         "SLEFT" }, 
    97    { KEY_SMESSAGE,      "SMESSAGE" }, 
    98    { KEY_SMOVE,         "SMOVE" }, 
    99    { KEY_SNEXT,         "SNEXT" }, 
    100    { KEY_SOPTIONS,      "SOPTIONS" }, 
    101    { KEY_SPREVIOUS,     "SPREVIOUS" }, 
    102    { KEY_SPRINT,        "SPRINT" }, 
    103    { KEY_SREDO,         "SREDO" }, 
    104    { KEY_SREPLACE,      "SREPLACE" }, 
    105    { KEY_SRIGHT,        "SRIGHT" }, 
    106    { KEY_SRSUME,        "SRSUME" }, 
    107    { KEY_SSAVE,         "SSAVE" }, 
    108    { KEY_SSUSPEND,      "SSUSPEND" }, 
    109    { KEY_SUNDO,         "SUNDO" }, 
    110    { KEY_SUSPEND,       "SUSPEND" }, 
    111    { KEY_UNDO,          "UNDO" }, 
    112    { KEY_MOUSE,         "MOUSE" }, 
     10   { KEY_MIN,           "MIN" },
     11   { KEY_BREAK,         "BREAK" },
     12   { KEY_DOWN,          "DOWN" },
     13   { KEY_UP,            "UP" },
     14   { KEY_LEFT,          "LEFT" },
     15   { KEY_RIGHT,         "RIGHT" },
     16   { KEY_HOME,          "HOME" },
     17   { KEY_BACKSPACE,     "BACKSPACE" },
     18   { KEY_F0,            "F0" },
     19   { KEY_F(1),          "F1" },
     20   { KEY_F(2),          "F2" },
     21   { KEY_F(3),          "F3" },
     22   { KEY_F(4),          "F4" },
     23   { KEY_F(5),          "F5" },
     24   { KEY_F(6),          "F6" },
     25   { KEY_F(7),          "F7" },
     26   { KEY_F(8),          "F8" },
     27   { KEY_F(9),          "F9" },
     28   { KEY_F(10),         "F10" },
     29   { KEY_F(11),         "F11" },
     30   { KEY_F(12),         "F12" },
     31   { KEY_DL,            "DL" },
     32   { KEY_IL,            "IL" },
     33   { KEY_DC,            "DC" },
     34   { KEY_IC,            "IC" },
     35   { KEY_EIC,           "EIC" },
     36   { KEY_CLEAR,         "CLEAR" },
     37   { KEY_EOS,           "EOS" },
     38   { KEY_EOL,           "EOL" },
     39   { KEY_SF,            "SF" },
     40   { KEY_SR,            "SR" },
     41   { KEY_NPAGE,         "NPAGE" },
     42   { KEY_PPAGE,         "PPAGE" },
     43   { KEY_STAB,          "STAB" },
     44   { KEY_CTAB,          "CTAB" },
     45   { KEY_CATAB,         "CATAB" },
     46   { KEY_ENTER,         "ENTER" },
     47   { KEY_SRESET,        "SRESET" },
     48   { KEY_RESET,         "RESET" },
     49   { KEY_PRINT,         "PRINT" },
     50   { KEY_LL,            "LL" },
     51   { KEY_A1,            "A1" },
     52   { KEY_A3,            "A3" },
     53   { KEY_B2,            "B2" },
     54   { KEY_C1,            "C1" },
     55   { KEY_C3,            "C3" },
     56   { KEY_BTAB,          "BTAB" },
     57   { KEY_BEG,           "BEG" },
     58   { KEY_CANCEL,        "CANCEL" },
     59   { KEY_CLOSE,         "CLOSE" },
     60   { KEY_COMMAND,       "COMMAND" },
     61   { KEY_COPY,          "COPY" },
     62   { KEY_CREATE,        "CREATE" },
     63   { KEY_END,           "END" },
     64   { KEY_EXIT,          "EXIT" },
     65   { KEY_FIND,          "FIND" },
     66   { KEY_HELP,          "HELP" },
     67   { KEY_MARK,          "MARK" },
     68   { KEY_MESSAGE,       "MESSAGE" },
     69   { KEY_MOVE,          "MOVE" },
     70   { KEY_NEXT,          "NEXT" },
     71   { KEY_OPEN,          "OPEN" },
     72   { KEY_OPTIONS,       "OPTIONS" },
     73   { KEY_PREVIOUS,      "PREVIOUS" },
     74   { KEY_REDO,          "REDO" },
     75   { KEY_REFERENCE,     "REFERENCE" },
     76   { KEY_REFRESH,       "REFRESH" },
     77   { KEY_REPLACE,       "REPLACE" },
     78   { KEY_RESTART,       "RESTART" },
     79   { KEY_RESUME,        "RESUME" },
     80   { KEY_SAVE,          "SAVE" },
     81   { KEY_SBEG,          "SBEG" },
     82   { KEY_SCANCEL,       "SCANCEL" },
     83   { KEY_SCOMMAND,      "SCOMMAND" },
     84   { KEY_SCOPY,         "SCOPY" },
     85   { KEY_SCREATE,       "SCREATE" },
     86   { KEY_SDC,           "SDC" },
     87   { KEY_SDL,           "SDL" },
     88   { KEY_SELECT,        "SELECT" },
     89   { KEY_SEND,          "SEND" },
     90   { KEY_SEOL,          "SEOL" },
     91   { KEY_SEXIT,         "SEXIT" },
     92   { KEY_SFIND,         "SFIND" },
     93   { KEY_SHELP,         "SHELP" },
     94   { KEY_SHOME,         "SHOME" },
     95   { KEY_SIC,           "SIC" },
     96   { KEY_SLEFT,         "SLEFT" },
     97   { KEY_SMESSAGE,      "SMESSAGE" },
     98   { KEY_SMOVE,         "SMOVE" },
     99   { KEY_SNEXT,         "SNEXT" },
     100   { KEY_SOPTIONS,      "SOPTIONS" },
     101   { KEY_SPREVIOUS,     "SPREVIOUS" },
     102   { KEY_SPRINT,        "SPRINT" },
     103   { KEY_SREDO,         "SREDO" },
     104   { KEY_SREPLACE,      "SREPLACE" },
     105   { KEY_SRIGHT,        "SRIGHT" },
     106   { KEY_SRSUME,        "SRSUME" },
     107   { KEY_SSAVE,         "SSAVE" },
     108   { KEY_SSUSPEND,      "SSUSPEND" },
     109   { KEY_SUNDO,         "SUNDO" },
     110   { KEY_SUSPEND,       "SUSPEND" },
     111   { KEY_UNDO,          "UNDO" },
     112   { KEY_MOUSE,         "MOUSE" },
    113113#ifdef KEY_RESIZE
    114    { KEY_RESIZE,        "RESIZE" }, 
     114   { KEY_RESIZE,        "RESIZE" },
    115115#endif
    116    { KEY_MAX,           "MAX" }, 
    117    { ' ',               "SPACE" }, 
    118    { 27,                "ESCAPE" }, 
    119    { 127,               "DELETE" }, 
    120    { '\r',              "CR" }, 
     116   { KEY_MAX,           "MAX" },
     117   { ' ',               "SPACE" },
     118   { 27,                "ESCAPE" },
     119   { 127,               "DELETE" },
     120   { '\r',              "CR" },
    121121   { '\n',              "LF" },
    122    { '\t',              "TAB" }, 
     122   { '\t',              "TAB" },
    123123   { 0,                 NULL }
    124124};
     
    157157      g_string_append_c(kb, j);
    158158    }
    159    
    160   } 
     159
     160  }
    161161  if (!kb->str[0]) {
    162162    /* not a valid key */
  • keys.c

    rdcd48ad r7869e48  
    1313    *km_ew_multi, *km_ew_onel, *km_viewwin;
    1414
    15  
     15
    1616  /****************************************************************/
    1717  /*************************** GLOBAL *****************************/
     
    1919
    2020  km_global = km = owl_keyhandler_create_and_add_keymap(kh, "global",
    21        "System-wide default key bindings", 
     21       "System-wide default key bindings",
    2222       owl_keys_default_invalid, NULL, NULL);
    2323  BIND_CMD("C-z",      "message Use :suspend to suspend.", "");
     
    2828
    2929  km_editwin = km = owl_keyhandler_create_and_add_keymap(kh, "edit",
    30        "Text editing and command window", 
     30       "Text editing and command window",
    3131       owl_keys_editwin_default, NULL, owl_keys_editwin_postalways);
    3232  owl_keymap_set_parent(km_editwin, km_global);
     
    9797
    9898  km_ew_multi = km = owl_keyhandler_create_and_add_keymap(kh, "editmulti",
    99        "Multi-line text editing", 
     99       "Multi-line text editing",
    100100       owl_keys_editwin_default, NULL, owl_keys_editwin_postalways);
    101101  owl_keymap_set_parent(km_ew_multi, km_editwin);
     
    117117  BIND_CMD("M-n",         "edit:history-next", "");
    118118
    119   /* note that changing "disable-ctrl-d" to "on" will change this to 
     119  /* note that changing "disable-ctrl-d" to "on" will change this to
    120120   * edit:delete-next-char */
    121121  BIND_CMD("C-d",     "edit:done-or-delete", "sends the zephyr if at the end of the message");
     
    127127
    128128  km_ew_onel = km = owl_keyhandler_create_and_add_keymap(kh, "editline",
    129        "Single-line text editing", 
     129       "Single-line text editing",
    130130       owl_keys_editwin_default, NULL, owl_keys_editwin_postalways);
    131131  owl_keymap_set_parent(km_ew_onel, km_editwin);
     
    146146  BIND_CMD("CR",          "editline:done", "executes the command");
    147147
    148  
     148
    149149  /****************************************************************/
    150150  /**************************** EDITRESPONSE **********************/
     
    152152
    153153  km_ew_onel = km = owl_keyhandler_create_and_add_keymap(kh, "editresponse",
    154        "Single-line response to question", 
     154       "Single-line response to question",
    155155       owl_keys_editwin_default, NULL, owl_keys_editwin_postalways);
    156156  owl_keymap_set_parent(km_ew_onel, km_editwin);
     
    167167
    168168  km_viewwin = km = owl_keyhandler_create_and_add_keymap(kh, "popless",
    169        "Pop-up window (eg, help)", 
     169       "Pop-up window (eg, help)",
    170170       owl_keys_default_invalid, NULL, owl_keys_popless_postalways);
    171171  owl_keymap_set_parent(km_viewwin, km_global);
     
    261261  BIND_CMD("M-M", "smartnarrow -ri",  "like M-N but with 'narrow-related' temporarily flipped.");
    262262  BIND_CMD("M-p", "view personal", "");
    263  
     263
    264264  BIND_CMD("/",   "start-command search ", "start a search command");
    265265  BIND_CMD("?",   "start-command search -r ", "start a reverse search command");
     
    273273  BIND_CMD("C-n",    "recv:next",      "");
    274274  BIND_CMD("M-[ B",  "recv:next",      "");
    275   BIND_CMD("M-C-n",  "recv:next --smart-filter", "move to next message matching the current one"); 
     275  BIND_CMD("M-C-n",  "recv:next --smart-filter", "move to next message matching the current one");
    276276  BIND_CMD("UP",     "recv:prev",      "");
    277277  BIND_CMD("M-[ A",  "recv:prev",      "");
  • libfaim/admin.c

    rcf02dd6 r7869e48  
    22 * Family 0x0007 - Account Administration.
    33 *
    4  * Used for stuff like changing the formating of your screen name, changing your 
    5  * email address, requesting an account confirmation email, getting account info, 
     4 * Used for stuff like changing the formating of your screen name, changing your
     5 * email address, requesting an account confirmation email, getting account info,
    66 *
    77 */
     
    1818 * 0x0013 - Unknown
    1919 *
    20  */ 
     20 */
    2121faim_export int aim_admin_getinfo(aim_session_t *sess, aim_conn_t *conn, fu16_t info)
    2222{
     
    4141 * Subtypes 0x0003 and 0x0005 - Parse account info.
    4242 *
    43  * Called in reply to both an information request (subtype 0x0002) and 
     43 * Called in reply to both an information request (subtype 0x0002) and
    4444 * an information change (subtype 0x0004).
    4545 *
     
    112112
    113113        aim_tlvlist_add_raw(&tl, 0x0001, strlen(newnick), newnick);
    114        
     114
    115115        aim_tlvlist_write(&fr->data, &tl);
    116116        aim_tlvlist_free(&tl);
    117        
     117
    118118        aim_tx_enqueue(sess, fr);
    119119
     
    169169
    170170        aim_tlvlist_add_raw(&tl, 0x0011, strlen(newemail), newemail);
    171        
     171
    172172        aim_tlvlist_write(&fr->data, &tl);
    173173        aim_tlvlist_free(&tl);
    174        
     174
    175175        aim_tx_enqueue(sess, fr);
    176176
  • libfaim/aim.h

    rfe73d0c r7869e48  
    1 /* 
     1/*
    22 * Main libfaim header.  Must be included in client for prototypes/macros.
    33 *
     
    5151
    5252#if defined(mach) && defined(__APPLE__)
    53 #define gethostbyname(x) gethostbyname2(x, AF_INET) 
     53#define gethostbyname(x) gethostbyname2(x, AF_INET)
    5454#endif
    5555
     
    5757/*
    5858 * For a win32 DLL, we define WIN32_INDLL if this file
    59  * is included while compiling the DLL. If its not 
     59 * is included while compiling the DLL. If its not
    6060 * defined (its included in a client app), the symbols
    6161 * will be imported instead of exported.
     
    6363#ifdef WIN32_INDLL
    6464#define faim_export __declspec(dllexport)
    65 #else 
     65#else
    6666#define faim_export __declspec(dllimport)
    6767#endif /* WIN32_INDLL */
     
    8383#endif
    8484
    85 /* 
    86  * Current Maximum Length for Screen Names (not including NULL) 
     85/*
     86 * Current Maximum Length for Screen Names (not including NULL)
    8787 *
    8888 * Currently only names up to 16 characters can be registered
     
    104104 *
    105105 * XXX: the real limit is the total SNAC size at 8192. Fix this.
    106  * 
     106 *
    107107 */
    108108#define MAXMSGLEN 7987
     
    118118 *
    119119 * This is actually defined by the protocol to be
    120  * dynamic, but I have yet to see due cause to 
     120 * dynamic, but I have yet to see due cause to
    121121 * define it dynamically here.  Maybe later.
    122122 *
     
    132132
    133133/*
    134  * Client info.  Filled in by the client and passed in to 
     134 * Client info.  Filled in by the client and passed in to
    135135 * aim_send_login().  The information ends up getting passed to OSCAR
    136136 * through the initial login command.
     
    277277#define CLIENTINFO_ICQ_KNOWNGOOD CLIENTINFO_ICQ_5_45_3777
    278278
    279 /* 
    280  * These could be arbitrary, but its easier to use the actual AIM values 
     279/*
     280 * These could be arbitrary, but its easier to use the actual AIM values
    281281 */
    282282#define AIM_CONN_TYPE_BOS               0x0002
     
    323323        void *internal; /* internal conn-specific libfaim data */
    324324        time_t lastactivity; /* time of last transmit */
    325         int forcedlatency; 
     325        int forcedlatency;
    326326        void *handlerlist;
    327327        void *sessv; /* pointer to parent session */
     
    353353        fu8_t hdrtype; /* defines which piece of the union to use */
    354354        union {
    355                 struct { 
     355                struct {
    356356                        fu8_t type;
    357                         flap_seqnum_t seqnum;     
     357                        flap_seqnum_t seqnum;
    358358                } flap;
    359359                struct {
     
    379379
    380380/*
    381  * AIM Session: The main client-data interface. 
     381 * AIM Session: The main client-data interface.
    382382 *
    383383 */
     
    390390
    391391        /*
    392          * Pointer to anything the client wants to 
     392         * Pointer to anything the client wants to
    393393         * explicitly associate with this session.
    394394         *
     
    410410         * I/O.  I don't suggest that you use libfaim's internal I/O.
    411411         * Its really bad and the API/event model is quirky at best.
    412          * 
     412         *
    413413         */
    414         aim_frame_t *queue_outgoing;   
    415         aim_frame_t *queue_incoming; 
     414        aim_frame_t *queue_outgoing;
     415        aim_frame_t *queue_incoming;
    416416
    417417        /*
     
    439439
    440440        /*
    441          * Outstanding snac handling 
     441         * Outstanding snac handling
    442442         *
    443443         * XXX: Should these be per-connection? -mid
     
    764764/*
    765765 * This information is provided in the Incoming ICBM callback for
    766  * Channel 1 ICBM's. 
     766 * Channel 1 ICBM's.
    767767 *
    768768 * Note that although CUSTOMFEATURES and CUSTOMCHARSET say they
     
    780780        aim_mpmsg_t mpmsg;
    781781        fu32_t icbmflags; /* some flags apply only to ->msg, not all mpmsg */
    782        
     782
    783783        /* Only provided if message has a human-readable section */
    784784        char *msg;
  • libfaim/aim_cbtypes.h

    rcf02dd6 r7869e48  
    3535/*
    3636 * SNAC Family: Ack.
    37  * 
     37 *
    3838 * Not really a family, but treating it as one really
    3939 * helps it fit into the libfaim callback structure better.
     
    4444/*
    4545 * SNAC Family: General.
    46  */ 
     46 */
    4747#define AIM_CB_GEN_ERROR 0x0001
    4848#define AIM_CB_GEN_CLIENTREADY 0x0002
     
    6969/*
    7070 * SNAC Family: Location Services.
    71  */ 
     71 */
    7272#define AIM_CB_LOC_ERROR 0x0001
    7373#define AIM_CB_LOC_REQRIGHTS 0x0002
     
    8282/*
    8383 * SNAC Family: Buddy List Management Services.
    84  */ 
     84 */
    8585#define AIM_CB_BUD_ERROR 0x0001
    8686#define AIM_CB_BUD_REQRIGHTS 0x0002
     
    9595/*
    9696 * SNAC Family: Messeging Services.
    97  */ 
     97 */
    9898#define AIM_CB_MSG_ERROR 0x0001
    9999#define AIM_CB_MSG_PARAMINFO 0x0005
     
    108108/*
    109109 * SNAC Family: Advertisement Services
    110  */ 
     110 */
    111111#define AIM_CB_ADS_ERROR 0x0001
    112112#define AIM_CB_ADS_DEFAULT 0xffff
     
    114114/*
    115115 * SNAC Family: Invitation Services.
    116  */ 
     116 */
    117117#define AIM_CB_INV_ERROR 0x0001
    118118#define AIM_CB_INV_DEFAULT 0xffff
     
    120120/*
    121121 * SNAC Family: Administrative Services.
    122  */ 
     122 */
    123123#define AIM_CB_ADM_ERROR 0x0001
    124124#define AIM_CB_ADM_INFOCHANGE_REPLY 0x0005
     
    127127/*
    128128 * SNAC Family: Popup Messages
    129  */ 
     129 */
    130130#define AIM_CB_POP_ERROR 0x0001
    131131#define AIM_CB_POP_DEFAULT 0xffff
     
    133133/*
    134134 * SNAC Family: Misc BOS Services.
    135  */ 
     135 */
    136136#define AIM_CB_BOS_ERROR 0x0001
    137137#define AIM_CB_BOS_RIGHTSQUERY 0x0002
     
    141141/*
    142142 * SNAC Family: User Lookup Services
    143  */ 
     143 */
    144144#define AIM_CB_LOK_ERROR 0x0001
    145145#define AIM_CB_LOK_DEFAULT 0xffff
     
    147147/*
    148148 * SNAC Family: User Status Services
    149  */ 
     149 */
    150150#define AIM_CB_STS_ERROR 0x0001
    151151#define AIM_CB_STS_SETREPORTINTERVAL 0x0002
     
    155155/*
    156156 * SNAC Family: Translation Services
    157  */ 
     157 */
    158158#define AIM_CB_TRN_ERROR 0x0001
    159159#define AIM_CB_TRN_DEFAULT 0xffff
     
    161161/*
    162162 * SNAC Family: Chat Navigation Services
    163  */ 
     163 */
    164164#define AIM_CB_CTN_ERROR 0x0001
    165165#define AIM_CB_CTN_CREATE 0x0008
     
    169169/*
    170170 * SNAC Family: Chat Services
    171  */ 
     171 */
    172172#define AIM_CB_CHT_ERROR 0x0001
    173173#define AIM_CB_CHT_ROOMINFOUPDATE 0x0002
     
    180180/*
    181181 * SNAC Family: "New" Search
    182  */ 
     182 */
    183183#define AIM_CB_SCH_ERROR 0x0001
    184184#define AIM_CB_SCH_SEARCH 0x0002
     
    187187/*
    188188 * SNAC Family: Buddy icons
    189  */ 
     189 */
    190190#define AIM_CB_ICO_ERROR 0x0001
    191191#define AIM_CB_ICO_REQUEST 0x0004
     
    196196 *
    197197 * Most of these are actually special.
    198  */ 
     198 */
    199199#define AIM_CB_ICQ_ERROR 0x0001
    200200#define AIM_CB_ICQ_OFFLINEMSG 0x00f0
     
    256256 * OFT Services
    257257 *
    258  * For all of the above #defines, the number is the subtype 
    259  * of the SNAC.  For OFT #defines, the number is the 
    260  * "hdrtype" which comes after the magic string and OFT 
     258 * For all of the above #defines, the number is the subtype
     259 * of the SNAC.  For OFT #defines, the number is the
     260 * "hdrtype" which comes after the magic string and OFT
    261261 * packet length.
    262262 *
    263  * I'm pretty sure the ODC ones are arbitrary right now, 
     263 * I'm pretty sure the ODC ones are arbitrary right now,
    264264 * that should be changed.
    265265 */
     
    292292 * the SNAC-centered libfaim callback structure.
    293293 *
    294  */ 
     294 */
    295295#define AIM_CB_SPECIAL_AUTHSUCCESS 0x0001
    296296#define AIM_CB_SPECIAL_AUTHOTHER 0x0002
  • libfaim/aim_internal.h

    rcf02dd6 r7869e48  
    144144};
    145145
    146 /* 
     146/*
    147147 * In SNACland, the terms 'family' and 'group' are synonymous -- the former
    148148 * is my term, the latter is AOL's.
     
    178178 * This is inside every connection.  But it is a void * to anything
    179179 * outside of libfaim.  It should remain that way.  It's called data
    180  * abstraction.  Maybe you've heard of it.  (Probably not if you're a 
     180 * abstraction.  Maybe you've heard of it.  (Probably not if you're a
    181181 * libfaim user.)
    182  * 
     182 *
    183183 */
    184184typedef struct aim_conn_inside_s {
  • libfaim/auth.c

    rcf02dd6 r7869e48  
    22 * Family 0x0017 - Authentication.
    33 *
    4  * Deals with the authorizer for SNAC-based login, and also old-style 
     4 * Deals with the authorizer for SNAC-based login, and also old-style
    55 * non-SNAC login.
    66 *
     
    2424 *
    2525 * The encoding_table seems to be a fixed set of values.  We'll
    26  * hope it doesn't change over time! 
     26 * hope it doesn't change over time!
    2727 *
    2828 * This is only used for the XOR method, not the better MD5 method.
     
    5959        md5_state_t state;
    6060
    61         md5_init(&state);       
     61        md5_init(&state);
    6262        md5_append(&state, (const md5_byte_t *)key, strlen(key));
    6363        md5_append(&state, (const md5_byte_t *)password, strlen(password));
     
    7777        md5_finish(&state, (md5_byte_t *)&passdigest);
    7878
    79         md5_init(&state);       
     79        md5_init(&state);
    8080        md5_append(&state, (const md5_byte_t *)key, strlen(key));
    8181        md5_append(&state, (const md5_byte_t *)&passdigest, 16);
     
    8888
    8989/*
    90  * The FLAP version is sent by itself at the beginning of authorization 
    91  * connections.  The FLAP version is also sent before the cookie when connecting 
     90 * The FLAP version is sent by itself at the beginning of authorization
     91 * connections.  The FLAP version is also sent before the cookie when connecting
    9292 * for other services (BOS, chatnav, chat, etc.).
    9393 */
     
    197197 *   build  = 0x0013
    198198 *   unknown= (not sent)
    199  *   
     199 *
    200200 * AIM for Linux 1.1.112:
    201201 *   clientstring = "AOL Instant Messenger (SM)"
     
    260260
    261261        aim_tlvlist_free(&tl);
    262        
     262
    263263        aim_tx_enqueue(sess, fr);
    264264
     
    269269 * This is sent back as a general response to the login command.
    270270 * It can be either an error or a success, depending on the
    271  * precense of certain TLVs. 
     271 * precense of certain TLVs.
    272272 *
    273273 * The client should check the value passed as errorcode. If
     
    303303         * have an error url.
    304304         */
    305         if (aim_tlv_gettlv(tlvlist, 0x0008, 1)) 
     305        if (aim_tlv_gettlv(tlvlist, 0x0008, 1))
    306306                info->errorcode = aim_tlv_get16(tlvlist, 0x0008, 1);
    307307        if (aim_tlv_gettlv(tlvlist, 0x0004, 1))
     
    329329         * The email address attached to this account
    330330         *   Not available for ICQ or @mac.com logins.
    331          *   If you receive this TLV, then you are allowed to use 
     331         *   If you receive this TLV, then you are allowed to use
    332332         *   family 0x0018 to check the status of your email.
    333333         * XXX - Not really true!
     
    436436        aim_frame_t fr;
    437437        aim_rxcallback_t userfunc;
    438        
     438
    439439        fr.conn = conn;
    440        
     440
    441441        if ((userfunc = aim_callhandler(sess, conn, 0x0017, 0x0007)))
    442442                userfunc(sess, &fr, "");
     
    448448 * Subtype 0x0006
    449449 *
    450  * In AIM 3.5 protocol, the first stage of login is to request login from the 
    451  * Authorizer, passing it the screen name for verification.  If the name is 
    452  * invalid, a 0017/0003 is spit back, with the standard error contents.  If 
    453  * valid, a 0017/0007 comes back, which is the signal to send it the main 
    454  * login command (0017/0002). 
     450 * In AIM 3.5 protocol, the first stage of login is to request login from the
     451 * Authorizer, passing it the screen name for verification.  If the name is
     452 * invalid, a 0017/0003 is spit back, with the standard error contents.  If
     453 * valid, a 0017/0007 comes back, which is the signal to send it the main
     454 * login command (0017/0002).
    455455 *
    456456 */
     
    460460        aim_snacid_t snacid;
    461461        aim_tlvlist_t *tl = NULL;
    462        
     462
    463463        if (!sess || !conn || !sn)
    464464                return -EINVAL;
     
    504504        keystr = aimbs_getstr(bs, keylen);
    505505
    506         /* XXX - When GiantGrayPanda signed on AIM I got a thing asking me to register 
    507          * for the netscape network.  This SNAC had a type 0x0058 TLV with length 10. 
     506        /* XXX - When GiantGrayPanda signed on AIM I got a thing asking me to register
     507         * for the netscape network.  This SNAC had a type 0x0058 TLV with length 10.
    508508         * Data is 0x0007 0004 3e19 ae1e 0006 0004 0000 0005 */
    509509
     
    511511                ret = userfunc(sess, rx, keystr);
    512512
    513         free(keystr); 
     513        free(keystr);
    514514
    515515        return ret;
  • libfaim/bart.c

    r07ab1cb r7869e48  
    22 * Family 0x0010 - Server stored buddy art
    33 *
    4  * Used for storing and retrieving your cute little buddy icon 
     4 * Used for storing and retrieving your cute little buddy icon
    55 * from the AIM servers.
    66 *
  • libfaim/bos.c

    rcf02dd6 r7869e48  
    2424        int ret = 0;
    2525
    26         /* 
    27          * TLVs follow 
     26        /*
     27         * TLVs follow
    2828         */
    2929        tlvlist = aim_tlvlist_read(bs);
     
    3838         * TLV type 0x0002: Maximum number of buddies on deny list.
    3939         */
    40         if (aim_tlv_gettlv(tlvlist, 0x0002, 1)) 
     40        if (aim_tlv_gettlv(tlvlist, 0x0002, 1))
    4141                maxdenies = aim_tlv_get16(tlvlist, 0x0002, 1);
    4242
     
    4646        aim_tlvlist_free(&tlvlist);
    4747
    48         return ret; 
     48        return ret;
    4949}
    5050
    51 /* 
     51/*
    5252 * Subtype 0x0004 - Set group permisson mask.
    5353 *
     
    7474 *  AIM_VISIBILITYCHANGE_DENYREMOVE: Lets list see you again
    7575 *
    76  * list should be a list of 
     76 * list should be a list of
    7777 * screen names in the form "Screen Name One&ScreenNameTwo&" etc.
    7878 *
     
    8080 *   - Allow all users to contact me: Send an AIM_VISIBILITYCHANGE_DENYADD
    8181 *      with only your name on it.
    82  *   - Allow only users on my Buddy List: Send an 
     82 *   - Allow only users on my Buddy List: Send an
    8383 *      AIM_VISIBILITYCHANGE_PERMITADD with the list the same as your
    8484 *      buddy list
    85  *   - Allow only the uesrs below: Send an AIM_VISIBILITYCHANGE_PERMITADD 
     85 *   - Allow only the uesrs below: Send an AIM_VISIBILITYCHANGE_PERMITADD
    8686 *      with everyone listed that you want to see you.
    87  *   - Block all users: Send an AIM_VISIBILITYCHANGE_PERMITADD with only 
     87 *   - Block all users: Send an AIM_VISIBILITYCHANGE_PERMITADD with only
    8888 *      yourself in the list
    8989 *   - Block the users below: Send an AIM_VISIBILITYCHANGE_DENYADD with
  • libfaim/bstream.c

    re374dee r7869e48  
    66
    77#define FAIM_INTERNAL
    8 #include <aim.h> 
     8#include <aim.h>
    99
    1010faim_internal int aim_bstream_init(aim_bstream_t *bs, fu8_t *data, int len)
    1111{
    12        
     12
    1313        if (!bs)
    1414                return -1;
     
    6363faim_internal fu8_t aimbs_get8(aim_bstream_t *bs)
    6464{
    65        
    66         if (aim_bstream_empty(bs) < 1)
    67                 return 0; /* XXX throw an exception */
    68        
     65
     66        if (aim_bstream_empty(bs) < 1)
     67                return 0; /* XXX throw an exception */
     68
    6969        bs->offset++;
    70        
     70
    7171        return aimutil_get8(bs->data + bs->offset - 1);
    7272}
     
    7474faim_internal fu16_t aimbs_get16(aim_bstream_t *bs)
    7575{
    76        
    77         if (aim_bstream_empty(bs) < 2)
    78                 return 0; /* XXX throw an exception */
    79        
     76
     77        if (aim_bstream_empty(bs) < 2)
     78                return 0; /* XXX throw an exception */
     79
    8080        bs->offset += 2;
    81        
     81
    8282        return aimutil_get16(bs->data + bs->offset - 2);
    8383}
     
    8585faim_internal fu32_t aimbs_get32(aim_bstream_t *bs)
    8686{
    87        
    88         if (aim_bstream_empty(bs) < 4)
    89                 return 0; /* XXX throw an exception */
    90        
     87
     88        if (aim_bstream_empty(bs) < 4)
     89                return 0; /* XXX throw an exception */
     90
    9191        bs->offset += 4;
    92        
     92
    9393        return aimutil_get32(bs->data + bs->offset - 4);
    9494}
     
    9696faim_internal fu8_t aimbs_getle8(aim_bstream_t *bs)
    9797{
    98        
    99         if (aim_bstream_empty(bs) < 1)
    100                 return 0; /* XXX throw an exception */
    101        
     98
     99        if (aim_bstream_empty(bs) < 1)
     100                return 0; /* XXX throw an exception */
     101
    102102        bs->offset++;
    103        
     103
    104104        return aimutil_getle8(bs->data + bs->offset - 1);
    105105}
     
    107107faim_internal fu16_t aimbs_getle16(aim_bstream_t *bs)
    108108{
    109        
    110         if (aim_bstream_empty(bs) < 2)
    111                 return 0; /* XXX throw an exception */
    112        
     109
     110        if (aim_bstream_empty(bs) < 2)
     111                return 0; /* XXX throw an exception */
     112
    113113        bs->offset += 2;
    114        
     114
    115115        return aimutil_getle16(bs->data + bs->offset - 2);
    116116}
     
    118118faim_internal fu32_t aimbs_getle32(aim_bstream_t *bs)
    119119{
    120        
    121         if (aim_bstream_empty(bs) < 4)
    122                 return 0; /* XXX throw an exception */
    123        
     120
     121        if (aim_bstream_empty(bs) < 4)
     122                return 0; /* XXX throw an exception */
     123
    124124        bs->offset += 4;
    125        
     125
    126126        return aimutil_getle32(bs->data + bs->offset - 4);
    127127}
  • libfaim/buddylist.c

    rcf02dd6 r7869e48  
    3131        int ret = 0;
    3232
    33         /* 
    34          * TLVs follow 
     33        /*
     34         * TLVs follow
    3535         */
    3636        tlvlist = aim_tlvlist_read(bs);
     
    4848         * list.  (This is called the "reverse list" by a certain
    4949         * other IM protocol.)
    50          * 
     50         *
    5151         */
    5252        if (aim_tlv_gettlv(tlvlist, 0x0002, 1))
     
    6464        aim_tlvlist_free(&tlvlist);
    6565
    66         return ret; 
     66        return ret;
    6767}
    6868
     
    103103 * buddy_list = "Screen Name One&ScreenNameTwo&";
    104104 *
    105  * XXX Clean this up. 
     105 * XXX Clean this up.
    106106 *
    107107 */
     
    114114        char *tmpptr = NULL;
    115115
    116         if (!buddy_list || !(localcpy = strdup(buddy_list))) 
     116        if (!buddy_list || !(localcpy = strdup(buddy_list)))
    117117                return -EINVAL;
    118118
     
    176176}
    177177
    178 /* 
     178/*
    179179 * Subtype 0x000b
    180180 *
     
    194194
    195195        snacid = aim_cachesnac(sess, 0x0003, 0x000b, 0x0000, NULL, 0);
    196        
     196
    197197        aim_putsnac(&fr->data, 0x0003, 0x000b, 0x0000, snacid);
    198198        aim_putuserinfo(&fr->data, info);
     
    203203}
    204204
    205 /* 
     205/*
    206206 * Subtype 0x000c
    207207 *
     
    221221
    222222        snacid = aim_cachesnac(sess, 0x0003, 0x000c, 0x0000, NULL, 0);
    223        
     223
    224224        aim_putsnac(&fr->data, 0x0003, 0x000c, 0x0000, snacid);
    225225        aimbs_put8(&fr->data, strlen(sn));
  • libfaim/chat.c

    rcf02dd6 r7869e48  
    55
    66#define FAIM_INTERNAL
    7 #include <aim.h> 
     7#include <aim.h>
    88
    99#include <string.h>
     
    9393
    9494        buflen = 2 + 1 + strlen(roomname) + 2;
    95        
     95
    9696        if (!(buf = malloc(buflen)))
    9797                return 0;
     
    112112
    113113/*
    114  * Join a room of name roomname.  This is the first step to joining an 
    115  * already created room.  It's basically a Service Request for 
    116  * family 0x000e, with a little added on to specify the exchange and room 
     114 * Join a room of name roomname.  This is the first step to joining an
     115 * already created room.  It's basically a Service Request for
     116 * family 0x000e, with a little added on to specify the exchange and room
    117117 * name.
    118118 */
     
    123123        aim_tlvlist_t *tl = NULL;
    124124        struct chatsnacinfo csi;
    125        
     125
    126126        if (!sess || !conn || !roomname || !strlen(roomname))
    127127                return -EINVAL;
     
    149149        aim_tx_enqueue(sess, fr);
    150150
    151         return 0; 
     151        return 0;
    152152}
    153153
     
    194194        int hdrlen;
    195195        aim_bstream_t hdrbs;
    196        
     196
    197197        if (!sess || !conn || !sn || !msg || !roomname)
    198198                return -EINVAL;
     
    239239         * Sigh.  AOL was rather inconsistent right here.  So we have
    240240         * to play some minor tricks.  Right inside the type 5 is some
    241          * raw data, followed by a series of TLVs. 
     241         * raw data, followed by a series of TLVs.
    242242         *
    243243         */
     
    245245        hdr = malloc(hdrlen);
    246246        aim_bstream_init(&hdrbs, hdr, hdrlen);
    247        
     247
    248248        aimbs_put16(&hdrbs, 0x0000); /* Unknown! */
    249249        aimbs_putraw(&hdrbs, ckstr, sizeof(ckstr)); /* I think... */
     
    255255        aim_addtlvtochain_chatroom(&itl, 0x2711, exchange, roomname, instance);
    256256        aim_tlvlist_write(&hdrbs, &itl);
    257        
     257
    258258        aim_tlvlist_add_raw(&otl, 0x0005, aim_bstream_curpos(&hdrbs), hdr);
    259259
     
    263263        aim_tlvlist_free(&itl);
    264264        aim_tlvlist_free(&otl);
    265        
     265
    266266        aim_tx_enqueue(sess, fr);
    267267
     
    307307        /*
    308308         * Everything else are TLVs.
    309          */ 
     309         */
    310310        tlvlist = aim_tlvlist_read(bs);
    311311
     
    325325         * Type 0x0073:  Occupant list.
    326326         */
    327         if (aim_tlv_gettlv(tlvlist, 0x0073, 1)) {       
     327        if (aim_tlv_gettlv(tlvlist, 0x0073, 1)) {
    328328                int curoccupant = 0;
    329329                aim_tlv_t *tmptlv;
     
    341341        }
    342342
    343         /* 
     343        /*
    344344         * Type 0x00c9: Flags. (AIM_CHATROOM_FLAG)
    345345         */
     
    347347                flags = aim_tlv_get16(tlvlist, 0x00c9, 1);
    348348
    349         /* 
     349        /*
    350350         * Type 0x00ca: Creation time (4 bytes)
    351351         */
     
    353353                creationtime = aim_tlv_get32(tlvlist, 0x00ca, 1);
    354354
    355         /* 
     355        /*
    356356         * Type 0x00d1: Maximum Message Length
    357357         */
     
    359359                maxmsglen = aim_tlv_get16(tlvlist, 0x00d1, 1);
    360360
    361         /* 
     361        /*
    362362         * Type 0x00d2: Unknown. (2 bytes)
    363363         */
     
    365365                unknown_d2 = aim_tlv_get16(tlvlist, 0x00d2, 1);
    366366
    367         /* 
     367        /*
    368368         * Type 0x00d3: Room Description
    369369         */
     
    377377                ;
    378378
    379         /* 
     379        /*
    380380         * Type 0x00d5: Unknown. (1 byte)
    381381         */
     
    389389        if (aim_tlv_gettlv(tlvlist, 0x000d6, 1))
    390390                ;
    391        
     391
    392392        /*
    393393         * Type 0x00d7: Language 1 ("en")
     
    401401        if (aim_tlv_gettlv(tlvlist, 0x000d8, 1))
    402402                ;
    403        
     403
    404404        /*
    405405         * Type 0x00d9: Language 2 ("en")
     
    475475 *                                 and displays the message as normal.)
    476476 *
    477  * XXX convert this to use tlvchains 
     477 * XXX convert this to use tlvchains
    478478 */
    479479faim_export int aim_chat_send_im(aim_session_t *sess, aim_conn_t *conn, fu16_t flags, const char *msg, int msglen)
    480 {   
     480{
    481481        int i;
    482482        aim_frame_t *fr;
     
    539539         *
    540540         * This could include other information... We just
    541          * put in a message TLV however. 
    542          * 
     541         * put in a message TLV however.
     542         *
    543543         */
    544544        aim_tlvlist_add_frozentlvlist(&otl, 0x0005, &itl);
    545545
    546546        aim_tlvlist_write(&fr->data, &otl);
    547        
     547
    548548        aim_tlvlist_free(&itl);
    549549        aim_tlvlist_free(&otl);
    550        
     550
    551551        aim_tx_enqueue(sess, fr);
    552552
     
    557557 * Subtype 0x0006
    558558 *
    559  * We could probably include this in the normal ICBM parsing 
     559 * We could probably include this in the normal ICBM parsing
    560560 * code as channel 0x0003, however, since only the start
    561561 * would be the same, we might as well do it here.
     
    577577 *         message string
    578578 *       possibly others
    579  * 
     579 *
    580580 */
    581581static int incomingmsg(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs)
    582582{
    583583        aim_userinfo_t userinfo;
    584         aim_rxcallback_t userfunc;     
     584        aim_rxcallback_t userfunc;
    585585        int ret = 0;
    586586        fu8_t *cookie;
     
    619619
    620620        /*
    621          * Start parsing TLVs right away. 
     621         * Start parsing TLVs right away.
    622622         */
    623623        otl = aim_tlvlist_read(bs);
     
    637637
    638638        /*
    639          * Type 0x0001: If present, it means it was a message to the 
     639         * Type 0x0001: If present, it means it was a message to the
    640640         * room (as opposed to a whisper).
    641641         */
     
    655655                itl = aim_tlvlist_read(&tbs);
    656656
    657                 /* 
     657                /*
    658658                 * Type 0x0001: Message.
    659                  */     
     659                 */
    660660                if (aim_tlv_gettlv(itl, 0x0001, 1))
    661661                        msg = aim_tlv_getstr(itl, 0x0001, 1);
    662662
    663                 aim_tlvlist_free(&itl); 
     663                aim_tlvlist_free(&itl);
    664664        }
    665665
  • libfaim/chatnav.c

    rcf02dd6 r7869e48  
    4646         * This looks to be a big hack.  You'll note that this entire
    4747         * SNAC is just a room info structure, but the hard room name,
    48          * here, is set to "create". 
     48         * here, is set to "create".
    4949         *
    5050         * Either this goes on the "list of questions concerning
     
    5757        aimbs_putraw(&fr->data, ck, strlen(ck));
    5858
    59         /* 
     59        /*
    6060         * instance
    61          * 
     61         *
    6262         * Setting this to 0xffff apparently assigns the last instance.
    6363         *
     
    9595        tlvlist = aim_tlvlist_read(bs);
    9696
    97         /* 
     97        /*
    9898         * Type 0x0002: Maximum concurrent rooms.
    99          */ 
     99         */
    100100        if (aim_tlv_gettlv(tlvlist, 0x0002, 1))
    101101                maxrooms = aim_tlv_get8(tlvlist, 0x0002, 1);
    102102
    103         /* 
     103        /*
    104104         * Type 0x0003: Exchange information
    105105         *
    106106         * There can be any number of these, each one
    107          * representing another exchange. 
    108          * 
     107         * representing another exchange.
     108         *
    109109         */
    110110        for (curexchange = 0; ((exchangetlv = aim_tlv_gettlv(tlvlist, 0x0003, curexchange+1))); ) {
     
    121121                innerlist = aim_tlvlist_read(&tbs);
    122122
    123                 /* 
     123                /*
    124124                 * Type 0x000a: Unknown.
    125125                 *
     
    130130                        ;
    131131
    132                 /* 
     132                /*
    133133                 * Type 0x000d: Unknown.
    134134                 */
     
    136136                        ;
    137137
    138                 /* 
     138                /*
    139139                 * Type 0x0004: Unknown
    140140                 */
     
    142142                        ;
    143143
    144                 /* 
     144                /*
    145145                 * Type 0x0002: Unknown
    146146                 */
     
    149149
    150150                        classperms = aim_tlv_get16(innerlist, 0x0002, 1);
    151                        
     151
    152152                        faimdprintf(sess, 1, "faim: class permissions %x\n", classperms);
    153153                }
     
    161161                 * 8 Occupant Peek Allowed
    162162                 *
    163                  */ 
     163                 */
    164164                if (aim_tlv_gettlv(innerlist, 0x00c9, 1))
    165165                        exchanges[curexchange-1].flags = aim_tlv_get16(innerlist, 0x00c9, 1);
    166                      
    167                 /*
    168                  * Type 0x00ca: Creation Date 
     166
     167                /*
     168                 * Type 0x00ca: Creation Date
    169169                 */
    170170                if (aim_tlv_gettlv(innerlist, 0x00ca, 1))
    171171                        ;
    172                      
     172
    173173                /*
    174174                 * Type 0x00d0: Mandatory Channels?
     
    186186                 * Type 0x00d2: Maximum Occupancy?
    187187                 */
    188                 if (aim_tlv_gettlv(innerlist, 0x00d2, 1))       
     188                if (aim_tlv_gettlv(innerlist, 0x00d2, 1))
    189189                        ;
    190190
     
    192192                 * Type 0x00d3: Exchange Description
    193193                 */
    194                 if (aim_tlv_gettlv(innerlist, 0x00d3, 1))       
     194                if (aim_tlv_gettlv(innerlist, 0x00d3, 1))
    195195                        exchanges[curexchange-1].name = aim_tlv_getstr(innerlist, 0x00d3, 1);
    196196                else
     
    200200                 * Type 0x00d4: Exchange Description URL
    201201                 */
    202                 if (aim_tlv_gettlv(innerlist, 0x00d4, 1))       
     202                if (aim_tlv_gettlv(innerlist, 0x00d4, 1))
    203203                        ;
    204204
     
    209209                 * 1  Room creation allowed
    210210                 * 2  Exchange creation allowed
    211                  * 
     211                 *
    212212                 */
    213213                if (aim_tlv_gettlv(innerlist, 0x00d5, 1)) {
     
    219219                /*
    220220                 * Type 0x00d6: Character Set (First Time)
    221                  */           
    222                 if (aim_tlv_gettlv(innerlist, 0x00d6, 1))       
     221                 */
     222                if (aim_tlv_gettlv(innerlist, 0x00d6, 1))
    223223                        exchanges[curexchange-1].charset1 = aim_tlv_getstr(innerlist, 0x00d6, 1);
    224224                else
    225225                        exchanges[curexchange-1].charset1 = NULL;
    226                      
     226
    227227                /*
    228228                 * Type 0x00d7: Language (First Time)
    229                  */           
    230                 if (aim_tlv_gettlv(innerlist, 0x00d7, 1))       
     229                 */
     230                if (aim_tlv_gettlv(innerlist, 0x00d7, 1))
    231231                        exchanges[curexchange-1].lang1 = aim_tlv_getstr(innerlist, 0x00d7, 1);
    232232                else
     
    235235                /*
    236236                 * Type 0x00d8: Character Set (Second Time)
    237                  */           
    238                 if (aim_tlv_gettlv(innerlist, 0x00d8, 1))       
     237                 */
     238                if (aim_tlv_gettlv(innerlist, 0x00d8, 1))
    239239                        exchanges[curexchange-1].charset2 = aim_tlv_getstr(innerlist, 0x00d8, 1);
    240240                else
     
    243243                /*
    244244                 * Type 0x00d9: Language (Second Time)
    245                  */           
    246                 if (aim_tlv_gettlv(innerlist, 0x00d9, 1))       
     245                 */
     246                if (aim_tlv_gettlv(innerlist, 0x00d9, 1))
    247247                        exchanges[curexchange-1].lang2 = aim_tlv_getstr(innerlist, 0x00d9, 1);
    248248                else
    249249                        exchanges[curexchange-1].lang2 = NULL;
    250                      
     250
    251251                /*
    252252                 * Type 0x00da: Unknown
    253253                 */
    254                 if (aim_tlv_gettlv(innerlist, 0x00da, 1))       
     254                if (aim_tlv_gettlv(innerlist, 0x00da, 1))
    255255                        ;
    256256
     
    354354 * Subtype 0x0009
    355355 *
    356  * Since multiple things can trigger this callback, we must lookup the 
     356 * Since multiple things can trigger this callback, we must lookup the
    357357 * snacid to determine the original snac subtype that was called.
    358358 *
     
    364364 *    Nav Short Desc = 8
    365365 *    Nav Instance Info = 16
    366  * And then everything is really asynchronous.  There is no specific 
     366 * And then everything is really asynchronous.  There is no specific
    367367 * attachment of a response to a create room request, for example.  Creating
    368368 * the room yields no different a response than requesting the room's info.
  • libfaim/conn.c

    rcf02dd6 r7869e48  
    88#define FAIM_INTERNAL
    99#define FAIM_NEED_CONN_INTERNAL
    10 #include <aim.h> 
     10#include <aim.h>
    1111
    1212#ifndef _WIN32
     
    2323 * In OSCAR, every connection has a set of SNAC groups associated
    2424 * with it.  These are the groups that you can send over this connection
    25  * without being guarenteed a "Not supported" SNAC error. 
    26  *
    27  * The grand theory of things says that these associations transcend 
     25 * without being guarenteed a "Not supported" SNAC error.
     26 *
     27 * The grand theory of things says that these associations transcend
    2828 * what libfaim calls "connection types" (conn->type).  You can probably
    29  * see the elegance here, but since I want to revel in it for a bit, you 
     29 * see the elegance here, but since I want to revel in it for a bit, you
    3030 * get to hear it all spelled out.
    3131 *
     
    3333 * of your modules has just given you a SNAC of the group 0x0004 to send
    3434 * you.  Maybe an IM destined for some twit in Greenland.  So you start
    35  * at the top of your connection list, looking for a connection that 
     35 * at the top of your connection list, looking for a connection that
    3636 * claims to support group 0x0004.  You find one.  Why, that neat BOS
    3737 * connection of yours can do that.  So you send it on its way.
     
    5151 * that connection.  One of the first things you get from this new server
    5252 * is a message saying that indeed it does support the group you were looking
    53  * for.  So you continue and send rate confirmation and all that. 
    54  * 
     53 * for.  So you continue and send rate confirmation and all that.
     54 *
    5555 * Then you remember you had that SNAC to send, and now you have a means to
    5656 * do it, and you do, and everyone is happy.  Except the Greenlander, who is
     
    6565 * to make libfaim work that way.  It would take a fair amount of effort,
    6666 * and probably some client API changes as well.  (Whenever I don't want
    67  * to do something, I just say it would change the client API.  Then I 
     67 * to do something, I just say it would change the client API.  Then I
    6868 * instantly have a couple of supporters of not doing it.)
    6969 *
     
    159159        aim_tx_cleanqueue(sess, *deadconn);
    160160
    161         if ((*deadconn)->fd != -1) 
     161        if ((*deadconn)->fd != -1)
    162162                aim_conn_close(*deadconn);
    163163
     
    251251        aim_conn_t *newconn;
    252252
    253         if (!(newconn = malloc(sizeof(aim_conn_t))))   
     253        if (!(newconn = malloc(sizeof(aim_conn_t))))
    254254                return NULL;
    255255        memset(newconn, 0, sizeof(aim_conn_t));
     
    282282        aim_conn_t *cur, **prev;
    283283
    284         if (!deadconn || !*deadconn)   
     284        if (!deadconn || !*deadconn)
    285285                return;
    286286
     
    307307 * Close (but not free) a connection.
    308308 *
    309  * This leaves everything untouched except for clearing the 
     309 * This leaves everything untouched except for clearing the
    310310 * handler list and setting the fd to -1 (used to recognize
    311311 * dead connections).  It will also remove cookies if necessary.
     
    335335 * @type: Type of connection to look for
    336336 *
    337  * Searches for a connection of the specified type in the 
     337 * Searches for a connection of the specified type in the
    338338 * specified session.  Returns the first connection of that
    339339 * type found.
     
    347347
    348348        for (cur = sess->connlist; cur; cur = cur->next) {
    349                 if ((cur->type == type) && 
     349                if ((cur->type == type) &&
    350350                                !(cur->status & AIM_CONN_STATUS_INPROGRESS))
    351351                        break;
     
    381381
    382382/**
    383  * aim_proxyconnect - An extrememly quick and dirty SOCKS5 interface. 
     383 * aim_proxyconnect - An extrememly quick and dirty SOCKS5 interface.
    384384 * @sess: Session to connect
    385385 * @host: Host to connect to
     
    584584                 * this function only gets called for some of that rendezvous
    585585                 * crap, and not on SNAC connections, its probably okay for
    586                  * now. 
     586                 * now.
    587587                 *
    588588                 */
     
    600600 * Opens a new connection to the specified dest host of specified
    601601 * type, using the proxy settings if available.  If @host is %NULL,
    602  * the connection is allocated and returned, but no connection 
     602 * the connection is allocated and returned, but no connection
    603603 * is made.
    604604 *
     
    625625        }
    626626
    627         /* 
    628          * As of 23 Jul 1999, AOL now sends the port number, preceded by a 
    629          * colon, in the BOS redirect.  This fatally breaks all previous 
     627        /*
     628         * As of 23 Jul 1999, AOL now sends the port number, preceded by a
     629         * colon, in the BOS redirect.  This fatally breaks all previous
    630630         * libfaims.  Bad, bad AOL.
    631631         *
    632          * We put this here to catch every case. 
     632         * We put this here to catch every case.
    633633         *
    634634         */
     
    662662 * @sess: Session to search
    663663 *
    664  * Returns the highest valued filed descriptor of all open 
     664 * Returns the highest valued filed descriptor of all open
    665665 * connections in @sess.
    666666 *
     
    708708 * Waits for a socket with data or for timeout, whichever comes first.
    709709 * See select(2).
    710  * 
     710 *
    711711 * Return codes in *status:
    712712 *   -1  error in select() (%NULL returned)
     
    715715 *    2  incoming data pending (connection with pending data returned)
    716716 *
    717  */ 
     717 */
    718718faim_export aim_conn_t *aim_select(aim_session_t *sess, struct timeval *timeout, int *status)
    719719{
     
    745745        }
    746746
    747         /* 
     747        /*
    748748         * If we have data waiting to be sent, return
    749749         *
     
    762762                *status = 1;
    763763                return NULL;
    764         } 
     764        }
    765765
    766766        if ((i = select(maxfd+1, &fds, &wfds, NULL, timeout))>=1) {
    767767                for (cur = sess->connlist; cur; cur = cur->next) {
    768                         if ((FD_ISSET(cur->fd, &fds)) || 
    769                                         ((cur->status & AIM_CONN_STATUS_INPROGRESS) && 
     768                        if ((FD_ISSET(cur->fd, &fds)) ||
     769                                        ((cur->status & AIM_CONN_STATUS_INPROGRESS) &&
    770770                                        FD_ISSET(cur->fd, &wfds))) {
    771771                                *status = 2;
     
    790790 *
    791791 * This is my lame attempt at overcoming not understanding the rate
    792  * limiting. 
     792 * limiting.
    793793 *
    794794 * XXX: This should really be replaced with something that scales and
     
    817817 * Call this with your SOCKS5 proxy server parameters before
    818818 * the first call to aim_newconn().  If called with all %NULL
    819  * args, it will clear out a previously set proxy. 
     819 * args, it will clear out a previously set proxy.
    820820 *
    821821 * Set username and password to %NULL if not applicable.
     
    833833
    834834        strncpy(sess->socksproxy.server, server, sizeof(sess->socksproxy.server));
    835         if (username && strlen(username)) 
     835        if (username && strlen(username))
    836836                strncpy(sess->socksproxy.username, username, sizeof(sess->socksproxy.username));
    837837        if (password && strlen(password))
     
    850850
    851851/**
    852  * Initializes a session structure by setting the initial values 
     852 * Initializes a session structure by setting the initial values
    853853 * stuff in the aim_session_t struct.
    854854 *
     
    893893        /*
    894894         * This must always be set.  Default to the queue-based
    895          * version for back-compatibility. 
     895         * version for back-compatibility.
    896896         */
    897897        aim_tx_setenqueue(sess, AIM_TX_QUEUED, NULL);
  • libfaim/email.c

    rcf02dd6 r7869e48  
    22 * Family 0x0018 - Email notification
    33 *
    4  * Used for being alerted when the email address(es) associated with 
    5  * your screen name get new electronic-m.  For normal AIM accounts, you 
    6  * get the email address screenname@netscape.net.  AOL accounts have 
     4 * Used for being alerted when the email address(es) associated with
     5 * your screen name get new electronic-m.  For normal AIM accounts, you
     6 * get the email address screenname@netscape.net.  AOL accounts have
    77 * screenname@aol.com, and can also activate a netscape.net account.
    88 *
     
    6565 * Subtype 0x0007 - Receive information about your email account
    6666 *
    67  * So I don't even know if you can have multiple 16 byte keys, 
     67 * So I don't even know if you can have multiple 16 byte keys,
    6868 * but this is coded so it will handle that, and handle it well.
    69  * This tells you if you have unread mail or not, the URL you 
    70  * should use to access that mail, and the domain name for the 
    71  * email account (screenname@domainname.com).  If this is the 
    72  * first 0x0007 SNAC you've received since you signed on, or if 
    73  * this is just a periodic status update, this will also contain 
     69 * This tells you if you have unread mail or not, the URL you
     70 * should use to access that mail, and the domain name for the
     71 * email account (screenname@domainname.com).  If this is the
     72 * first 0x0007 SNAC you've received since you signed on, or if
     73 * this is just a periodic status update, this will also contain
    7474 * the number of unread emails that you have.
    7575 */
     
    131131        alertitle = aim_tlv_getstr(tlvlist, 0x0005, 1);
    132132        alerturl  = aim_tlv_getstr(tlvlist, 0x000d, 1);
    133        
     133
    134134        if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype)))
    135135                ret = userfunc(sess, rx, new, havenewmail, alertitle, (alerturl ? alerturl + 2 : NULL));
  • libfaim/faimconfig.h

    r5e53c4a r7869e48  
    1414 * ICBMs and comparing them to incoming errors.  However,
    1515 * its a helluvalot of overhead for something that should
    16  * rarely happen. 
     16 * rarely happen.
    1717 *
    1818 * Default: defined.  This is now defined by default
    19  * because it should be stable and its not too bad. 
     19 * because it should be stable and its not too bad.
    2020 * And Josh wanted it.
    2121 *
     
    2424
    2525/*
    26  * Default Authorizer server name and TCP port for the OSCAR farm. 
     26 * Default Authorizer server name and TCP port for the OSCAR farm.
    2727 *
    2828 * You shouldn't need to change this unless you're writing
    29  * your own server. 
     29 * your own server.
    3030 *
    3131 * Note that only one server is needed to start the whole
  • libfaim/ft.c

    rfa8f439 r7869e48  
    33 * (ODC is also referred to as DirectIM and IM Image.)
    44 *
    5  * There are a few static helper functions at the top, then 
     5 * There are a few static helper functions at the top, then
    66 * ODC stuff, then ft stuff.
    77 *
    8  * I feel like this is a good place to explain OFT, so I'm going to 
    9  * do just that.  Each OFT packet has a header type.  I guess this 
    10  * is pretty similar to the subtype of a SNAC packet.  The type 
    11  * basically tells the other client the meaning of the OFT packet. 
    12  * There are two distinct types of file transfer, which I usually 
    13  * call "sendfile" and "getfile."  Sendfile is when you send a file 
    14  * to another AIM user.  Getfile is when you share a group of files, 
     8 * I feel like this is a good place to explain OFT, so I'm going to
     9 * do just that.  Each OFT packet has a header type.  I guess this
     10 * is pretty similar to the subtype of a SNAC packet.  The type
     11 * basically tells the other client the meaning of the OFT packet.
     12 * There are two distinct types of file transfer, which I usually
     13 * call "sendfile" and "getfile."  Sendfile is when you send a file
     14 * to another AIM user.  Getfile is when you share a group of files,
    1515 * and other users request that you send them the files.
    1616 *
    1717 * A typical sendfile file transfer goes like this:
    18  *   1) Sender sends a channel 2 ICBM telling the other user that 
    19  *      we want to send them a file.  At the same time, we open a 
    20  *      listener socket (this should be done before sending the 
    21  *      ICBM) on some port, and wait for them to connect to us. 
    22  *      The ICBM we sent should contain our IP address and the port 
     18 *   1) Sender sends a channel 2 ICBM telling the other user that
     19 *      we want to send them a file.  At the same time, we open a
     20 *      listener socket (this should be done before sending the
     21 *      ICBM) on some port, and wait for them to connect to us.
     22 *      The ICBM we sent should contain our IP address and the port
    2323 *      number that we're listening on.
    24  *   2) The receiver connects to the sender on the given IP address 
    25  *      and port.  After the connection is established, the receiver 
     24 *   2) The receiver connects to the sender on the given IP address
     25 *      and port.  After the connection is established, the receiver
    2626 *      sends an ICBM signifying that we are ready and waiting.
    27  *   3) The sender sends an OFT PROMPT message over the OFT 
     27 *   3) The sender sends an OFT PROMPT message over the OFT
    2828 *      connection.
    29  *   4) The receiver of the file sends back an exact copy of this 
    30  *      OFT packet, except the cookie is filled in with the cookie 
    31  *      from the ICBM.  I think this might be an attempt to verify 
    32  *      that the user that is connected is actually the guy that 
     29 *   4) The receiver of the file sends back an exact copy of this
     30 *      OFT packet, except the cookie is filled in with the cookie
     31 *      from the ICBM.  I think this might be an attempt to verify
     32 *      that the user that is connected is actually the guy that
    3333 *      we sent the ICBM to.  Oh, I've been calling this the ACK.
    34  *   5) The sender starts sending raw data across the connection 
     34 *   5) The sender starts sending raw data across the connection
    3535 *      until the entire file has been sent.
    36  *   6) The receiver knows the file is finished because the sender 
    37  *      sent the file size in an earlier OFT packet.  So then the 
    38  *      receiver sends the DONE thingy (after filling in the 
     36 *   6) The receiver knows the file is finished because the sender
     37 *      sent the file size in an earlier OFT packet.  So then the
     38 *      receiver sends the DONE thingy (after filling in the
    3939 *      "received" checksum and size) and closes the connection.
    4040 */
     
    102102 * Calculate oft checksum of buffer
    103103 *
    104  * Prevcheck should be 0xFFFF0000 when starting a checksum of a file.  The 
    105  * checksum is kind of a rolling checksum thing, so each time you get bytes 
    106  * of a file you just call this puppy and it updates the checksum.  You can 
    107  * calculate the checksum of an entire file by calling this in a while or a 
     104 * Prevcheck should be 0xFFFF0000 when starting a checksum of a file.  The
     105 * checksum is kind of a rolling checksum thing, so each time you get bytes
     106 * of a file you just call this puppy and it updates the checksum.  You can
     107 * calculate the checksum of an entire file by calling this in a while or a
    108108 * for loop, or something.
    109109 *
    110  * Thanks to Graham Booker for providing this improved checksum routine, 
    111  * which is simpler and should be more accurate than Josh Myer's original 
     110 * Thanks to Graham Booker for providing this improved checksum routine,
     111 * which is simpler and should be more accurate than Josh Myer's original
    112112 * code. -- wtm
    113113 *
    114  * This algorithim works every time I have tried it.  The other fails 
    115  * sometimes.  So, AOL who thought this up?  It has got to be the weirdest 
     114 * This algorithim works every time I have tried it.  The other fails
     115 * sometimes.  So, AOL who thought this up?  It has got to be the weirdest
    116116 * checksum I have ever seen.
    117117 *
     
    134134                check -= val;
    135135                /*
    136                  * The following appears to be necessary.... It happens 
     136                 * The following appears to be necessary.... It happens
    137137                 * every once in a while and the checksum doesn't fail.
    138138                 */
     
    164164 * Create a listening socket on a given port.
    165165 *
    166  * XXX - Give the client author the responsibility of setting up a 
    167  *       listener, then we no longer have a libfaim problem with broken 
     166 * XXX - Give the client author the responsibility of setting up a
     167 *       listener, then we no longer have a libfaim problem with broken
    168168 *       solaris *innocent smile* -- jbm
    169169 *
     
    187187                perror("getaddrinfo");
    188188                return -1;
    189         } 
     189        }
    190190        ressave = res;
    191         do { 
     191        do {
    192192                listenfd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
    193193                if (listenfd < 0)
     
    313313 * @param sess The session.
    314314 * @param conn The already-connected ODC connection.
    315  * @param typing If 0x0002, sends a "typing" message, 0x0001 sends "typed," and 
     315 * @param typing If 0x0002, sends a "typing" message, 0x0001 sends "typed," and
    316316 *        0x0000 sends "stopped."
    317317 * @return Return 0 if no errors, otherwise return the error number.
     
    386386 * Send client-to-client IM over an established direct connection.
    387387 * Call this just like you would aim_send_im, to send a directim.
    388  * 
     388 *
    389389 * @param sess The session.
    390390 * @param conn The already-connected ODC connection.
     
    453453        /* end of hdr2 */
    454454
    455 #if 0 /* XXX - this is how you send buddy icon info... */       
     455#if 0 /* XXX - this is how you send buddy icon info... */
    456456        aimbs_put16(hdrbs, 0x0008);
    457457        aimbs_put16(hdrbs, 0x000c);
     
    472472/**
    473473 * Get the screen name of the peer of a direct connection.
    474  * 
     474 *
    475475 * @param conn The ODC connection.
    476476 * @return The screen name of the dude, or NULL if there was an anomaly.
     
    483483                return NULL;
    484484
    485         if ((conn->type != AIM_CONN_TYPE_RENDEZVOUS) || 
     485        if ((conn->type != AIM_CONN_TYPE_RENDEZVOUS) ||
    486486                        (conn->subtype != AIM_CONN_SUBTYPE_OFT_DIRECTIM))
    487487                return NULL;
     
    497497 * @param sess The session.
    498498 * @param sn The screen name of the buddy whose direct connection you want to find.
    499  * @return The conn for the direct connection with the given buddy, or NULL if no 
     499 * @return The conn for the direct connection with the given buddy, or NULL if no
    500500 *         connection was found.
    501501 */
     
    522522 * For those times when we want to open up the direct connection channel ourselves.
    523523 *
    524  * You'll want to set up some kind of watcher on this socket. 
    525  * When the state changes, call aim_handlerendconnection with 
    526  * the connection returned by this.  aim_handlerendconnection 
     524 * You'll want to set up some kind of watcher on this socket.
     525 * When the state changes, call aim_handlerendconnection with
     526 * the connection returned by this.  aim_handlerendconnection
    527527 * will accept the pending connection and stop listening.
    528528 *
     
    586586 * This is a wrapper for aim_newconn.
    587587 *
    588  * If addr is NULL, the socket is not created, but the connection is 
     588 * If addr is NULL, the socket is not created, but the connection is
    589589 * allocated and setup to connect.
    590590 *
     
    683683                        if (payloadlength - recvd >= 1024)
    684684                                i = aim_recv(conn->fd, &msg[recvd], 1024);
    685                         else 
     685                        else
    686686                                i = aim_recv(conn->fd, &msg[recvd], payloadlength - recvd);
    687687                        if (i <= 0) {
     
    694694                                ret = userfunc(sess, &fr, snptr, (double)recvd / payloadlength);
    695695                }
    696                
     696
    697697                if ((userfunc = aim_callhandler(sess, conn, AIM_CB_FAM_OFT, AIM_CB_OFT_DIRECTIMINCOMING)))
    698698                        ret = userfunc(sess, &fr, snptr, msg, payloadlength, encoding, isawaymsg);
     
    746746
    747747/**
    748  * Remove the given oft_info struct from the oft_info linked list, and 
     748 * Remove the given oft_info struct from the oft_info linked list, and
    749749 * then free its memory.
    750750 *
     
    781781 * Creates a listener socket so the other dude can connect to us.
    782782 *
    783  * You'll want to set up some kind of watcher on this socket. 
    784  * When the state changes, call aim_handlerendconnection with 
    785  * the connection returned by this.  aim_handlerendconnection 
     783 * You'll want to set up some kind of watcher on this socket.
     784 * When the state changes, call aim_handlerendconnection with
     785 * the connection returned by this.  aim_handlerendconnection
    786786 * will accept the pending connection and stop listening.
    787787 *
    788788 * @param sess The session.
    789  * @param oft_info File transfer information associated with this 
     789 * @param oft_info File transfer information associated with this
    790790 *        connection.
    791791 * @return Return 0 if no errors, otherwise return the error number.
     
    855855
    856856        return fh;
    857 } 
     857}
    858858
    859859/**
     
    865865 */
    866866static int aim_oft_buildheader(aim_bstream_t *bs, struct aim_fileheader_t *fh)
    867 { 
     867{
    868868        fu8_t *hdr;
    869869
     
    910910 * @param sess The session.
    911911 * @param type The subtype of the OFT packet we're sending.
    912  * @param oft_info The aim_oft_info struct with the connection and OFT 
     912 * @param oft_info The aim_oft_info struct with the connection and OFT
    913913 *        info we're sending.
    914914 * @return Return 0 if no errors, otherwise return the error number.
     
    923923#if 0
    924924        /*
    925          * If you are receiving a file, the cookie should be null, if you are sending a 
    926          * file, the cookie should be the same as the one used in the ICBM negotiation 
     925         * If you are receiving a file, the cookie should be null, if you are sending a
     926         * file, the cookie should be the same as the one used in the ICBM negotiation
    927927         * SNACs.
    928928         */
     
    956956
    957957/**
    958  * Handle incoming data on a rendezvous connection.  This is analogous to the 
    959  * consumesnac function in rxhandlers.c, and I really think this should probably 
     958 * Handle incoming data on a rendezvous connection.  This is analogous to the
     959 * consumesnac function in rxhandlers.c, and I really think this should probably
    960960 * be in rxhandlers.c as well, but I haven't finished cleaning everything up yet.
    961961 *
    962962 * @param sess The session.
    963963 * @param fr The frame allocated for the incoming data.
    964  * @return Return 0 if the packet was handled correctly, otherwise return the 
     964 * @return Return 0 if the packet was handled correctly, otherwise return the
    965965 *         error number.
    966966 */
  • libfaim/icq.c

    rcf02dd6 r7869e48  
    110110 *
    111111 * @param sess The oscar session
    112  * @param passwd The new password.  If this is longer than 8 characters it 
     112 * @param passwd The new password.  If this is longer than 8 characters it
    113113 *        will be truncated.
    114114 * @return Return 0 if no errors, otherwise return the error number.
     
    322322
    323323/*
    324  * Send an SMS message.  This is the non-US way.  The US-way is to IM 
     324 * Send an SMS message.  This is the non-US way.  The US-way is to IM
    325325 * their cell phone number (+19195551234).
    326326 *
     
    336336 * </icq_sms_message>
    337337 *
    338  * Yeah hi Peter, whaaaat's happening.  If there's any way to use 
     338 * Yeah hi Peter, whaaaat's happening.  If there's any way to use
    339339 * a codepage other than 1252 that would be great.  Thaaaanks.
    340340 */
  • libfaim/im.c

    rcf02dd6 r7869e48  
    99 * is used for negotiating "rendezvous".  These transactions end in
    1010 * something more complex happening, such as a chat invitation, or
    11  * a file transfer.  Channel 3 is used for chat messages (not in 
    12  * the same family as these channels).  Channel 4 is used for 
    13  * various ICQ messages.  Examples are normal messages, URLs, and 
     11 * a file transfer.  Channel 3 is used for chat messages (not in
     12 * the same family as these channels).  Channel 4 is used for
     13 * various ICQ messages.  Examples are normal messages, URLs, and
    1414 * old-style authorization.
    1515 *
     
    1919 * use of this field.
    2020 *
    21  * TODO: Split this up into an im.c file an an icbm.c file.  It 
     21 * TODO: Split this up into an im.c file an an icbm.c file.  It
    2222 *       will be beautiful, you'll see.
    2323 *
     
    3535
    3636/**
    37  * Add a standard ICBM header to the given bstream with the given 
     37 * Add a standard ICBM header to the given bstream with the given
    3838 * information.
    3939 *
     
    6464 * Heres the current collection:
    6565 *  0501 0003 0101 0101 01              AOL Mobile Communicator, WinAIM 1.0.414
    66  *  0501 0003 0101 0201 01              WinAIM 2.0.847, 2.1.1187, 3.0.1464, 
     66 *  0501 0003 0101 0201 01              WinAIM 2.0.847, 2.1.1187, 3.0.1464,
    6767 *                                      4.3.2229, 4.4.2286
    6868 *  0501 0004 0101 0102 0101            WinAIM 4.1.2010, libfaim (right here)
     
    8484        } fingerprints[] = {
    8585                /* AOL Mobile Communicator, WinAIM 1.0.414 */
    86                 { AIM_CLIENTTYPE_MC, 
     86                { AIM_CLIENTTYPE_MC,
    8787                  3, {0x01, 0x01, 0x01}},
    8888
    8989                /* WinAIM 2.0.847, 2.1.1187, 3.0.1464, 4.3.2229, 4.4.2286 */
    90                 { AIM_CLIENTTYPE_WINAIM, 
     90                { AIM_CLIENTTYPE_WINAIM,
    9191                  3, {0x01, 0x01, 0x02}},
    9292
     
    116116}
    117117
    118 /** 
     118/**
    119119 * Subtype 0x0002 - Set ICBM parameters.
    120120 *
    121121 * I definitly recommend sending this.  If you don't, you'll be stuck
    122122 * with the rather unreasonable defaults.
    123  * 
     123 *
    124124 */
    125125faim_export int aim_im_setparams(aim_session_t *sess, struct aim_icbmparameters *params)
     
    145145
    146146        /* These are all read-write */
    147         aimbs_put32(&fr->data, params->flags); 
     147        aimbs_put32(&fr->data, params->flags);
    148148        aimbs_put16(&fr->data, params->maxmsglen);
    149         aimbs_put16(&fr->data, params->maxsenderwarn); 
    150         aimbs_put16(&fr->data, params->maxrecverwarn); 
     149        aimbs_put16(&fr->data, params->maxsenderwarn);
     150        aimbs_put16(&fr->data, params->maxrecverwarn);
    151151        aimbs_put32(&fr->data, params->minmsginterval);
    152152
     
    185185        params.maxrecverwarn = aimbs_get16(bs);
    186186        params.minmsginterval = aimbs_get32(bs);
    187        
     187
    188188        if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype)))
    189189                return userfunc(sess, rx, &params);
     
    193193
    194194/**
    195  * Subtype 0x0006 - Send an ICBM (instant message). 
     195 * Subtype 0x0006 - Send an ICBM (instant message).
    196196 *
    197197 *
     
    207207 *                        what you're doing.
    208208 *   AIM_IMFLAGS_ISO_8859_1 -- The message contains the ASCII8 subset
    209  *                        known as ISO-8859-1. 
     209 *                        known as ISO-8859-1.
    210210 *
    211211 * Generally, you should use the lowest encoding possible to send
    212212 * your message.  If you only use basic punctuation and the generic
    213213 * Latin alphabet, use ASCII7 (no flags).  If you happen to use non-ASCII7
    214  * characters, but they are all clearly defined in ISO-8859-1, then 
     214 * characters, but they are all clearly defined in ISO-8859-1, then
    215215 * use that.  Keep in mind that not all characters in the PC ASCII8
    216216 * character set are defined in the ISO standard. For those cases (most
     
    224224 * of the clients I use can parse those messages (and besides that,
    225225 * wchars are difficult and non-portable to handle in most UNIX environments).
    226  * If you really need to include special characters, use the HTML UNICODE 
    227  * entities.  These are of the form &#2026; where 2026 is the hex 
    228  * representation of the UNICODE index (in this case, UNICODE 
     226 * If you really need to include special characters, use the HTML UNICODE
     227 * entities.  These are of the form &#2026; where 2026 is the hex
     228 * representation of the UNICODE index (in this case, UNICODE
    229229 * "Horizontal Ellipsis", or 133 in in ASCII8).
    230230 *
     
    232232 * in all of libfaim, it is written with performance in mind.  As such,
    233233 * it is not as clear as it could be in respect to how this message is
    234  * supposed to be layed out. Most obviously, tlvlists should be used 
    235  * instead of writing out the bytes manually. 
     234 * supposed to be layed out. Most obviously, tlvlists should be used
     235 * instead of writing out the bytes manually.
    236236 *
    237237 * XXX - more precise verification that we never send SNACs larger than 8192
     
    289289                return -ENOMEM;
    290290
    291         /* XXX - should be optional */ 
     291        /* XXX - should be optional */
    292292        snacid = aim_cachesnac(sess, 0x0004, 0x0006, 0x0000, args->destsn, strlen(args->destsn)+1);
    293293        aim_putsnac(&fr->data, 0x0004, 0x0006, 0x0000, snacid);
    294294
    295         /* 
     295        /*
    296296         * Generate a random message cookie
    297297         *
    298          * We could cache these like we do SNAC IDs.  (In fact, it 
    299          * might be a good idea.)  In the message error functions, 
    300          * the 8byte message cookie is returned as well as the 
     298         * We could cache these like we do SNAC IDs.  (In fact, it
     299         * might be a good idea.)  In the message error functions,
     300         * the 8byte message cookie is returned as well as the
    301301         * SNAC ID.
    302302         *
     
    367367        /*
    368368         * Set the I HAVE A REALLY PURTY ICON flag.
    369          * XXX - This should really only be sent on initial 
     369         * XXX - This should really only be sent on initial
    370370         * IMs and when you change your icon.
    371371         */
     
    397397
    398398/*
    399  * Simple wrapper for aim_im_sendch1_ext() 
     399 * Simple wrapper for aim_im_sendch1_ext()
    400400 *
    401401 * You cannot use aim_send_im if you need the HASICON flag.  You must
     
    505505 * You'd think this would be in icq.c, but, well, I'm trying to stick with
    506506 * the one-group-per-file scheme as much as possible.  This could easily
    507  * be an exception, since Rendezvous IMs are external of the Oscar core, 
     507 * be an exception, since Rendezvous IMs are external of the Oscar core,
    508508 * and therefore are undefined.  Really I just need to think of a good way to
    509509 * make an interface similar to what AOL actually uses.  But I'm not using COM.
     
    613613        aim_putsnac(&fr->data, 0x0004, 0x0006, 0x0000, snacid);
    614614
    615         /* 
    616          * Generate a random message cookie 
    617          *
    618          * This cookie needs to be alphanumeric and NULL-terminated to be 
     615        /*
     616         * Generate a random message cookie
     617         *
     618         * This cookie needs to be alphanumeric and NULL-terminated to be
    619619         * TOC-compatible.
    620620         *
     
    646646        aim_tlvlist_add_16(&itl, 0x0005, port);
    647647        aim_tlvlist_add_noval(&itl, 0x000f);
    648        
     648
    649649        aim_tlvlist_write(&hdrbs, &itl);
    650650
     
    833833 * @param sess The oscar session.
    834834 * @param sn The UIN of the user of whom you wish to request info.
    835  * @param type The type of info you wish to request.  This should be the current 
     835 * @param type The type of info you wish to request.  This should be the current
    836836 *        state of the user, as one of the AIM_ICQ_STATE_* defines.
    837837 * @return Return 0 if no errors, otherwise return the error number.
     
    931931 * Subtype 0x0006 - Send an ICQ-esque ICBM.
    932932 *
    933  * This can be used to send an ICQ authorization reply (deny or grant).  It is the "old way." 
    934  * The new way is to use SSI.  I like the new way a lot better.  This seems like such a hack, 
    935  * mostly because it's in network byte order.  Figuring this stuff out sometimes takes a while, 
    936  * but thats ok, because it gives me time to try to figure out what kind of drugs the AOL people 
     933 * This can be used to send an ICQ authorization reply (deny or grant).  It is the "old way."
     934 * The new way is to use SSI.  I like the new way a lot better.  This seems like such a hack,
     935 * mostly because it's in network byte order.  Figuring this stuff out sometimes takes a while,
     936 * but thats ok, because it gives me time to try to figure out what kind of drugs the AOL people
    937937 * were taking when they merged the two protocols.
    938938 *
     
    10731073 *
    10741074 * Not only do AIM ICBM's support multiple channels.  Not only do they
    1075  * support multiple character sets.  But they support multiple character 
     1075 * support multiple character sets.  But they support multiple character
    10761076 * sets / encodings within the same ICBM.
    10771077 *
     
    10791079 * seem utterly unnecessary by today's standards.  In fact, there is only
    10801080 * one client still in popular use that still uses this method: AOL for the
    1081  * Macintosh, Version 5.0.  Obscure, yes, I know. 
     1081 * Macintosh, Version 5.0.  Obscure, yes, I know.
    10821082 *
    10831083 * In modern (non-"legacy") clients, if the user tries to send a character
     
    10871087 * Multipart messages prevent this wasted space by allowing the client to
    10881088 * only send the characters in UNICODE that need to be sent that way, and
    1089  * the rest of the message can be sent in whatever the native character 
     1089 * the rest of the message can be sent in whatever the native character
    10901090 * set is (probably ASCII).
    10911091 *
     
    11161116static int mpmsg_addsection(aim_session_t *sess, aim_mpmsg_t *mpm, fu16_t charset, fu16_t charsubset, fu8_t *data, fu16_t datalen)
    11171117{
    1118         aim_mpmsg_section_t *sec; 
    1119        
     1118        aim_mpmsg_section_t *sec;
     1119
    11201120        if (!(sec = malloc(sizeof(aim_mpmsg_section_t))))
    11211121                return -1;
     
    11631163        fu8_t *dup;
    11641164
    1165         if (!(dup = strdup(ascii))) 
     1165        if (!(dup = strdup(ascii)))
    11661166                return -1;
    11671167
     
    11931193                return -1;
    11941194        }
    1195        
     1195
    11961196        return 0;
    11971197}
     
    12031203        for (cur = mpm->parts; cur; ) {
    12041204                aim_mpmsg_section_t *tmp;
    1205                
     1205
    12061206                tmp = cur->next;
    12071207                free(cur->data);
     
    12091209                cur = tmp;
    12101210        }
    1211        
     1211
    12121212        mpm->numparts = 0;
    12131213        mpm->parts = NULL;
     
    12171217
    12181218/*
    1219  * Start by building the multipart structures, then pick the first 
     1219 * Start by building the multipart structures, then pick the first
    12201220 * human-readable section and stuff it into args->msg so no one gets
    12211221 * suspicious.
     
    14051405                         * You really shouldn't advertise a zero-length icon
    14061406                         * anyway.
    1407                          * 
     1407                         *
    14081408                         */
    14091409                        if (args.iconlen)
     
    15521552
    15531553/*
    1554  * The relationship between AIM_CAPS_ICQSERVERRELAY and AIM_CAPS_ICQRTF is 
     1554 * The relationship between AIM_CAPS_ICQSERVERRELAY and AIM_CAPS_ICQRTF is
    15551555 * kind of odd. This sends the client ICQRTF since that is all that I've seen
    15561556 * SERVERRELAY used for.
     
    15711571
    15721572        msgtype = aimbs_getle16(servdata);
    1573        
     1573
    15741574        anslen = aimbs_getle32(servdata);
    15751575        aim_bstream_advance(servdata, anslen);
     
    16021602        args->destructor = (void *)incomingim_ch2_sendfile_free;
    16031603
    1604         /* Maybe there is a better way to tell what kind of sendfile 
     1604        /* Maybe there is a better way to tell what kind of sendfile
    16051605         * this is?  Maybe TLV t(000a)? */
    16061606        if (servdata) { /* Someone is sending us a file */
     
    16131613
    16141614                /*
    1615                  * I hope to God I'm right when I guess that there is a 
    1616                  * 32 char max filename length for single files.  I think 
    1617                  * OFT tends to do that.  Gotta love inconsistency.  I saw 
     1615                 * I hope to God I'm right when I guess that there is a
     1616                 * 32 char max filename length for single files.  I think
     1617                 * OFT tends to do that.  Gotta love inconsistency.  I saw
    16181618                 * a 26 byte filename?
    16191619                 */
    16201620                /* AAA - create an aimbs_getnullstr function (don't anymore)(maybe) */
    1621                 /* Use an inelegant way of getting the null-terminated filename, 
     1621                /* Use an inelegant way of getting the null-terminated filename,
    16221622                 * since there's no easy bstream routine. */
    16231623                for (flen = 0; aimbs_get8(servdata); flen++);
     
    16251625                args->info.sendfile.filename = aimbs_getstr(servdata, flen);
    16261626
    1627                 /* There is sometimes more after the null-terminated filename, 
     1627                /* There is sometimes more after the null-terminated filename,
    16281628                 * but I'm unsure of its format. */
    16291629                /* I don't believe him. */
     
    16521652
    16531653        /*
    1654          * There's another block of TLVs embedded in the type 5 here. 
     1654         * There's another block of TLVs embedded in the type 5 here.
    16551655         */
    16561656        block1 = aim_tlv_gettlv(tlvlist, 0x0005, 1);
     
    16611661         *
    16621662         * 0 is a request, 1 is a cancel, 2 is an accept
    1663          */ 
     1663         */
    16641664        args.status = aimbs_get16(&bbs);
    16651665
     
    16681668         */
    16691669        cookie2 = aimbs_getraw(&bbs, 8);
    1670         if (memcmp(cookie, cookie2, 8) != 0) 
     1670        if (memcmp(cookie, cookie2, 8) != 0)
    16711671                faimdprintf(sess, 0, "rend: warning cookies don't match!\n");
    16721672        memcpy(args.cookie, cookie2, 8);
     
    16791679        args.reqclass = aim_locate_getcaps(sess, &bbs, 0x10);
    16801680
    1681         /* 
     1681        /*
    16821682         * What follows may be TLVs or nothing, depending on the
    16831683         * purpose of the message.
     
    17611761        if (aim_tlv_gettlv(list2, 0x000d, 1))
    17621762                args.encoding = aim_tlv_getstr(list2, 0x000d, 1);
    1763        
     1763
    17641764        /*
    17651765         * Language.
     
    18961896         * Channel ID.
    18971897         *
    1898          * Channel 0x0001 is the message channel.  It is 
     1898         * Channel 0x0001 is the message channel.  It is
    18991899         * used to send basic ICBMs.
    19001900         *
     
    19051905         * Channel 0x0003 is used for chat messages.
    19061906         *
    1907          * Channel 0x0004 is used for ICQ authorization, or 
     1907         * Channel 0x0004 is used for ICQ authorization, or
    19081908         * possibly any system notice.
    19091909         *
     
    19181918         * userinfo block contains the number of TLVs that contain user
    19191919         * information, the rest are not even though there is no seperation.
    1920          * You can start reading the message TLVs after aim_info_extract() 
     1920         * You can start reading the message TLVs after aim_info_extract()
    19211921         * parses out the standard userinfo block.
    19221922         *
     
    19241924         * userinfo block and the rest of the message, however there should
    19251925         * never be two TLVs of the same type in one block.
    1926          * 
     1926         *
    19271927         */
    19281928        aim_info_extract(sess, bs, &userinfo);
     
    19431943
    19441944                /*
    1945                  * Read block of TLVs (not including the userinfo data).  All 
     1945                 * Read block of TLVs (not including the userinfo data).  All
    19461946                 * further data is derived from what is parsed here.
    19471947                 */
     
    19701970/*
    19711971 * Subtype 0x0008 - Send a warning to sn.
    1972  * 
     1972 *
    19731973 * Flags:
    19741974 *  AIM_WARN_ANON  Send as an anonymous (doesn't count as much)
    19751975 *
    1976  * returns -1 on error (couldn't alloc packet), 0 on success. 
     1976 * returns -1 on error (couldn't alloc packet), 0 on success.
    19771977 *
    19781978 */
     
    19911991        aim_putsnac(&fr->data, 0x0004, 0x0008, 0x0000, snacid);
    19921992
    1993         aimbs_put16(&fr->data, (flags & AIM_WARN_ANON) ? 0x0001 : 0x0000); 
     1993        aimbs_put16(&fr->data, (flags & AIM_WARN_ANON) ? 0x0001 : 0x0000);
    19941994        aimbs_put8(&fr->data, strlen(sn));
    19951995        aimbs_putraw(&fr->data, sn, strlen(sn));
     
    20082008        aim_userinfo_t userinfo;
    20092009
    2010         while (aim_bstream_empty(bs)) { 
     2010        while (aim_bstream_empty(bs)) {
    20112011
    20122012                channel = aimbs_get16(bs);
     
    20312031 *    AIM_TRANSFER_DENY_DECLINE -- "client has declined transfer"
    20322032 *    AIM_TRANSFER_DENY_NOTACCEPTING -- "client is not accepting transfers"
    2033  * 
     2033 *
    20342034 */
    20352035faim_export int aim_im_denytransfer(aim_session_t *sess, const char *sender, const char *cookie, fu16_t code)
     
    20392039        aim_snacid_t snacid;
    20402040        aim_tlvlist_t *tl = NULL;
    2041        
     2041
    20422042        if (!sess || !(conn = aim_conn_findbygroup(sess, 0x0004)))
    20432043                return -EINVAL;
     
    20482048        snacid = aim_cachesnac(sess, 0x0004, 0x000b, 0x0000, NULL, 0);
    20492049        aim_putsnac(&fr->data, 0x0004, 0x000b, 0x0000, snacid);
    2050        
     2050
    20512051        aimbs_putraw(&fr->data, cookie, 8);
    20522052
     
    21532153 * Subtype 0x000c - Receive an ack after sending an ICBM.
    21542154 *
    2155  * You have to have send the message with the AIM_IMFLAGS_ACK flag set 
    2156  * (TLV t(0003)).  The ack contains the ICBM header of the message you 
     2155 * You have to have send the message with the AIM_IMFLAGS_ACK flag set
     2156 * (TLV t(0003)).  The ack contains the ICBM header of the message you
    21572157 * sent.
    21582158 *
     
    21822182 * Subtype 0x0014 - Send a mini typing notification (mtn) packet.
    21832183 *
    2184  * This is supported by winaim5 and newer, MacAIM bleh and newer, iChat bleh and newer, 
     2184 * This is supported by winaim5 and newer, MacAIM bleh and newer, iChat bleh and newer,
    21852185 * and Gaim 0.60 and newer.
    21862186 *
     
    22372237 * Subtype 0x0014 - Receive a mini typing notification (mtn) packet.
    22382238 *
    2239  * This is supported by winaim5 and newer, MacAIM bleh and newer, iChat bleh and newer, 
     2239 * This is supported by winaim5 and newer, MacAIM bleh and newer, iChat bleh and newer,
    22402240 * and Gaim 0.60 and newer.
    22412241 *
  • libfaim/locate.c

    r6e3980e r7869e48  
    33 *
    44 * The functions here are responsible for requesting and parsing information-
    5  * gathering SNACs.  Or something like that.  This family contains the SNACs 
     5 * gathering SNACs.  Or something like that.  This family contains the SNACs
    66 * for getting and setting info, away messages, directory profile thingy, etc.
    77 */
     
    1414
    1515/*
    16  * Capability blocks. 
     16 * Capability blocks.
    1717 *
    1818 * These are CLSIDs. They should actually be of the form:
     
    3636         */
    3737        {AIM_CAPS_ICHAT,
    38          {0x09, 0x46, 0x00, 0x00, 0x4c, 0x7f, 0x11, 0xd1, 
     38         {0x09, 0x46, 0x00, 0x00, 0x4c, 0x7f, 0x11, 0xd1,
    3939          0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}},
    4040
    4141        {AIM_CAPS_SECUREIM,
    42          {0x09, 0x46, 0x00, 0x01, 0x4c, 0x7f, 0x11, 0xd1, 
     42         {0x09, 0x46, 0x00, 0x01, 0x4c, 0x7f, 0x11, 0xd1,
    4343          0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}},
    4444
    4545        {AIM_CAPS_VIDEO,
    46          {0x09, 0x46, 0x01, 0x00, 0x4c, 0x7f, 0x11, 0xd1, 
    47           0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}},
    48 
    49         /*
    50          * Not really sure about this one.  In an email from 
    51          * 26 Sep 2003, Matthew Sachs suggested that, "this 
     46         {0x09, 0x46, 0x01, 0x00, 0x4c, 0x7f, 0x11, 0xd1,
     47          0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}},
     48
     49        /*
     50         * Not really sure about this one.  In an email from
     51         * 26 Sep 2003, Matthew Sachs suggested that, "this
    5252         * is probably the capability for the SMS features."
    5353         */
    5454        {AIM_CAPS_SMS,
    55          {0x09, 0x46, 0x01, 0xff, 0x4c, 0x7f, 0x11, 0xd1, 
     55         {0x09, 0x46, 0x01, 0xff, 0x4c, 0x7f, 0x11, 0xd1,
    5656          0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}},
    5757
    5858        {AIM_CAPS_GENERICUNKNOWN,
    59          {0x09, 0x46, 0xf0, 0x03, 0x4c, 0x7f, 0x11, 0xd1, 
     59         {0x09, 0x46, 0xf0, 0x03, 0x4c, 0x7f, 0x11, 0xd1,
    6060          0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}},
    6161
    6262        {AIM_CAPS_GENERICUNKNOWN,
    63          {0x09, 0x46, 0xf0, 0x04, 0x4c, 0x7f, 0x11, 0xd1, 
     63         {0x09, 0x46, 0xf0, 0x04, 0x4c, 0x7f, 0x11, 0xd1,
    6464          0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}},
    6565
    6666        {AIM_CAPS_GENERICUNKNOWN,
    67          {0x09, 0x46, 0xf0, 0x05, 0x4c, 0x7f, 0x11, 0xd1, 
     67         {0x09, 0x46, 0xf0, 0x05, 0x4c, 0x7f, 0x11, 0xd1,
    6868          0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}},
    6969
    7070        {AIM_CAPS_HIPTOP,
    71          {0x09, 0x46, 0x13, 0x23, 0x4c, 0x7f, 0x11, 0xd1, 
     71         {0x09, 0x46, 0x13, 0x23, 0x4c, 0x7f, 0x11, 0xd1,
    7272          0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}},
    7373
    7474        {AIM_CAPS_VOICE,
    75          {0x09, 0x46, 0x13, 0x41, 0x4c, 0x7f, 0x11, 0xd1, 
     75         {0x09, 0x46, 0x13, 0x41, 0x4c, 0x7f, 0x11, 0xd1,
    7676          0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}},
    7777
    7878        {AIM_CAPS_SENDFILE,
    79          {0x09, 0x46, 0x13, 0x43, 0x4c, 0x7f, 0x11, 0xd1, 
     79         {0x09, 0x46, 0x13, 0x43, 0x4c, 0x7f, 0x11, 0xd1,
    8080          0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}},
    8181
    8282        {AIM_CAPS_ICQ_DIRECT,
    83          {0x09, 0x46, 0x13, 0x44, 0x4c, 0x7f, 0x11, 0xd1, 
     83         {0x09, 0x46, 0x13, 0x44, 0x4c, 0x7f, 0x11, 0xd1,
    8484          0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}},
    8585
    8686        {AIM_CAPS_DIRECTIM,
    87          {0x09, 0x46, 0x13, 0x45, 0x4c, 0x7f, 0x11, 0xd1, 
     87         {0x09, 0x46, 0x13, 0x45, 0x4c, 0x7f, 0x11, 0xd1,
    8888          0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}},
    8989
    9090        {AIM_CAPS_BUDDYICON,
    91          {0x09, 0x46, 0x13, 0x46, 0x4c, 0x7f, 0x11, 0xd1, 
     91         {0x09, 0x46, 0x13, 0x46, 0x4c, 0x7f, 0x11, 0xd1,
    9292          0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}},
    9393
     
    108108
    109109        /*
    110          * Indeed, there are two of these.  The former appears to be correct, 
    111          * but in some versions of winaim, the second one is set.  Either they 
    112          * forgot to fix endianness, or they made a typo. It really doesn't 
     110         * Indeed, there are two of these.  The former appears to be correct,
     111         * but in some versions of winaim, the second one is set.  Either they
     112         * forgot to fix endianness, or they made a typo. It really doesn't
    113113         * matter which.
    114114         */
     
    125125
    126126        /*
    127          * Setting this lets AIM users receive messages from ICQ users, and ICQ 
    128          * users receive messages from AIM users.  It also lets ICQ users show 
    129          * up in buddy lists for AIM users, and AIM users show up in buddy lists 
    130          * for ICQ users.  And ICQ privacy/invisibility acts like AIM privacy, 
    131          * in that if you add a user to your deny list, you will not be able to 
    132          * see them as online (previous you could still see them, but they 
     127         * Setting this lets AIM users receive messages from ICQ users, and ICQ
     128         * users receive messages from AIM users.  It also lets ICQ users show
     129         * up in buddy lists for AIM users, and AIM users show up in buddy lists
     130         * for ICQ users.  And ICQ privacy/invisibility acts like AIM privacy,
     131         * in that if you add a user to your deny list, you will not be able to
     132         * see them as online (previous you could still see them, but they
    133133         * couldn't see you.
    134134         */
     
    149149         */
    150150        {AIM_CAPS_CHAT,
    151          {0x74, 0x8f, 0x24, 0x20, 0x62, 0x87, 0x11, 0xd1, 
     151         {0x74, 0x8f, 0x24, 0x20, 0x62, 0x87, 0x11, 0xd1,
    152152          0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}},
    153153
     
    164164        /* This is added by the servers and it only shows up for ourselves... */
    165165        {AIM_CAPS_GENERICUNKNOWN,
    166          {0x97, 0xb1, 0x27, 0x51, 0x24, 0x3c, 0x43, 0x34, 
     166         {0x97, 0xb1, 0x27, 0x51, 0x24, 0x3c, 0x43, 0x34,
    167167          0xad, 0x22, 0xd6, 0xab, 0xf7, 0x3f, 0x14, 0x09}},
    168168
    169         {AIM_CAPS_APINFO, 
     169        {AIM_CAPS_APINFO,
    170170         {0xaa, 0x4a, 0x32, 0xb5, 0xf8, 0x84, 0x48, 0xc6,
    171171          0xa3, 0xd7, 0x8c, 0x50, 0x97, 0x19, 0xfd, 0x5b}},
     
    183183
    184184/*
    185  * Add the userinfo to our linked list.  If we already have userinfo 
     185 * Add the userinfo to our linked list.  If we already have userinfo
    186186 * for this buddy, then just overwrite parts of the old data.
    187187 * @param userinfo Contains the new information for the buddy.
     
    260260
    261261/**
    262  * Remove this screen name from our queue.  If this info was resquested 
     262 * Remove this screen name from our queue.  If this info was resquested
    263263 * by our info request queue, then pop the next element off of the queue.
    264264 *
    265265 * @param sess The aim session.
    266266 * @param sn Screen name of the info we just received.
    267  * @return True if the request was explicit (client requested the info), 
     267 * @return True if the request was explicit (client requested the info),
    268268 *         false if the request was implicit (libfaim request the info).
    269269 */
     
    450450
    451451/*
    452  * AIM is fairly regular about providing user info.  This is a generic 
     452 * AIM is fairly regular about providing user info.  This is a generic
    453453 * routine to extract it in its standard form.
    454454 */
     
    465465
    466466        /*
    467          * Screen name.  Stored as an unterminated string prepended with a 
     467         * Screen name.  Stored as an unterminated string prepended with a
    468468         * byte containing its length.
    469469         */
     
    477477
    478478        /*
    479          * TLV Count. Unsigned short representing the number of 
     479         * TLV Count. Unsigned short representing the number of
    480480         * Type-Length-Value triples that follow.
    481481         */
    482482        tlvcnt = aimbs_get16(bs);
    483483
    484         /* 
     484        /*
    485485         * Parse out the Type-Length-Value triples as they're found.
    486486         */
     
    497497                        /*
    498498                         * Type = 0x0001: User flags
    499                          * 
     499                         *
    500500                         * Specified as any of the following ORed together:
    501501                         *      0x0001  Trial (user less than 60days)
     
    503503                         *      0x0004  AOL Main Service user
    504504                         *      0x0008  Unknown bit 4
    505                          *      0x0010  Free (AIM) user 
     505                         *      0x0010  Free (AIM) user
    506506                         *      0x0020  Away
    507507                         *      0x0400  ActiveBuddy
     
    513513                } else if (type == 0x0002) {
    514514                        /*
    515                          * Type = 0x0002: Account creation time. 
     515                         * Type = 0x0002: Account creation time.
    516516                         *
    517517                         * The time/date that the user originally registered for
     
    532532                         * Type = 0x0003: On-Since date.
    533533                         *
    534                          * The time/date that the user started their current 
     534                         * The time/date that the user started their current
    535535                         * session, stored in time_t format.
    536536                         */
     
    542542                         * Type = 0x0004: Idle time.
    543543                         *
    544                          * Number of minutes since the user actively used the 
     544                         * Number of minutes since the user actively used the
    545545                         * service.
    546546                         *
    547547                         * Note that the client tells the server when to start
    548                          * counting idle times, so this may or may not be 
     548                         * counting idle times, so this may or may not be
    549549                         * related to reality.
    550550                         */
     
    554554                } else if (type == 0x0005) {
    555555                        /*
    556                          * Type = 0x0005: Member since date. 
     556                         * Type = 0x0005: Member since date.
    557557                         *
    558558                         * The time/date that the user originally registered for
     
    570570                         * Type = 0x0006: ICQ Online Status
    571571                         *
    572                          * ICQ's Away/DND/etc "enriched" status. Some decoding 
     572                         * ICQ's Away/DND/etc "enriched" status. Some decoding
    573573                         * of values done by Scott <darkagl@pcnet.com>
    574574                         */
     
    595595
    596596                } else if (type == 0x000c) {
    597                         /* 
     597                        /*
    598598                         * Type = 0x000c
    599599                         *
     
    603603                         * Format is:
    604604                         * 4 bytes - Our IP address, 0xc0 a8 01 2b for 192.168.1.43
    605                          * 
     605                         *
    606606                         *
    607607                         */
     
    632632                         * Type = 0x0010: Session Length. (AOL)
    633633                         *
    634                          * The duration, in seconds, of the user's current 
     634                         * The duration, in seconds, of the user's current
    635635                         * session.
    636636                         *
     
    646646                         * Type = 0x0019
    647647                         *
    648                          * OSCAR short capability information.  A shortened 
     648                         * OSCAR short capability information.  A shortened
    649649                         * form of the normal capabilities.
    650650                         */
     
    656656                         * Type = 0x001a
    657657                         *
    658                          * AOL short capability information.  A shortened 
     658                         * AOL short capability information.  A shortened
    659659                         * form of the normal capabilities.
    660660                         */
     
    673673                         * Buddy icon information and available messages.
    674674                         *
    675                          * This almost seems like the AIM protocol guys gave 
    676                          * the iChat guys a Type, and the iChat guys tried to 
    677                          * cram as much cool shit into it as possible.  Then 
    678                          * the Windows AIM guys were like, "hey, that's 
     675                         * This almost seems like the AIM protocol guys gave
     676                         * the iChat guys a Type, and the iChat guys tried to
     677                         * cram as much cool shit into it as possible.  Then
     678                         * the Windows AIM guys were like, "hey, that's
    679679                         * pretty neat, let's copy those prawns."
    680680                         *
    681                          * In that spirit, this can contain a custom message, 
    682                          * kind of like an away message, but you're not away 
    683                          * (it's called an "available" message).  Or it can 
    684                          * contain information about the buddy icon the user 
     681                         * In that spirit, this can contain a custom message,
     682                         * kind of like an away message, but you're not away
     683                         * (it's called an "available" message).  Or it can
     684                         * contain information about the buddy icon the user
    685685                         * has stored on the server.
    686686                         */
     
    748748                        /*
    749749                         * Reaching here indicates that either AOL has
    750                          * added yet another TLV for us to deal with, 
     750                         * added yet another TLV for us to deal with,
    751751                         * or the parsing has gone Terribly Wrong.
    752752                         *
     
    805805        if (info->present & AIM_USERINFO_PRESENT_CAPABILITIES)
    806806                aim_tlvlist_add_caps(&tlvlist, 0x000d, info->capabilities);
    807  
     807
    808808        if (info->present & AIM_USERINFO_PRESENT_SESSIONLEN)
    809809                aim_tlvlist_add_32(&tlvlist, (fu16_t)((info->flags & AIM_FLAG_AOL) ? 0x0010 : 0x000f), info->sessionlen);
     
    846846
    847847        /*
    848          * Remove this screen name from our queue.  If the client requested 
    849          * this buddy's info explicitly, then notify them that we do not have 
     848         * Remove this screen name from our queue.  If the client requested
     849         * this buddy's info explicitly, then notify them that we do not have
    850850         * info for this buddy.
    851851         */
     
    915915 * away are set, respectively, and their value may or may not be
    916916 * restricted to a few choices.  I am currently aware of:
    917  * 
     917 *
    918918 * us-ascii             Just that
    919919 * unicode-2-0          UCS2-BE
    920  * 
     920 *
    921921 * profile_len and awaymsg_len MUST be set similarly, and they MUST
    922922 * be the length of their respective strings in bytes.
     
    925925 * message, set awaymsg non-NULL and awaymsg_len to 0 (this is the
    926926 * obvious equivalent).
    927  * 
     927 *
    928928 */
    929929faim_export int aim_locate_setprofile(aim_session_t *sess,
     
    10481048
    10491049        snacid = aim_cachesnac(sess, 0x0002, 0x0005, 0x0000, NULL, 0);
    1050        
     1050
    10511051        aim_putsnac(&fr->data, 0x0002, 0x0005, 0x0000, snacid);
    10521052        aimbs_put16(&fr->data, infotype);
     
    11041104
    11051105        /*
    1106          * Remove this screen name from our queue.  If the client requested 
    1107          * this buddy's info explicitly, then notify them that we have info 
     1106         * Remove this screen name from our queue.  If the client requested
     1107         * this buddy's info explicitly, then notify them that we have info
    11081108         * for this buddy.
    11091109         */
     
    11161116}
    11171117
    1118 /* 
     1118/*
    11191119 * Subtype 0x0009 - Set directory profile data.
    11201120 *
     
    11231123 *
    11241124 */
    1125 faim_export int aim_locate_setdirinfo(aim_session_t *sess, const char *first, const char *middle, const char *last, const char *maiden, const char *nickname, const char *street, const char *city, const char *state, const char *zip, int country, fu16_t privacy) 
     1125faim_export int aim_locate_setdirinfo(aim_session_t *sess, const char *first, const char *middle, const char *last, const char *maiden, const char *nickname, const char *street, const char *city, const char *state, const char *zip, int country, fu16_t privacy)
    11261126{
    11271127        aim_conn_t *conn;
     
    11891189
    11901190        snacid = aim_cachesnac(sess, 0x0002, 0x000b, 0x0000, NULL, 0);
    1191        
     1191
    11921192        aim_putsnac(&fr->data, 0x0002, 0x000b, 0x0000, snacid);
    11931193        aimbs_put8(&fr->data, strlen(sn));
     
    12011201/*
    12021202 * Subtype 0x000f
    1203  * 
     1203 *
    12041204 * XXX pass these in better
    12051205 *
     
    12441244
    12451245/*
    1246  * Subtype 0x0015 - Request the info a user using the short method.  This is 
     1246 * Subtype 0x0015 - Request the info a user using the short method.  This is
    12471247 * what iChat uses.  It normally is VERY leniently rate limited.
    12481248 *
  • libfaim/md5.h

    r5e53c4a r7869e48  
    6262
    6363#ifdef __cplusplus
    64 extern "C" 
     64extern "C"
    6565{
    6666#endif
  • libfaim/misc.c

    rcf02dd6 r7869e48  
    22 * misc.c
    33 *
    4  * Random stuff.  Basically just a few functions for sending 
     4 * Random stuff.  Basically just a few functions for sending
    55 * simple SNACs, and then the generic error handler.
    66 *
     
    88
    99#define FAIM_INTERNAL
    10 #include <aim.h> 
     10#include <aim.h>
    1111
    1212/*
     
    6161
    6262        if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+4)))
    63                 return -ENOMEM; 
     63                return -ENOMEM;
    6464
    6565        snacid = aim_cachesnac(sess, family, subtype, 0x0000, NULL, 0);
     
    8282
    8383        if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+2)))
    84                 return -ENOMEM; 
     84                return -ENOMEM;
    8585
    8686        snacid = aim_cachesnac(sess, family, subtype, 0x0000, NULL, 0);
  • libfaim/msgcookie.c

    re374dee r7869e48  
    22 * Cookie Caching stuff. Adam wrote this, apparently just some
    33 * derivatives of n's SNAC work. I cleaned it up, added comments.
    4  * 
     4 *
    55 */
    66
     
    2626 * returns -1 on error, 0 on append, 1 on update.  the cookie you pass
    2727 * in may be free'd, so don't count on its value after calling this!
    28  * 
     28 *
    2929 */
    3030faim_internal int aim_cachecookie(aim_session_t *sess, aim_msgcookie_t *cookie)
     
    3636
    3737        newcook = aim_checkcookie(sess, cookie->cookie, cookie->type);
    38        
     38
    3939        if (newcook == cookie) {
    4040                newcook->addtime = time(NULL);
     
    4343                aim_cookie_free(sess, newcook);
    4444
    45         cookie->addtime = time(NULL); 
     45        cookie->addtime = time(NULL);
    4646
    4747        cookie->next = sess->msgcookies;
     
    6969
    7070        for (prev = &sess->msgcookies; (cur = *prev); ) {
    71                 if ((cur->type == type) && 
     71                if ((cur->type == type) &&
    7272                                (memcmp(cur->cookie, cookie, 8) == 0)) {
    7373                        *prev = cur->next;
     
    9090 *
    9191 */
    92 faim_internal aim_msgcookie_t *aim_mkcookie(fu8_t *c, int type, void *data) 
     92faim_internal aim_msgcookie_t *aim_mkcookie(fu8_t *c, int type, void *data)
    9393{
    9494        aim_msgcookie_t *cookie;
     
    123123
    124124        for (cur = sess->msgcookies; cur; cur = cur->next) {
    125                 if ((cur->type == type) && 
     125                if ((cur->type == type) &&
    126126                                (memcmp(cur->cookie, cookie, 8) == 0))
    127                         return cur;   
     127                        return cur;
    128128        }
    129129
     
    132132
    133133#if 0 /* debugging feature */
    134 faim_internal int aim_dumpcookie(aim_session_t *sess, aim_msgcookie_t *cookie) 
     134faim_internal int aim_dumpcookie(aim_session_t *sess, aim_msgcookie_t *cookie)
    135135{
    136136
     
    138138                return -EINVAL;
    139139
    140         faimdprintf(sess, 0, "\tCookie at %p: %d/%s with %p, next %p\n", cookie, 
     140        faimdprintf(sess, 0, "\tCookie at %p: %d/%s with %p, next %p\n", cookie,
    141141                        cookie->type, cookie->cookie, cookie->data, cookie->next);
    142142
     
    158158 *
    159159 */
    160 faim_internal int aim_cookie_free(aim_session_t *sess, aim_msgcookie_t *cookie) 
     160faim_internal int aim_cookie_free(aim_session_t *sess, aim_msgcookie_t *cookie)
    161161{
    162162        aim_msgcookie_t *cur, **prev;
     
    176176
    177177        return 0;
    178 } 
     178}
    179179
    180180/* XXX I hate switch */
    181 faim_internal int aim_msgcookie_gettype(int reqclass) 
     181faim_internal int aim_msgcookie_gettype(int reqclass)
    182182{
    183183        /* XXX: hokey-assed. needs fixed. */
     
    190190        case AIM_CAPS_SENDFILE: return AIM_COOKIETYPE_OFTSEND;
    191191        default: return AIM_COOKIETYPE_UNKNOWN;
    192         }           
     192        }
    193193}
  • libfaim/odir.c

    rcf02dd6 r7869e48  
    22 * Family 0x000f - Newer Search Method
    33 *
    4  * Used for searching for other AIM users by email address, name, 
     4 * Used for searching for other AIM users by email address, name,
    55 * location, commmon interests, and a few other similar things.
    66 *
     
    5252 * Subtype 0x0002 - Submit a User Search Request
    5353 *
    54  * Search for an AIM screen name based on various info 
     54 * Search for an AIM screen name based on various info
    5555 * about the person.
    5656 *
  • libfaim/oscar.c

    rcf02dd6 r7869e48  
    9090        char *oldp;
    9191        char *newp;
    92        
     92
    9393        GSList *oscar_chats;
    9494        GSList *direct_ims;
     
    150150/*
    151151 * Various PRPL-specific buddy info that we want to keep track of
    152  * Some other info is maintained by locate.c, and I'd like to move 
     152 * Some other info is maintained by locate.c, and I'd like to move
    153153 * the rest of this to libfaim, mostly im.c
    154154 */
     
    301301        fu32_t encodingflag = 0;
    302302
    303         /* Determine how we can send this message.  Per the warnings elsewhere 
    304          * in this file, these little checks determine the simplest encoding 
     303        /* Determine how we can send this message.  Per the warnings elsewhere
     304         * in this file, these little checks determine the simplest encoding
    305305         * we can use for a given message send using it. */
    306306        while (utf8[i]) {
     
    401401        if (!name)
    402402                return NULL;
    403        
     403
    404404        x = strchr(name, '-');
    405405
     
    474474        if (dim->connected)
    475475                g_snprintf(buf, sizeof buf, _("Direct IM with %s closed"), sn);
    476         else 
     476        else
    477477                g_snprintf(buf, sizeof buf, _("Direct IM with %s failed"), sn);
    478478
     
    500500                return;
    501501        }
    502      
     502
    503503        od = (OscarData *)gc->proto_data;
    504504
    505505        if (!g_list_find(gaim_connections_get_all(), gc)) {
    506                 /* oh boy. this is probably bad. i guess the only thing we 
     506                /* oh boy. this is probably bad. i guess the only thing we
    507507                 * can really do is return? */
    508508                gaim_debug(GAIM_DEBUG_INFO, "oscar",
     
    665665        aim_setdebuggingcb(sess, oscar_debug);
    666666        /*
    667          * We need an immediate queue because we don't use a while-loop 
     667         * We need an immediate queue because we don't use a while-loop
    668668         * to see if things need to be sent.
    669669         */
     
    773773        od = gc->proto_data;
    774774        sess = od->sess;
    775         bosconn = od->conn;     
     775        bosconn = od->conn;
    776776        bosconn->fd = source;
    777777
     
    790790/* BBB */
    791791/*
    792  * This little area in oscar.c is the nexus of file transfer code, 
    793  * so I wrote a little explanation of what happens.  I am such a 
     792 * This little area in oscar.c is the nexus of file transfer code,
     793 * so I wrote a little explanation of what happens.  I am such a
    794794 * ninja.
    795795 *
    796796 * The series of events for a file send is:
    797797 *  -Create xfer and call gaim_xfer_request (this happens in oscar_ask_sendfile)
    798  *  -User chooses a file and oscar_xfer_init is called.  It establishs a 
    799  *   listening socket, then asks the remote user to connect to us (and 
     798 *  -User chooses a file and oscar_xfer_init is called.  It establishs a
     799 *   listening socket, then asks the remote user to connect to us (and
    800800 *   gives them the file name, port, IP, etc.)
    801  *  -They connect to us and we send them an AIM_CB_OFT_PROMPT (this happens 
     801 *  -They connect to us and we send them an AIM_CB_OFT_PROMPT (this happens
    802802 *   in oscar_sendfile_estblsh)
    803803 *  -They send us an AIM_CB_OFT_ACK and then we start sending data
    804  *  -When we finish, they send us an AIM_CB_OFT_DONE and they close the 
     804 *  -When we finish, they send us an AIM_CB_OFT_DONE and they close the
    805805 *   connection.
    806806 *  -We get drunk because file transfer kicks ass.
     
    808808 * The series of events for a file receive is:
    809809 *  -Create xfer and call gaim_xfer request (this happens in incomingim_chan2)
    810  *  -Gaim user selects file to name and location to save file to and 
     810 *  -Gaim user selects file to name and location to save file to and
    811811 *   oscar_xfer_init is called
    812812 *  -It connects to the remote user using the IP they gave us earlier
    813  *  -After connecting, they send us an AIM_CB_OFT_PROMPT.  In reply, we send 
     813 *  -After connecting, they send us an AIM_CB_OFT_PROMPT.  In reply, we send
    814814 *   them an AIM_CB_OFT_ACK.
    815815 *  -They begin to send us lots of raw data.
    816  *  -When they finish sending data we send an AIM_CB_OFT_DONE and then close 
     816 *  -When they finish sending data we send an AIM_CB_OFT_DONE and then close
    817817 *   the connectionn.
    818818 */
     
    836836
    837837                /*
    838                  * First try the port specified earlier (5190).  If that fails, 
     838                 * First try the port specified earlier (5190).  If that fails,
    839839                 * increment by 1 and try again.
    840840                 */
     
    862862                        oft_info->conn->subtype = AIM_CONN_SUBTYPE_OFT_SENDFILE;
    863863                        aim_conn_addhandler(od->sess, oft_info->conn, AIM_CB_FAM_OFT, AIM_CB_OFT_PROMPT, oscar_sendfile_prompt, 0);
    864                         oft_info->conn->fd = xfer->fd = gaim_proxy_connect(gaim_connection_get_account(gc), xfer->remote_ip, xfer->remote_port, 
     864                        oft_info->conn->fd = xfer->fd = gaim_proxy_connect(gaim_connection_get_account(gc), xfer->remote_ip, xfer->remote_port,
    865865                                                                      oscar_sendfile_connected, xfer);
    866866                        if (xfer->fd == -1) {
     
    10941094                gaim_debug(GAIM_DEBUG_MISC, "oscar", "Email is NULL\n");
    10951095        }
    1096        
     1096
    10971097        gaim_debug(GAIM_DEBUG_MISC, "oscar", "BOSIP: %s\n", info->bosip);
    10981098        gaim_debug(GAIM_DEBUG_INFO, "oscar",
     
    18931893        struct sockaddr name;
    18941894        socklen_t name_len = 1;
    1895        
     1895
    18961896        if (!g_list_find(gaim_connections_get_all(), gc)) {
    18971897                g_free(dim);
     
    19151915        }
    19161916        od->direct_ims = g_slist_append(od->direct_ims, dim);
    1917        
     1917
    19181918        dim->watcher = gaim_input_add(dim->conn->fd, GAIM_INPUT_READ, oscar_callback, dim->conn);
    19191919}
     
    19211921/* BBB */
    19221922/*
    1923  * This is called after a remote AIM user has connected to us.  We 
    1924  * want to do some voodoo with the socket file descriptors, add a 
     1923 * This is called after a remote AIM user has connected to us.  We
     1924 * want to do some voodoo with the socket file descriptors, add a
    19251925 * callback or two, and then send the AIM_CB_OFT_PROMPT.
    19261926 */
     
    19641964
    19651965/*
    1966  * This is the gaim callback passed to gaim_proxy_connect when connecting to another AIM 
     1966 * This is the gaim callback passed to gaim_proxy_connect when connecting to another AIM
    19671967 * user in order to transfer a file.
    19681968 */
     
    19931993
    19941994/*
    1995  * This is called when a buddy sends us some file info.  This happens when they 
     1995 * This is called when a buddy sends us some file info.  This happens when they
    19961996 * are sending a file to you, and you have just established a connection to them.
    1997  * You should send them the exact same info except use the real cookie.  We also 
     1997 * You should send them the exact same info except use the real cookie.  We also
    19981998 * get like totally ready to like, receive the file, kay?
    19991999 */
     
    20402040
    20412041/*
    2042  * We are sending a file to someone else.  They have just acknowledged our 
     2042 * We are sending a file to someone else.  They have just acknowledged our
    20432043 * prompt, so we want to start sending data like there's no tomorrow.
    20442044 */
     
    20722072
    20732073/*
    2074  * We just sent a file to someone.  They said they got it and everything, 
     2074 * We just sent a file to someone.  They said they got it and everything,
    20752075 * so we can close our direct connection and what not.
    20762076 */
     
    21942194        }
    21952195
    2196         if ((iconfile = gaim_account_get_buddy_icon(gaim_connection_get_account(gc))) && 
     2196        if ((iconfile = gaim_account_get_buddy_icon(gaim_connection_get_account(gc))) &&
    21972197            (args->icbmflags & AIM_IMFLAGS_BUDDYREQ) && !bi->ico_sent && bi->ico_informed) {
    21982198                FILE *file;
     
    23102310                        struct aim_oft_info *oft_info;
    23112311
    2312                         if (!args->cookie || !args->port || !args->verifiedip || 
    2313                             !args->info.sendfile.filename || !args->info.sendfile.totsize || 
     2312                        if (!args->cookie || !args->port || !args->verifiedip ||
     2313                            !args->info.sendfile.filename || !args->info.sendfile.totsize ||
    23142314                            !args->info.sendfile.totfiles || !args->reqclass) {
    23152315                                gaim_debug(GAIM_DEBUG_WARNING, "oscar",
     
    23752375                } else if (args->status == AIM_RENDEZVOUS_ACCEPT) {
    23762376                        /*
    2377                          * This gets sent by the receiver of a file 
    2378                          * as they connect directly to us.  If we don't 
    2379                          * get this, then maybe a third party connected 
     2377                         * This gets sent by the receiver of a file
     2378                         * as they connect directly to us.  If we don't
     2379                         * get this, then maybe a third party connected
    23802380                         * to us, and we shouldn't send them anything.
    23812381                         */
     
    24282428/*
    24292429 * Authorization Functions
    2430  * Most of these are callbacks from dialogs.  They're used by both 
     2430 * Most of these are callbacks from dialogs.  They're used by both
    24312431 * methods of authorization (SSI and old-school channel 4 ICBM)
    24322432 */
     
    30243024
    30253025/*
    3026  * We get this error when there was an error in the locate family.  This 
     3026 * We get this error when there was an error in the locate family.  This
    30273027 * happens when you request info of someone who is offline.
    30283028 */
     
    31463146                bit <<= 1;
    31473147        }
    3148         return buf; 
     3148        return buf;
    31493149}
    31503150
     
    34203420                g_free(to);
    34213421        }
    3422        
     3422
    34233423        if (alertitle)
    34243424                gaim_debug(GAIM_DEBUG_MISC, "oscar", "Got an alert '%s' %s\n", alertitle, alerturl ? alerturl : "");
     
    35823582        fu32_t windowsize, clear, alert, limit, disconnect, currentavg, maxavg;
    35833583
    3584         va_start(ap, fr); 
     3584        va_start(ap, fr);
    35853585        code = (fu16_t)va_arg(ap, unsigned int);
    35863586        rateclass= (fu16_t)va_arg(ap, unsigned int);
     
    39033903 *
    39043904 * It may not be my place to do this, but...
    3905  * I feel pretty strongly that the "last 2 digits" warning is ridiculously 
    3906  * stupid, and should not exist for % switches (%x in our case) that request 
    3907  * a year in the preferred representation for the current locale.  For that 
     3905 * I feel pretty strongly that the "last 2 digits" warning is ridiculously
     3906 * stupid, and should not exist for % switches (%x in our case) that request
     3907 * a year in the preferred representation for the current locale.  For that
    39083908 * reason I've chosen to not use this workaround (n., see kluge).
    39093909 *
    3910  * I have a date.  I want to show it to the user in the "preferred" way. 
    3911  * Whether that displays a 2 digit year is perfectly fine--after all, it's 
     3910 * I have a date.  I want to show it to the user in the "preferred" way.
     3911 * Whether that displays a 2 digit year is perfectly fine--after all, it's
    39123912 * what the locale wanted.
    3913  * 
    3914  * If I have a necessity for a full representation of the year in the current 
    3915  * locale, then I'll use a switch that returns a full representation of the 
     3913 *
     3914 * If I have a necessity for a full representation of the year in the current
     3915 * locale, then I'll use a switch that returns a full representation of the
    39163916 * year.
    39173917 *
    3918  * If you think the preferred locale should show 4 digits instead of 2 digits 
     3918 * If you think the preferred locale should show 4 digits instead of 2 digits
    39193919 * (because you're anal, or whatever), then change the f***ing locale.
    39203920 *
    3921  * I guess the bottom line is--I'm trying to show a date to the user how they 
     3921 * I guess the bottom line is--I'm trying to show a date to the user how they
    39223922 * prefer to see it, why the hell does gcc want me to change that?
    39233923 *
     
    39303930 * "last 2 digits" warning.
    39313931 */
    3932 static size_t my_strftime(char *s, size_t max, const char  *fmt, 
     3932static size_t my_strftime(char *s, size_t max, const char  *fmt,
    39333933                        const struct tm *tm)
    39343934{
     
    42334233
    42344234        if (email) {
    4235                 char *dialog_msg = g_strdup_printf(_("The email address for %s is %s"), 
     4235                char *dialog_msg = g_strdup_printf(_("The email address for %s is %s"),
    42364236                                                   gaim_account_get_username(gaim_connection_get_account(gc)), email);
    42374237                gaim_notify_info(gc, NULL, _("Account Info"), dialog_msg);
     
    44754475                return;
    44764476        }
    4477                
     4477
    44784478        text_html = gaim_strdup_withhtml(text);
    44794479        flags = oscar_encoding_check(text_html);
     
    45364536        if (flags & AIM_IMFLAGS_UNICODE) {
    45374537                msg = g_convert(text_html, strlen(text_html), "UCS-2BE", "UTF-8", NULL, &msglen, NULL);
    4538                 aim_locate_setprofile(od->sess, NULL, NULL, 0, "unicode-2-0", msg, 
     4538                aim_locate_setprofile(od->sess, NULL, NULL, 0, "unicode-2-0", msg,
    45394539                        (msglen > od->rights.maxawaymsglen ? od->rights.maxawaymsglen : msglen));
    45404540                g_free(msg);
     
    45424542        } else if (flags & AIM_IMFLAGS_ISO_8859_1) {
    45434543                msg = g_convert(text_html, strlen(text_html), "ISO-8859-1", "UTF-8", NULL, &msglen, NULL);
    4544                 aim_locate_setprofile(od->sess, NULL, NULL, 0, "iso-8859-1", msg, 
     4544                aim_locate_setprofile(od->sess, NULL, NULL, 0, "iso-8859-1", msg,
    45454545                        (msglen > od->rights.maxawaymsglen ? od->rights.maxawaymsglen : msglen));
    45464546                g_free(msg);
     
    45484548        } else {
    45494549                msglen = strlen(text_html);
    4550                 aim_locate_setprofile(od->sess, NULL, NULL, 0, "us-ascii", text_html, 
     4550                aim_locate_setprofile(od->sess, NULL, NULL, 0, "us-ascii", text_html,
    45514551                        (msglen > od->rights.maxawaymsglen ? od->rights.maxawaymsglen : msglen));
    45524552                gc->away = g_strndup(text_html, od->rights.maxawaymsglen);
     
    45644564                g_free(errstr);
    45654565        }
    4566        
     4566
    45674567        g_free(text_html);
    45684568        return;
     
    52505250        OscarData *od = (OscarData *)g->proto_data;
    52515251        struct chat_connection *ccon = find_oscar_chat(g, id);
    5252        
     5252
    52535253        if (!ccon)
    52545254                return;
    5255        
     5255
    52565256        aim_chat_invite(od->sess, od->conn, name, message ? message : "",
    52575257                        ccon->exchange, ccon->name, 0x0);
     
    52795279        gaim_debug(GAIM_DEBUG_INFO, "oscar",
    52805280                           "Attempting to leave room %s (currently in %d rooms)\n", b->name, count);
    5281        
     5281
    52825282        c = find_oscar_chat(g, gaim_conv_chat_get_id(GAIM_CONV_CHAT(b)));
    52835283        if (c != NULL) {
     
    53845384        if (!GAIM_BUDDY_IS_ONLINE(b)) {
    53855385                char *gname;
    5386                 if ((b->name) && (od) && (od->sess->ssi.received_data) && 
    5387                         (gname = aim_ssi_itemlist_findparentname(od->sess->ssi.local, b->name)) && 
     5386                if ((b->name) && (od) && (od->sess->ssi.received_data) &&
     5387                        (gname = aim_ssi_itemlist_findparentname(od->sess->ssi.local, b->name)) &&
    53885388                        (aim_ssi_waitingforauth(od->sess->ssi.local, gname, b->name))) {
    53895389                        emblems[i++] = "notauthorized";
     
    54085408                        emblems[i++] = "away";
    54095409        } else {
    5410                 if (b->uc & UC_UNAVAILABLE) 
     5410                if (b->uc & UC_UNAVAILABLE)
    54115411                        emblems[i++] = "away";
    54125412        }
     
    56005600                                }
    56015601                        } else if (flags == 0x81)
    5602                                 aim_ssi_seticon(od->sess, md5, length); 
     5602                                aim_ssi_seticon(od->sess, md5, length);
    56035603                } break;
    56045604
     
    56565656
    56575657/*
    5658  * This is called when each chunk of an image is received.  It can be used to 
    5659  * update a progress bar, or to eat lots of dry cat food.  Wet cat food is 
     5658 * This is called when each chunk of an image is received.  It can be used to
     5659 * update a progress bar, or to eat lots of dry cat food.  Wet cat food is
    56605660 * nasty, you sicko.
    56615661 */
     
    56935693
    56945694/*
    5695  * This is called after a direct IM has been received in its entirety.  This 
    5696  * function is passed a long chunk of data which contains the IM with any 
     5695 * This is called after a direct IM has been received in its entirety.  This
     5696 * function is passed a long chunk of data which contains the IM with any
    56975697 * data chunks (images) appended to it.
    56985698 *
    5699  * This function rips out all the data chunks and creates an imgstore for 
    5700  * each one.  In order to do this, it first goes through the IM and takes 
    5701  * out all the IMG tags.  When doing so, it rewrites the original IMG tag 
    5702  * with one compatable with the imgstore Gaim core code. For each one, we 
    5703  * then read in chunks of data from the end of the message and actually 
     5699 * This function rips out all the data chunks and creates an imgstore for
     5700 * each one.  In order to do this, it first goes through the IM and takes
     5701 * out all the IMG tags.  When doing so, it rewrites the original IMG tag
     5702 * with one compatable with the imgstore Gaim core code. For each one, we
     5703 * then read in chunks of data from the end of the message and actually
    57045704 * create the img store using the given data.
    57055705 *
     
    57135713 *     Yeah it is<BR>
    57145714 *     Here is another one:<BR>
    5715  *     <IMG SRC="Soap Bubbles.bmp" ID="2" WIDTH="256" HEIGHT="256" DATASIZE="65978">   
     5715 *     <IMG SRC="Soap Bubbles.bmp" ID="2" WIDTH="256" HEIGHT="256" DATASIZE="65978">
    57165716 *     </FONT>
    57175717 * </BODY></HTML>
     
    60276027
    60286028        switch(account->perm_deny) {
    6029         case 1: 
     6029        case 1:
    60306030                aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_DENYADD, gaim_account_get_username(account));
    60316031                break;
     
    62586258                }
    62596259        }
    6260        
     6260
    62616261        return m;
    62626262}
     
    64116411{
    64126412        gaim_request_input(gc, NULL, _("Available Message:"), NULL,
    6413                                            _("I'm doing work and hoping for a distraction--IM me!"), 
     6413                                           _("I'm doing work and hoping for a distraction--IM me!"),
    64146414                                           TRUE, FALSE,
    64156415                                           _("OK"), G_CALLBACK(oscar_setavailmsg),
  • libfaim/popups.c

    rcf02dd6 r7869e48  
    1313 *
    1414 * The message is probably HTML.
    15  * 
     15 *
    1616 */
    1717static int parsepopup(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs)
  • libfaim/rxhandlers.c

    r54666e0 r7869e48  
    112112        if (snac.flags & 0x0001) {
    113113                /*
    114                  * This means the SNAC will be followed by another SNAC with 
    115                  * related information.  We don't need to do anything about 
     114                 * This means the SNAC will be followed by another SNAC with
     115                 * related information.  We don't need to do anything about
    116116                 * this here.
    117117                 */
     
    119119        if (snac.flags & 0x8000) {
    120120                /*
    121                  * This packet contains the version of the family that this SNAC is 
    122                  * in.  You get this when your SSI module is version 2 or higher. 
    123                  * For now we have no need for this, but you could always save 
     121                 * This packet contains the version of the family that this SNAC is
     122                 * in.  You get this when your SSI module is version 2 or higher.
     123                 * For now we have no need for this, but you could always save
    124124                 * it as a part of aim_modnsac_t, or something.  The format is...
    125                  * 2 byte length of total mini-header (which is 6 bytes), then TLV 
    126                  * of  type 0x0001, length 0x0002, value is the 2 byte version 
     125                 * 2 byte length of total mini-header (which is 6 bytes), then TLV
     126                 * of  type 0x0001, length 0x0002, value is the 2 byte version
    127127                 * number
    128128                 */
     
    132132        for (cur = (aim_module_t *)sess->modlistv; cur; cur = cur->next) {
    133133
    134                 if (!(cur->flags & AIM_MODFLAG_MULTIFAMILY) && 
     134                if (!(cur->flags & AIM_MODFLAG_MULTIFAMILY) &&
    135135                                (cur->family != snac.family))
    136136                        continue;
     
    155155        for (cur = (aim_module_t *)sess->modlistv; cur; cur = cur->next) {
    156156
    157                 if (!(cur->flags & AIM_MODFLAG_MULTIFAMILY) && 
     157                if (!(cur->flags & AIM_MODFLAG_MULTIFAMILY) &&
    158158                                (cur->family != snac.family))
    159159                        continue;
     
    193193                msg = aim_tlv_getstr(tlvlist, 0x000b, 1);
    194194
    195         if ((userfunc = aim_callhandler(sess, fr->conn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_CONNERR))) 
     195        if ((userfunc = aim_callhandler(sess, fr->conn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_CONNERR)))
    196196                ret = userfunc(sess, fr, code, msg);
    197197
     
    221221        };
    222222        static const int maxchannels = 5;
    223        
     223
    224224        /* XXX: this is ugly. and big just for debugging. */
    225225        static const char *literals[14][25] = {
    226                 {"Invalid", 
     226                {"Invalid",
    227227                 NULL
    228228                },
    229                 {"General", 
     229                {"General",
    230230                 "Invalid",
    231231                 "Error",
     
    252252                 "NOP"
    253253                },
    254                 {"Location", 
     254                {"Location",
    255255                 "Invalid",
    256256                 "Error",
    257257                 "Request Rights",
    258                  "Rights Information", 
    259                  "Set user information", 
    260                  "Request User Information", 
    261                  "User Information", 
     258                 "Rights Information",
     259                 "Set user information",
     260                 "Request User Information",
     261                 "User Information",
    262262                 "Watcher Sub Request",
    263263                 "Watcher Notification"
    264264                },
    265                 {"Buddy List Management", 
    266                  "Invalid", 
    267                  "Error", 
     265                {"Buddy List Management",
     266                 "Invalid",
     267                 "Error",
    268268                 "Request Rights",
    269269                 "Rights Information",
    270                  "Add Buddy", 
    271                  "Remove Buddy", 
    272                  "Watcher List Query", 
    273                  "Watcher List Response", 
    274                  "Watcher SubRequest", 
    275                  "Watcher Notification", 
    276                  "Reject Notification", 
    277                  "Oncoming Buddy", 
     270                 "Add Buddy",
     271                 "Remove Buddy",
     272                 "Watcher List Query",
     273                 "Watcher List Response",
     274                 "Watcher SubRequest",
     275                 "Watcher Notification",
     276                 "Reject Notification",
     277                 "Oncoming Buddy",
    278278                 "Offgoing Buddy"
    279279                },
    280                 {"Messeging", 
    281                  "Invalid",
    282                  "Error", 
     280                {"Messeging",
     281                 "Invalid",
     282                 "Error",
    283283                 "Add ICBM Parameter",
    284                  "Remove ICBM Parameter", 
     284                 "Remove ICBM Parameter",
    285285                 "Request Parameter Information",
    286286                 "Parameter Information",
    287                  "Outgoing Message", 
     287                 "Outgoing Message",
    288288                 "Incoming Message",
    289289                 "Evil Request",
    290                  "Evil Reply", 
     290                 "Evil Reply",
    291291                 "Missed Calls",
    292                  "Message Error", 
     292                 "Message Error",
    293293                 "Host Ack"
    294294                },
    295                 {"Advertisements", 
    296                  "Invalid", 
    297                  "Error", 
     295                {"Advertisements",
     296                 "Invalid",
     297                 "Error",
    298298                 "Request Ad",
    299299                 "Ad Data (GIFs)"
    300300                },
    301                 {"Invitation / Client-to-Client", 
     301                {"Invitation / Client-to-Client",
    302302                 "Invalid",
    303303                 "Error",
     
    305305                 "Invitation Ack"
    306306                },
    307                 {"Administrative", 
     307                {"Administrative",
    308308                 "Invalid",
    309309                 "Error",
     
    317317                 "Account Delete Reply"
    318318                },
    319                 {"Popups", 
     319                {"Popups",
    320320                 "Invalid",
    321321                 "Error",
    322322                 "Display Popup"
    323323                },
    324                 {"BOS", 
     324                {"BOS",
    325325                 "Invalid",
    326326                 "Error",
     
    334334                 "Server Error"
    335335                },
    336                 {"User Lookup", 
     336                {"User Lookup",
    337337                 "Invalid",
    338338                 "Error",
     
    340340                 "Search Response"
    341341                },
    342                 {"Stats", 
     342                {"Stats",
    343343                 "Invalid",
    344344                 "Error",
     
    346346                 "Report Events"
    347347                },
    348                 {"Translate", 
     348                {"Translate",
    349349                 "Invalid",
    350350                 "Error",
     
    352352                 "Translate Reply",
    353353                },
    354                 {"Chat Navigation", 
     354                {"Chat Navigation",
    355355                 "Invalid",
    356356                 "Error",
     
    360360                 "Request Occupant List",
    361361                 "Search for Room",
    362                  "Outgoing Message", 
     362                 "Outgoing Message",
    363363                 "Incoming Message",
    364                  "Evil Request", 
    365                  "Evil Reply", 
     364                 "Evil Request",
     365                 "Evil Reply",
    366366                 "Chat Error",
    367367                }
     
    375375                family = aimbs_get16(&frame->data);
    376376                subtype = aimbs_get16(&frame->data);
    377                
     377
    378378                if ((family < maxf) && (subtype+1 < maxs) && (literals[family][subtype] != NULL))
    379379                        faimdprintf(sess, 0, "bleck: channel %s: null handler for %04x/%04x (%s)\n", channels[frame->hdr.flap.type], family, subtype, literals[family][subtype+1]);
     
    388388
    389389        }
    390                
     390
    391391        return 1;
    392392}
     
    471471
    472472        for (cur = (struct aim_rxcblist_s *)src->handlerlist; cur; cur = cur->next) {
    473                 aim_conn_addhandler(sess, dest, cur->family, cur->type, 
     473                aim_conn_addhandler(sess, dest, cur->family, cur->type,
    474474                                                cur->handler, cur->flags);
    475475        }
     
    554554        }
    555555
    556         /* 
     556        /*
    557557         * This doesn't have to be called here.  It could easily be done
    558558         * by a seperate thread or something. It's an administrative operation,
  • libfaim/rxqueue.c

    re374dee r7869e48  
    88
    99#define FAIM_INTERNAL
    10 #include <aim.h> 
     10#include <aim.h>
    1111
    1212#ifndef _WIN32
     
    1919faim_internal int aim_recv(int fd, void *buf, size_t count)
    2020{
    21         int left, cur; 
     21        int left, cur;
    2222
    2323        for (cur = 0, left = count; left; ) {
    2424                int ret;
    25                
     25
    2626                ret = recv(fd, ((unsigned char *)buf)+cur, left, 0);
    2727
     
    4747        if (!bs || (fd < 0) || (count < 0))
    4848                return -1;
    49        
     49
    5050        if (count > (bs->len - bs->offset))
    5151                count = bs->len - bs->offset; /* truncate to remaining space */
     
    8888        aim_bstream_t flaphdr;
    8989        fu16_t payloadlen;
    90        
     90
    9191        aim_bstream_init(&flaphdr, flaphdr_raw, sizeof(flaphdr_raw));
    9292
     
    117117                aim_conn_close(conn);
    118118                return -1;
    119         }       
     119        }
    120120
    121121        /* we're doing FLAP if we're here */
     
    156156
    157157/*
    158  * Grab a single command sequence off the socket, and enqueue it in the incoming event queue 
     158 * Grab a single command sequence off the socket, and enqueue it in the incoming event queue
    159159 * in a separate struct.
    160160 */
     
    180180
    181181        /*
    182          * Rendezvous (client to client) connections do not speak FLAP, so this 
     182         * Rendezvous (client to client) connections do not speak FLAP, so this
    183183         * function will break on them.
    184184         */
     
    239239        newrx->conn->lastactivity = time(NULL);
    240240
    241         return 0; 
     241        return 0;
    242242}
    243243
     
    245245 * Purge recieve queue of all handled commands (->handled==1).  Also
    246246 * allows for selective freeing using ->nofree so that the client can
    247  * keep the data for various purposes. 
    248  *
    249  * If ->nofree is nonzero, the frame will be delinked from the global list, 
     247 * keep the data for various purposes.
     248 *
     249 * If ->nofree is nonzero, the frame will be delinked from the global list,
    250250 * but will not be free'ed.  The client _must_ keep a pointer to the
    251251 * data -- libfaim will not!  If the client marks ->nofree but
     
    261261
    262262                        *prev = cur->next;
    263                        
     263
    264264                        if (!cur->nofree)
    265265                                aim_frame_destroy(cur);
     
    286286                if ((!currx->handled) && (currx->conn == conn))
    287287                        currx->handled = 1;
    288         }       
     288        }
    289289        return;
    290290}
  • libfaim/search.c

    rcf02dd6 r7869e48  
    5454        snacid = aim_cachesnac(sess, 0x000a, 0x0002, 0x0000, strdup(address), strlen(address)+1);
    5555        aim_putsnac(&fr->data, 0x000a, 0x0002, 0x0000, snacid);
    56        
    57         aimbs_putraw(&fr->data, address, strlen(address)); 
     56
     57        aimbs_putraw(&fr->data, address, strlen(address));
    5858
    5959        aim_tx_enqueue(sess, fr);
     
    8282
    8383        /* XXX uhm.
    84          * This is the only place that uses something other than 1 for the 3rd 
     84         * This is the only place that uses something other than 1 for the 3rd
    8585         * parameter to aim_tlv_gettlv_whatever().
    8686         */
     
    9191                free(cur);
    9292
    93                 j++; 
     93                j++;
    9494        }
    9595
  • libfaim/service.c

    rcf02dd6 r7869e48  
    2929        /*
    3030         * Send only the tool versions that the server cares about (that it
    31          * marked as supporting in the server ready SNAC). 
     31         * marked as supporting in the server ready SNAC).
    3232         */
    3333        for (sg = ins->groups; sg; sg = sg->next) {
     
    5050/*
    5151 * Subtype 0x0003 - Host Online
    52  * 
     52 *
    5353 * See comments in conn.c about how the group associations are supposed
    5454 * to work, and how they really work.
     
    5858 * We don't actually call the client here.  This starts off the connection
    5959 * initialization routine required by all AIM connections.  The next time
    60  * the client is called is the CONNINITDONE callback, which should be 
     60 * the client is called is the CONNINITDONE callback, which should be
    6161 * shortly after the rate information is acknowledged.
    62  * 
     62 *
    6363 */
    6464static int hostonline(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs)
     
    8989        aim_setversions(sess, rx->conn);
    9090
    91         return 1; 
     91        return 1;
    9292}
    9393
     
    161161 * it.  The rate classes, their limiting properties, and the definitions
    162162 * of which SNACs are belong to which class, are defined in the
    163  * Rate Response packet at login to each host. 
     163 * Rate Response packet at login to each host.
    164164 *
    165165 * Logically, all rate offenses within one class count against further
     
    194194 *
    195195 * The only other thing of note is that class 5 (chat) has slightly looser
    196  * limiting properties than class 3 (normal messages).  But thats just a 
     196 * limiting properties than class 3 (normal messages).  But thats just a
    197197 * small bit of trivia for you.
    198198 *
     
    200200 * system is how the actual numbers relate to the passing of time.  This
    201201 * seems to be a big mystery.
    202  * 
     202 *
    203203 */
    204204
     
    289289                 * depending on the version we advertised in 1/17.  If we
    290290                 * didn't send 1/17 (evil!), then this will crash and you
    291                  * die, as it will default to the old version but we have 
    292                  * the new version hardcoded here. 
     291                 * die, as it will default to the old version but we have
     292                 * the new version hardcoded here.
    293293                 */
    294294                if (mod->version >= 3)
     
    350350{
    351351        aim_conn_inside_t *ins = (aim_conn_inside_t *)conn->inside;
    352         aim_frame_t *fr;       
     352        aim_frame_t *fr;
    353353        aim_snacid_t snacid;
    354354        struct rateclass *rc;
    355355
    356356        if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 512)))
    357                 return -ENOMEM; 
     357                return -ENOMEM;
    358358
    359359        snacid = aim_cachesnac(sess, 0x0001, 0x0008, 0x0000, NULL, 0);
     
    372372{
    373373        aim_conn_inside_t *ins = (aim_conn_inside_t *)conn->inside;
    374         aim_frame_t *fr;       
     374        aim_frame_t *fr;
    375375        aim_snacid_t snacid;
    376376        struct rateclass *rc;
    377377
    378378        if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 512)))
    379                 return -ENOMEM; 
     379                return -ENOMEM;
    380380
    381381        snacid = aim_cachesnac(sess, 0x0001, 0x0009, 0x0000, NULL, 0);
     
    400400        code = aimbs_get16(bs);
    401401        rateclass = aimbs_get16(bs);
    402        
     402
    403403        windowsize = aimbs_get32(bs);
    404404        clear = aimbs_get32(bs);
     
    418418 * How Migrations work.
    419419 *
    420  * The server sends a Server Pause message, which the client should respond to 
    421  * with a Server Pause Ack, which contains the families it needs on this 
    422  * connection. The server will send a Migration Notice with an IP address, and 
    423  * then disconnect. Next the client should open the connection and send the 
     420 * The server sends a Server Pause message, which the client should respond to
     421 * with a Server Pause Ack, which contains the families it needs on this
     422 * connection. The server will send a Migration Notice with an IP address, and
     423 * then disconnect. Next the client should open the connection and send the
    424424 * cookie.  Repeat the normal login process and pretend this never happened.
    425425 *
     
    465465
    466466        /*
    467          * This list should have all the groups that the original 
    468          * Host Online / Server Ready said this host supports.  And 
     467         * This list should have all the groups that the original
     468         * Host Online / Server Ready said this host supports.  And
    469469         * we want them all back after the migration.
    470470         */
     
    521521
    522522        memset(&userinfo, 0, sizeof(aim_userinfo_t));
    523        
     523
    524524        newevil = aimbs_get16(bs);
    525525
     
    558558 *
    559559 * This is the final SNAC sent on the original connection during a migration.
    560  * It contains the IP and cookie used to connect to the new server, and 
     560 * It contains the IP and cookie used to connect to the new server, and
    561561 * optionally a list of the SNAC groups being migrated.
    562562 *
     
    576576         * moves to the new server.  When not all the groups for a connection
    577577         * are migrated, or they are all migrated but some groups are moved
    578          * to a different server than others, it is called a bifurcated 
     578         * to a different server than others, it is called a bifurcated
    579579         * migration.
    580580         *
     
    624624         *   3 System bulletin
    625625         *   4 Nothing's wrong ("top o the world" -- normal)
    626          *   5 Lets-break-something. 
     626         *   5 Lets-break-something.
    627627         *
    628628         */
    629629        id = aimbs_get16(bs);
    630630
    631         /* 
    632          * TLVs follow 
     631        /*
     632         * TLVs follow
    633633         */
    634634        tlvlist = aim_tlvlist_read(bs);
     
    646646}
    647647
    648 /* 
     648/*
    649649 * Subtype 0x0014 - Set privacy flags
    650650 *
     
    663663 * Subtype 0x0016 - No-op
    664664 *
    665  * WinAIM sends these every 4min or so to keep the connection alive.  Its not 
     665 * WinAIM sends these every 4min or so to keep the connection alive.  Its not
    666666 * really necessary.
    667667 *
    668  * Wha?  No?  Since when?  I think WinAIM sends an empty channel 3 
     668 * Wha?  No?  Since when?  I think WinAIM sends an empty channel 3
    669669 * SNAC as a no-op...
    670670 */
     
    674674}
    675675
    676 /* 
     676/*
    677677 * Subtype 0x0017 - Set client versions
    678678 *
    679  * If you've seen the clientonline/clientready SNAC you're probably 
     679 * If you've seen the clientonline/clientready SNAC you're probably
    680680 * wondering what the point of this one is.  And that point seems to be
    681681 * that the versions in the client online SNAC are sent too late for the
    682682 * server to be able to use them to change the protocol for the earlier
    683  * login packets (client versions are sent right after Host Online is 
     683 * login packets (client versions are sent right after Host Online is
    684684 * received, but client online versions aren't sent until quite a bit later).
    685685 * We can see them already making use of this by changing the format of
     
    705705        /*
    706706         * Send only the versions that the server cares about (that it
    707          * marked as supporting in the server ready SNAC). 
     707         * marked as supporting in the server ready SNAC).
    708708         */
    709709        for (sg = ins->groups; sg; sg = sg->next) {
     
    741741}
    742742
    743 /* 
     743/*
    744744 * Subtype 0x001e - Extended Status
    745745 *
    746746 * Sets your ICQ status (available, away, do not disturb, etc.)
    747747 *
    748  * These are the same TLVs seen in user info.  You can 
     748 * These are the same TLVs seen in user info.  You can
    749749 * also set 0x0008 and 0x000c.
    750750 */
     
    767767        snacid = aim_cachesnac(sess, 0x0001, 0x001e, 0x0000, NULL, 0);
    768768        aim_putsnac(&fr->data, 0x0001, 0x001e, 0x0000, snacid);
    769        
     769
    770770        aim_tlvlist_add_32(&tl, 0x0006, data);
    771771        aim_tlvlist_write(&fr->data, &tl);
    772772        aim_tlvlist_free(&tl);
    773        
     773
    774774        aim_tx_enqueue(sess, fr);
    775775
     
    777777}
    778778
    779 /* 
     779/*
    780780 * Subtype 0x001e - Extended Status.
    781781 *
    782  * Sets your "available" message.  This is currently only supported by iChat 
     782 * Sets your "available" message.  This is currently only supported by iChat
    783783 * and Gaim.
    784784 *
    785  * These are the same TLVs seen in user info.  You can 
     785 * These are the same TLVs seen in user info.  You can
    786786 * also set 0x0008 and 0x000c.
    787787 */
     
    851851 * the data that the specific client should have, the client will get the
    852852 * following message from "AOL Instant Messenger":
    853  *    "You have been disconnected from the AOL Instant Message Service (SM) 
     853 *    "You have been disconnected from the AOL Instant Message Service (SM)
    854854 *     for accessing the AOL network using unauthorized software.  You can
    855  *     download a FREE, fully featured, and authorized client, here 
     855 *     download a FREE, fully featured, and authorized client, here
    856856 *     http://www.aol.com/aim/download2.html"
    857857 * The connection is then closed, recieving disconnect code 1, URL
    858  * http://www.aim.aol.com/errors/USER_LOGGED_OFF_NEW_LOGIN.html. 
    859  *
    860  * Note, however, that numerous inconsistencies can cause the above error, 
     858 * http://www.aim.aol.com/errors/USER_LOGGED_OFF_NEW_LOGIN.html.
     859 *
     860 * Note, however, that numerous inconsistencies can cause the above error,
    861861 * not just sending back a bad hash.  Do not immediatly suspect this code
    862862 * if you get disconnected.  AOL and the open/free software community have
     
    935935        if ((flag == AIM_SENDMEMBLOCK_FLAG_ISHASH) && buf && (len == 0x10)) { /* we're getting a hash */
    936936
    937                 aimbs_putraw(&fr->data, buf, 0x10); 
     937                aimbs_putraw(&fr->data, buf, 0x10);
    938938
    939939        } else if (buf && (len > 0)) { /* use input buffer */
     
    941941                md5_byte_t digest[0x10];
    942942
    943                 md5_init(&state);       
     943                md5_init(&state);
    944944                md5_append(&state, (const md5_byte_t *)buf, len);
    945945                md5_finish(&state, digest);
     
    954954                /*
    955955                 * These MD5 routines are stupid in that you have to have
    956                  * at least one append.  So thats why this doesn't look 
     956                 * at least one append.  So thats why this doesn't look
    957957                 * real logical.
    958958                 */
     
    965965        } else {
    966966
    967                 /* 
     967                /*
    968968                 * This data is correct for AIM 3.5.1670.
    969969                 *
     
    10061006 * Subtype 0x0021 - Receive our extended status
    10071007 *
    1008  * This is used for iChat's "available" messages, and maybe ICQ extended 
    1009  * status messages?  It's also used to tell the client whether or not it 
     1008 * This is used for iChat's "available" messages, and maybe ICQ extended
     1009 * status messages?  It's also used to tell the client whether or not it
    10101010 * needs to upload an SSI buddy icon... who engineers this stuff, anyway?
    10111011 */
     
    10171017        fu8_t flags, length;
    10181018
    1019         type = aimbs_get16(bs); 
     1019        type = aimbs_get16(bs);
    10201020        flags = aimbs_get8(bs);
    10211021        length = aimbs_get8(bs);
  • libfaim/snac.c

    re374dee r7869e48  
    11/*
    22 *
    3  * Various SNAC-related dodads... 
     3 * Various SNAC-related dodads...
    44 *
    55 * outstanding_snacs is a list of aim_snac_t structs.  A SNAC should be added
    66 * whenever a new SNAC is sent and it should remain in the list until the
    7  * response for it has been receieved. 
     7 * response for it has been receieved.
    88 *
    99 * cleansnacs() should be called periodically by the client in order
     
    7474
    7575/*
    76  * Finds a snac structure with the passed SNAC ID, 
     76 * Finds a snac structure with the passed SNAC ID,
    7777 * removes it from the list/hash, and returns a pointer to it.
    7878 *
     
    8080 *
    8181 */
    82 faim_internal aim_snac_t *aim_remsnac(aim_session_t *sess, aim_snacid_t id) 
     82faim_internal aim_snac_t *aim_remsnac(aim_session_t *sess, aim_snacid_t id)
    8383{
    8484        aim_snac_t *cur, **prev;
  • libfaim/ssi.c

    r0154e2d r7869e48  
    22 * Family 0x0013 - Server-Side/Stored Information.
    33 *
    4  * Relatively new facility that allows certain types of information, such as 
    5  * a user's buddy list, permit/deny list, and permit/deny preferences, to be 
     4 * Relatively new facility that allows certain types of information, such as
     5 * a user's buddy list, permit/deny list, and permit/deny preferences, to be
    66 * stored on the server, so that they can be accessed from any client.
    77 *
    88 * We keep 2 copies of SSI data:
    99 * 1) An exact copy of what is stored on the AIM servers.
    10  * 2) A local copy that we make changes to, and then send diffs 
     10 * 2) A local copy that we make changes to, and then send diffs
    1111 *    between this and the exact copy to keep them in sync.
    1212 *
    13  * All the "aim_ssi_itemlist_bleh" functions near the top just modify the list 
     13 * All the "aim_ssi_itemlist_bleh" functions near the top just modify the list
    1414 * that is given to them (i.e. they don't send SNACs).
    1515 *
    16  * The SNAC sending and receiving functions are lower down in the file, and 
    17  * they're simpler.  They are in the order of the subtypes they deal with, 
    18  * starting with the request rights function (subtype 0x0002), then parse 
     16 * The SNAC sending and receiving functions are lower down in the file, and
     17 * they're simpler.  They are in the order of the subtypes they deal with,
     18 * starting with the request rights function (subtype 0x0002), then parse
    1919 * rights (subtype 0x0003), then--well, you get the idea.
    2020 *
     
    3131 *
    3232 * @param list A pointer to a pointer to the current list of items.
    33  * @param name A null terminated string containing the group name, or NULL 
     33 * @param name A null terminated string containing the group name, or NULL
    3434 *        if you want to modify the master group.
    3535 * @return Return a pointer to the modified item.
     
    8787 *
    8888 * @param list A pointer to a pointer to the current list of items.
    89  * @param name A null terminated string of the name of the new item, or NULL if the 
     89 * @param name A null terminated string of the name of the new item, or NULL if the
    9090 *        item should have no name.
    9191 * @param gid The group ID# you want the new item to have, or 0xFFFF if we should pick something.
     
    260260
    261261/**
    262  * Locally find an item given a group name, screen name, and type.  If group name 
     262 * Locally find an item given a group name, screen name, and type.  If group name
    263263 * and screen name are null, then just return the first item of the given type.
    264264 *
     
    362362
    363363/**
    364  * Locally find the presence flag item, and return the setting.  The returned setting is a 
    365  * bitmask of the user flags that you are visible to.  See the AIM_FLAG_* #defines 
     364 * Locally find the presence flag item, and return the setting.  The returned setting is a
     365 * bitmask of the user flags that you are visible to.  See the AIM_FLAG_* #defines
    366366 * in aim.h
    367367 *
     
    386386 * @param gn The group of the buddy.
    387387 * @param sn The name of the buddy.
    388  * @return A pointer to a NULL terminated string that is the buddy's 
     388 * @return A pointer to a NULL terminated string that is the buddy's
    389389 *         alias, or NULL if the buddy has no alias.  You should free
    390390 *         this returned value!
     
    411411 * @param gn The group of the buddy.
    412412 * @param sn The name of the buddy.
    413  * @return A pointer to a NULL terminated string that is the buddy's 
     413 * @return A pointer to a NULL terminated string that is the buddy's
    414414 *         comment, or NULL if the buddy has no comment.  You should free
    415415 *         this returned value!
     
    436436 * @param gn The group of the buddy.
    437437 * @param sn The name of the buddy.
    438  * @return A pointer to a NULL terminated string that is the buddies 
     438 * @return A pointer to a NULL terminated string that is the buddies
    439439 *         alias, or NULL if the buddy has no alias.  You should free
    440440 *         this returned value!
     
    451451
    452452/**
    453  * If there are changes, then create temporary items and 
     453 * If there are changes, then create temporary items and
    454454 * call addmoddel.
    455455 *
     
    470470
    471471        /*
    472          * Compare the 2 lists and create an aim_ssi_tmp for each difference. 
    473          * We should only send either additions, modifications, or deletions 
    474          * before waiting for an acknowledgement.  So first do deletions, then 
    475          * additions, then modifications.  Also, both the official and the local 
    476          * list should be in ascending numerical order for the group ID#s and the 
     472         * Compare the 2 lists and create an aim_ssi_tmp for each difference.
     473         * We should only send either additions, modifications, or deletions
     474         * before waiting for an acknowledgement.  So first do deletions, then
     475         * additions, then modifications.  Also, both the official and the local
     476         * list should be in ascending numerical order for the group ID#s and the
    477477         * buddy ID#s, which makes things more efficient.  I think.
    478478         */
     
    542542        }
    543543
    544         /* Make sure we don't send anything else between now 
     544        /* Make sure we don't send anything else between now
    545545         * and when we receive the ack for the following operation */
    546546        sess->ssi.waiting_for_ack = 1;
     
    885885
    886886/**
    887  * Move a buddy from one group to another group.  This basically just deletes the 
     887 * Move a buddy from one group to another group.  This basically just deletes the
    888888 * buddy and re-adds it.
    889889 *
     
    907907 * @param gn The group that the buddy is currently in.
    908908 * @param sn The screen name of the buddy.
    909  * @param alias The new alias for the buddy, or NULL if you want to remove 
     909 * @param alias The new alias for the buddy, or NULL if you want to remove
    910910 *        a buddy's comment.
    911911 * @return Return 0 if no errors, otherwise return the error number.
     
    939939 * @param gn The group that the buddy is currently in.
    940940 * @param sn The screen name of the buddy.
    941  * @param alias The new comment for the buddy, or NULL if you want to remove 
     941 * @param alias The new comment for the buddy, or NULL if you want to remove
    942942 *        a buddy's comment.
    943943 * @return Return 0 if no errors, otherwise return the error number.
     
    10031003 *        4 - Block only the users below
    10041004 *        5 - Allow only users on my buddy list
    1005  * @param vismask A bitmask of the class of users to whom you want to be 
     1005 * @param vismask A bitmask of the class of users to whom you want to be
    10061006 *        visible.  See the AIM_FLAG_BLEH #defines in aim.h
    10071007 * @return Return 0 if no errors, otherwise return the error number.
     
    10691069
    10701070/**
    1071  * Remove a reference to a server stored buddy icon.  This will make your 
     1071 * Remove a reference to a server stored buddy icon.  This will make your
    10721072 * icon stop showing up to other people.
    10731073 *
     
    11731173
    11741174/*
    1175  * Subtype 0x0004 - Request SSI Data when you don't have a timestamp and 
     1175 * Subtype 0x0004 - Request SSI Data when you don't have a timestamp and
    11761176 * revision number.
    1177  * 
     1177 *
    11781178 */
    11791179faim_export int aim_ssi_reqdata(aim_session_t *sess)
     
    11911191
    11921192/*
    1193  * Subtype 0x0005 - Request SSI Data when you have a timestamp and revision 
     1193 * Subtype 0x0005 - Request SSI Data when you have a timestamp and revision
    11941194 * number.
    11951195 *
    11961196 * The data will only be sent if it is newer than the posted local
    11971197 * timestamp and revision.
    1198  * 
     1198 *
    11991199 * Note that the client should never increment the revision, only the server.
    1200  * 
     1200 *
    12011201 */
    12021202faim_export int aim_ssi_reqifchanged(aim_session_t *sess, time_t timestamp, fu16_t numitems)
     
    12811281 * presence information for everyone in your list and put your permit/deny
    12821282 * settings into effect.
    1283  * 
     1283 *
    12841284 */
    12851285faim_export int aim_ssi_enable(aim_session_t *sess)
     
    12991299 * information.  These 3 SNACs all have an identical structure.  The only
    13001300 * difference is the subtype that is set for the SNAC.
    1301  * 
     1301 *
    13021302 */
    13031303faim_export int aim_ssi_addmoddel(aim_session_t *sess)
     
    14971497
    14981498        /*
    1499          * If outcome is 0, then add the item to the item list, or replace the other item, 
    1500          * or remove the old item.  If outcome is non-zero, then remove the item from the 
     1499         * If outcome is 0, then add the item to the item list, or replace the other item,
     1500         * or remove the old item.  If outcome is non-zero, then remove the item from the
    15011501         * local list, or unmodify it, or add it.
    15021502         */
     
    16261626 *
    16271627 * Tells the server you're going to start modifying data.
    1628  * 
     1628 *
    16291629 */
    16301630faim_export int aim_ssi_modbegin(aim_session_t *sess)
     
    18061806 * Subtype 0x001a - Send authorization reply
    18071807 *
    1808  * Sends a reply to a request for authorization.  The reply can either 
     1808 * Sends a reply to a request for authorization.  The reply can either
    18091809 * grant authorization or deny authorization.
    18101810 *
     
    18521852/*
    18531853 * Subtype 0x001b - Receive an authorization reply
    1854  * You get this bad boy when other people respond to the authorization 
     1854 * You get this bad boy when other people respond to the authorization
    18551855 * request that you have previously sent them.
    18561856 */
  • libfaim/tlv.c

    rcf02dd6 r7869e48  
    2121        if (!oldtlv || !*oldtlv)
    2222                return;
    23        
     23
    2424        free((*oldtlv)->value);
    2525        free(*oldtlv);
     
    3838 *
    3939 * XXX There should be a flag setable here to have the tlvlist contain
    40  * bstream references, so that at least the ->value portion of each 
     40 * bstream references, so that at least the ->value portion of each
    4141 * element doesn't need to be malloc/memcpy'd.  This could prove to be
    4242 * just as effecient as the in-place TLV parsing used in a couple places
     
    4848{
    4949        aim_tlvlist_t *list = NULL, *cur;
    50        
     50
    5151        while (aim_bstream_empty(bs) > 0) {
    5252                fu16_t type, length;
     
    5959                 * Okay, so now AOL has decided that any TLV of
    6060                 * type 0x0013 can only be two bytes, despite
    61                  * what the actual given length is.  So here 
     61                 * what the actual given length is.  So here
    6262                 * we dump any invalid TLVs of that sort.  Hopefully
    6363                 * theres no special cases to this special case.
     
    9292                        }
    9393                        if (cur->tlv->length > 0) {
    94                                 cur->tlv->value = aimbs_getraw(bs, length);     
     94                                cur->tlv->value = aimbs_getraw(bs, length);
    9595                                if (!cur->tlv->value) {
    9696                                        freetlv(&cur->tlv);
     
    118118 *
    119119 * XXX There should be a flag setable here to have the tlvlist contain
    120  * bstream references, so that at least the ->value portion of each 
     120 * bstream references, so that at least the ->value portion of each
    121121 * element doesn't need to be malloc/memcpy'd.  This could prove to be
    122122 * just as effecient as the in-place TLV parsing used in a couple places
     
    124124 *
    125125 * @param bs Input bstream
    126  * @param num The max number of TLVs that will be read, or -1 if unlimited. 
    127  *        There are a number of places where you want to read in a tlvchain, 
    128  *        but the chain is not at the end of the SNAC, and the chain is 
     126 * @param num The max number of TLVs that will be read, or -1 if unlimited.
     127 *        There are a number of places where you want to read in a tlvchain,
     128 *        but the chain is not at the end of the SNAC, and the chain is
    129129 *        preceeded by the number of TLVs.  So you can limit that with this.
    130130 */
     
    186186 *
    187187 * XXX There should be a flag setable here to have the tlvlist contain
    188  * bstream references, so that at least the ->value portion of each 
     188 * bstream references, so that at least the ->value portion of each
    189189 * element doesn't need to be malloc/memcpy'd.  This could prove to be
    190190 * just as effecient as the in-place TLV parsing used in a couple places
     
    193193 * @param bs Input bstream
    194194 * @param len The max length in bytes that will be read.
    195  *        There are a number of places where you want to read in a tlvchain, 
    196  *        but the chain is not at the end of the SNAC, and the chain is 
     195 *        There are a number of places where you want to read in a tlvchain,
     196 *        but the chain is not at the end of the SNAC, and the chain is
    197197 *        preceeded by the length of the TLVs.  So you can limit that with this.
    198198 */
     
    264264
    265265/*
    266  * Compare two TLV lists for equality.  This probably is not the most 
     266 * Compare two TLV lists for equality.  This probably is not the most
    267267 * efficient way to do this.
    268268 *
     
    314314        for (cur = *list; cur; ) {
    315315                aim_tlvlist_t *tmp;
    316                
     316
    317317                freetlv(&cur->tlv);
    318318
     
    351351 *
    352352 * @param list Chain to be sized
    353  * @return The number of bytes that would be needed to 
     353 * @return The number of bytes that would be needed to
    354354 *         write the passed TLV chain to a data buffer.
    355355 */
     
    528528 *
    529529 * XXX should probably support sublists for real.
    530  * 
     530 *
    531531 * This is so neat.
    532532 *
     
    558558
    559559/**
    560  * Substitute a TLV of a given type with a new TLV of the same type.  If 
    561  * you attempt to replace a TLV that does not exist, this function will 
     560 * Substitute a TLV of a given type with a new TLV of the same type.  If
     561 * you attempt to replace a TLV that does not exist, this function will
    562562 * just add a new TLV as if you called aim_tlvlist_add_raw().
    563563 *
     
    591591
    592592/**
    593  * Substitute a TLV of a given type with a new TLV of the same type.  If 
    594  * you attempt to replace a TLV that does not exist, this function will 
     593 * Substitute a TLV of a given type with a new TLV of the same type.  If
     594 * you attempt to replace a TLV that does not exist, this function will
    595595 * just add a new TLV as if you called aim_tlvlist_add_raw().
    596596 *
     
    605605
    606606/**
    607  * Substitute a TLV of a given type with a new TLV of the same type.  If 
    608  * you attempt to replace a TLV that does not exist, this function will 
     607 * Substitute a TLV of a given type with a new TLV of the same type.  If
     608 * you attempt to replace a TLV that does not exist, this function will
    609609 * just add a new TLV as if you called aim_tlvlist_add_raw().
    610610 *
     
    624624
    625625/**
    626  * Substitute a TLV of a given type with a new TLV of the same type.  If 
    627  * you attempt to replace a TLV that does not exist, this function will 
     626 * Substitute a TLV of a given type with a new TLV of the same type.  If
     627 * you attempt to replace a TLV that does not exist, this function will
    628628 * just add a new TLV as if you called aim_tlvlist_add_raw().
    629629 *
     
    643643
    644644/**
    645  * Remove a TLV of a given type.  If you attempt to remove a TLV that 
     645 * Remove a TLV of a given type.  If you attempt to remove a TLV that
    646646 * does not exist, nothing happens.
    647647 *
     
    682682 *
    683683 * Copies a TLV chain into a raw data buffer, writing only the number
    684  * of bytes specified. This operation does not free the chain; 
     684 * of bytes specified. This operation does not free the chain;
    685685 * aim_tlvlist_free() must still be called to free up the memory used
    686686 * by the chain structures.
    687687 *
    688  * XXX clean this up, make better use of bstreams 
     688 * XXX clean this up, make better use of bstreams
    689689 */
    690690faim_internal int aim_tlvlist_write(aim_bstream_t *bs, aim_tlvlist_t **list)
     
    714714 * Grab the Nth TLV of type type in the TLV list list.
    715715 *
    716  * Returns a pointer to an aim_tlv_t of the specified type; 
     716 * Returns a pointer to an aim_tlv_t of the specified type;
    717717 * %NULL on error.  The @nth parameter is specified starting at %1.
    718718 * In most cases, there will be no more than one TLV of any type
     
    747747 * @param type TLV type to search for.
    748748 * @param nth Index of TLV to return.
    749  * @return The value of the TLV you were looking for, or NULL if one could 
    750  *         not be found.  This is a dynamic buffer and must be freed by the 
     749 * @return The value of the TLV you were looking for, or NULL if one could
     750 *         not be found.  This is a dynamic buffer and must be freed by the
    751751 *         caller.
    752752 */
     
    767767
    768768/**
    769  * Retrieve the data from the nth TLV in the given TLV chain as an 8bit 
     769 * Retrieve the data from the nth TLV in the given TLV chain as an 8bit
    770770 * integer.
    771771 *
     
    773773 * @param type TLV type to search for.
    774774 * @param nth Index of TLV to return.
    775  * @return The value the TLV you were looking for, or 0 if one could 
     775 * @return The value the TLV you were looking for, or 0 if one could
    776776 *         not be found.
    777777 */
     
    786786
    787787/**
    788  * Retrieve the data from the nth TLV in the given TLV chain as a 16bit 
     788 * Retrieve the data from the nth TLV in the given TLV chain as a 16bit
    789789 * integer.
    790790 *
     
    792792 * @param type TLV type to search for.
    793793 * @param nth Index of TLV to return.
    794  * @return The value the TLV you were looking for, or 0 if one could 
     794 * @return The value the TLV you were looking for, or 0 if one could
    795795 *         not be found.
    796796 */
     
    805805
    806806/**
    807  * Retrieve the data from the nth TLV in the given TLV chain as a 32bit 
     807 * Retrieve the data from the nth TLV in the given TLV chain as a 32bit
    808808 * integer.
    809809 *
     
    811811 * @param type TLV type to search for.
    812812 * @param nth Index of TLV to return.
    813  * @return The value the TLV you were looking for, or 0 if one could 
     813 * @return The value the TLV you were looking for, or 0 if one could
    814814 *         not be found.
    815815 */
  • libfaim/translate.c

    r862371b r7869e48  
    77 *
    88 * But we advertise it anyway, because its fun.
    9  * 
     9 *
    1010 */
    1111
  • libfaim/txqueue.c

    rcf02dd6 r7869e48  
    5353        memset(fr, 0, sizeof(aim_frame_t));
    5454
    55         fr->conn = conn; 
     55        fr->conn = conn;
    5656
    5757        fr->hdrtype = framing;
     
    6565                fr->hdr.rend.type = chan;
    6666
    67         } else 
     67        } else
    6868                faimdprintf(sess, 0, "tx_new: unknown framing\n");
    6969
     
    133133 * Basically the same as its __queuebased couterpart, however
    134134 * instead of doing a list append, it just calls aim_tx_sendframe()
    135  * right here. 
    136  * 
     135 * right here.
     136 *
    137137 */
    138138static int aim_tx_enqueue__immediate(aim_session_t *sess, aim_frame_t *fr)
     
    159159faim_export int aim_tx_setenqueue(aim_session_t *sess, int what, int (*func)(aim_session_t *, aim_frame_t *))
    160160{
    161        
     161
    162162        if (what == AIM_TX_QUEUED)
    163163                sess->tx_enqueue = &aim_tx_enqueue__queuebased;
    164         else if (what == AIM_TX_IMMEDIATE) 
     164        else if (what == AIM_TX_IMMEDIATE)
    165165                sess->tx_enqueue = &aim_tx_enqueue__immediate;
    166166        else if (what == AIM_TX_USER) {
     
    176176faim_internal int aim_tx_enqueue(aim_session_t *sess, aim_frame_t *fr)
    177177{
    178        
     178
    179179        /*
    180180         * If we want to send a connection thats inprogress, we have to force
     
    182182         * want.
    183183         */
    184         if (fr && fr->conn && 
     184        if (fr && fr->conn &&
    185185                        (fr->conn->status & AIM_CONN_STATUS_INPROGRESS)) {
    186186                return aim_tx_enqueue__queuebased(sess, fr);
     
    190190}
    191191
    192 /* 
     192/*
    193193 *  aim_get_next_txseqnum()
    194194 *
     
    202202{
    203203        flap_seqnum_t ret;
    204        
     204
    205205        ret = ++conn->seqnum;
    206206
     
    238238
    239239        if (count) {
    240                 if ((conn->type == AIM_CONN_TYPE_RENDEZVOUS) && 
     240                if ((conn->type == AIM_CONN_TYPE_RENDEZVOUS) &&
    241241                    (conn->subtype == AIM_CONN_SUBTYPE_OFT_DIRECTIM)) {
    242242                        /* I strongly suspect that this is a horrible thing to do
     
    246246                        while (count - wrote > 1024) {
    247247                                wrote = wrote + aim_send(conn->fd, bs->data + bs->offset + wrote, 1024);
    248                                 if ((userfunc=aim_callhandler(conn->sessv, conn, 
    249                                                                 AIM_CB_FAM_SPECIAL, 
     248                                if ((userfunc=aim_callhandler(conn->sessv, conn,
     249                                                                AIM_CB_FAM_SPECIAL,
    250250                                                                AIM_CB_SPECIAL_IMAGETRANSFER)))
    251                                   userfunc(conn->sessv, NULL, sn, 
     251                                  userfunc(conn->sessv, NULL, sn,
    252252                                           count-wrote>1024 ? ((double)wrote / count) : 1);
    253253                        }
     
    265265                faimdprintf(sess, 2, "\nOutgoing data: (%d bytes)", wrote);
    266266                for (i = 0; i < wrote; i++) {
    267                         if (!(i % 8)) 
     267                        if (!(i % 8))
    268268                                faimdprintf(sess, 2, "\n\t");
    269269                        faimdprintf(sess, 2, "0x%02x ", *(bs->data + bs->offset + i));
     
    304304        if (aim_bstream_send(&obs, fr->conn, obslen) != obslen)
    305305                err = -errno;
    306        
     306
    307307        free(obs_raw); /* XXX aim_bstream_free */
    308308
     
    372372                 */
    373373                if ((cur->conn->lastactivity + cur->conn->forcedlatency) >= time(NULL)) {
    374                         /* 
    375                          * XXX should be a break! we dont want to block the 
     374                        /*
     375                         * XXX should be a break! we dont want to block the
    376376                         * upper layers
    377377                         *
     
    394394/*
    395395 *  aim_tx_purgequeue()
    396  * 
    397  *  This is responsable for removing sent commands from the transmit 
     396 *
     397 *  This is responsable for removing sent commands from the transmit
    398398 *  queue. This is not a required operation, but it of course helps
    399  *  reduce memory footprint at run time! 
     399 *  reduce memory footprint at run time!
    400400 *
    401401 */
  • libfaim/util.c

    re374dee r7869e48  
    160160/*
    161161* int snlen(const char *)
    162 * 
     162*
    163163* This takes a screen name and returns its length without
    164 * spaces.  If there are no spaces in the SN, then the 
     164* spaces.  If there are no spaces in the SN, then the
    165165* return is equal to that of strlen().
    166166*
     
    188188* on screen names for AIM/AOL.  Mainly, this means case and space
    189189* insensitivity (all case differences and spacing differences are
    190 * ignored, with the exception that screen names can not start with 
     190* ignored, with the exception that screen names can not start with
    191191* a space).
    192192*
  • logging.c

    r0792d99 r7869e48  
    5555  /* skip login/logout messages if appropriate */
    5656  if (!owl_global_is_loglogins(&g) && owl_message_is_loginout(m)) return(0);
    57      
     57
    5858  /* check direction */
    5959  if ((owl_global_get_loggingdirection(&g)==OWL_LOGGING_DIRECTION_IN) && owl_message_is_direction_out(m)) {
     
    8383    buffer = g_string_new("");
    8484    tmp = short_zuser(owl_message_get_sender(m));
    85     g_string_append_printf(buffer, "Class: %s Instance: %s", 
    86                            owl_message_get_class(m), 
     85    g_string_append_printf(buffer, "Class: %s Instance: %s",
     86                           owl_message_get_class(m),
    8787                           owl_message_get_instance(m));
    8888    if (strcmp(owl_message_get_opcode(m), "")) {
    89       g_string_append_printf(buffer, " Opcode: %s", 
     89      g_string_append_printf(buffer, " Opcode: %s",
    9090                             owl_message_get_opcode(m));
    9191    }
    9292    g_string_append_printf(buffer, "\n");
    93     g_string_append_printf(buffer, "Time: %s Host: %s\n", 
    94                            owl_message_get_timestr(m), 
     93    g_string_append_printf(buffer, "Time: %s Host: %s\n",
     94                           owl_message_get_timestr(m),
    9595                           owl_message_get_hostname(m));
    96     g_string_append_printf(buffer, "From: %s <%s>\n\n", 
     96    g_string_append_printf(buffer, "From: %s <%s>\n\n",
    9797                           owl_message_get_zsig(m), tmp);
    9898    g_string_append_printf(buffer, "%s\n\n", owl_message_get_body(m));
     
    105105    GString *buffer = NULL;
    106106    buffer = g_string_new("");
    107     g_string_append_printf(buffer, "From: <%s> To: <%s>\n", 
     107    g_string_append_printf(buffer, "From: <%s> To: <%s>\n",
    108108                           owl_message_get_sender(m), owl_message_get_recipient(m));
    109     g_string_append_printf(buffer, "Time: %s\n\n", 
     109    g_string_append_printf(buffer, "Time: %s\n\n",
    110110                           owl_message_get_timestr(m));
    111111    if (owl_message_is_login(m)) {
     
    124124    buffer = g_string_new("");
    125125    g_string_append_printf(buffer, "From: <%s> To: <%s>\n",
    126                            owl_message_get_sender(m), 
     126                           owl_message_get_sender(m),
    127127                           owl_message_get_recipient(m));
    128     g_string_append_printf(buffer, "Time: %s\n\n", 
     128    g_string_append_printf(buffer, "Time: %s\n\n",
    129129                           owl_message_get_timestr(m));
    130130    g_string_append_printf(buffer, "%s\n\n", owl_message_get_body(m));
     
    136136    GString *buffer;
    137137    buffer = g_string_new("");
    138     g_string_append_printf(buffer, "From: <%s> To: <%s>\n", 
    139                            owl_message_get_sender(m), 
     138    g_string_append_printf(buffer, "From: <%s> To: <%s>\n",
     139                           owl_message_get_sender(m),
    140140                           owl_message_get_recipient(m));
    141     g_string_append_printf(buffer, "Time: %s\n\n", 
     141    g_string_append_printf(buffer, "Time: %s\n\n",
    142142                           owl_message_get_timestr(m));
    143     g_string_append_printf(buffer, "%s\n\n", 
     143    g_string_append_printf(buffer, "%s\n\n",
    144144                           owl_message_get_body(m));
    145145    return g_string_free(buffer, FALSE);
     
    183183void owl_log_enqueue_message(const char *buffer, const char *filename)
    184184{
    185   owl_log_entry *log_msg = NULL; 
     185  owl_log_entry *log_msg = NULL;
    186186  log_msg = g_new(owl_log_entry,1);
    187187  log_msg->message = g_strdup(buffer);
    188188  log_msg->filename = g_strdup(filename);
    189   owl_select_post_task(owl_log_write_entry, log_msg, 
     189  owl_select_post_task(owl_log_write_entry, log_msg,
    190190                       owl_log_entry_free, log_context);
    191191}
     
    353353  } else if (owl_message_is_type_jabber(m)) {
    354354    if (personal) {
    355       from=frombuff=g_strdup_printf("jabber:%s", 
     355      from=frombuff=g_strdup_printf("jabber:%s",
    356356                                    owl_message_get_sender(m));
    357357    } else {
    358       from=frombuff=g_strdup_printf("jabber:%s", 
     358      from=frombuff=g_strdup_printf("jabber:%s",
    359359                                    owl_message_get_recipient(m));
    360360    }
     
    362362    from=frombuff=g_strdup("unknown");
    363363  }
    364  
     364
    365365  /* check for malicious sender formats */
    366366  len=strlen(frombuff);
     
    434434}
    435435
    436 void owl_log_init(void) 
     436void owl_log_init(void)
    437437{
    438438  log_context = g_main_context_new();
     
    454454  }
    455455#endif
    456  
     456
    457457}
    458458
  • m4/pkg.m4

    r650fb2c r7869e48  
    11# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
    22# serial 1 (pkg-config-0.24)
    3 # 
     3#
    44# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
    55#
     
    124124        if test $_pkg_short_errors_supported = yes; then
    125125                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
    126         else 
     126        else
    127127                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
    128128        fi
  • mainwin.c

    rab88b05 r7869e48  
    142142      if (m==owl_view_get_element(v, curmsg)) {
    143143        wmove(recwin, savey, 0);
    144         wattron(recwin, A_BOLD);       
     144        wattron(recwin, A_BOLD);
    145145        if (owl_global_get_curmsg_vert_offset(&g)>0) {
    146146          waddstr(recwin, "+");
  • message.c

    r2354e9a r7869e48  
    4040  owl_message_set_hostname(m, "");
    4141  m->attributes = g_ptr_array_new();
    42  
     42
    4343  /* save the time */
    4444  m->time = time(NULL);
     
    250250{
    251251  const char *realm;
    252  
     252
    253253  realm=owl_message_get_attribute_value(m, "realm");
    254254  if (!realm) return("");
     
    382382  return !strcasecmp(t, type);
    383383}
    384                                                
     384
    385385int owl_message_is_type_admin(const owl_message *m)
    386386{
     
    528528  owl_fmtext_init_null(&a);
    529529  owl_fmtext_init_null(&b);
    530  
     530
    531531  owl_fmtext_truncate_lines(&(m->fmtext->fmtext), aline, bline-aline, &a);
    532532  owl_fmtext_truncate_cols(&a, acol, bcol, &b);
     
    684684
    685685  owl_message_format(m); /* is this necessary? */
    686  
     686
    687687  return owl_fmtext_search(&(m->fmtext->fmtext), re, 0) >= 0;
    688688}
     
    785785
    786786  owl_message_init(m);
    787  
     787
    788788  owl_message_set_type_zephyr(m);
    789789  owl_message_set_direction_in(m);
    790  
     790
    791791  /* first save the full notice */
    792792  m->notice = *n;
     
    795795  /* a little gross, we'll replace \r's with ' ' for now */
    796796  owl_zephyr_hackaway_cr(&(m->notice));
    797  
     797
    798798  /* save the time, we need to nuke the string saved by message_init */
    799799  if (m->timestr) g_free(m->timestr);
     
    835835  }
    836836
    837  
     837
    838838  /* set the "isprivate" attribute if it's a private zephyr. */
    839839  if (owl_zwrite_recip_is_personal(n->z_recipient)) {
     
    922922  memset(&(m->notice), 0, sizeof(ZNotice_t));
    923923#endif
    924  
     924
    925925  longuser=long_zuser(user);
    926  
     926
    927927  owl_message_init(m);
    928  
     928
    929929  owl_message_set_type_zephyr(m);
    930930  owl_message_set_direction_in(m);
     
    959959{
    960960  char *replyline;
    961  
     961
    962962  owl_message_init(m);
    963963
     
    992992  owl_message_set_body(m, body);
    993993  owl_message_set_zsig(m, owl_zwrite_get_zsig(z));
    994  
     994
    995995  /* save the hostname */
    996996  owl_message_set_hostname(m, g_get_host_name());
     
    10081008  int i;
    10091009  owl_pair *p;
    1010 #ifdef HAVE_LIBZEPHYR   
     1010#ifdef HAVE_LIBZEPHYR
    10111011  if (m->has_notice) {
    10121012    ZFreeNotice(&(m->notice));
     
    10231023
    10241024  g_ptr_array_free(m->attributes, true);
    1025  
     1025
    10261026  owl_message_invalidate_format(m);
    10271027}
  • msgwin.c

    rd4927a7 r7869e48  
    1919  werase(curswin);
    2020  if (msgwin->msg)
    21     waddstr(curswin, msgwin->msg); 
     21    waddstr(curswin, msgwin->msg);
    2222}
    2323
  • owl.c

    r4d9e311c r7869e48  
    311311      char utf8buf[7];
    312312      memset(utf8buf, '\0', 7);
    313      
     313
    314314      utf8buf[0] = j.ch;
    315      
     315
    316316      if ((j.ch & 0xc0) && (~j.ch & 0x20)) bytes = 2;
    317317      else if ((j.ch & 0xe0) && (~j.ch & 0x10)) bytes = 3;
     
    320320      else if ((j.ch & 0xfc) && (~j.ch & 0x02)) bytes = 6;
    321321      else bytes = 1;
    322      
     322
    323323      for (i = 1; i < bytes; i++) {
    324324        int tmp = wgetch(g->input_pad);
     
    333333        utf8buf[i] = tmp;
    334334      }
    335      
     335
    336336      if (j.ch != ERR) {
    337337        if (g_utf8_validate(utf8buf, -1, NULL)) {
     
    376376  /* Send a message to the main thread. */
    377377  owl_select_post_task(sig_handler_main_thread,
    378                        GINT_TO_POINTER(siginfo->si_signo), 
     378                       GINT_TO_POINTER(siginfo->si_signo),
    379379                       NULL, g_main_context_default());
    380380}
     
    421421#if OWL_STDERR_REDIR
    422422
    423 /* Replaces stderr with a pipe so that we can read from it. 
     423/* Replaces stderr with a pipe so that we can read from it.
    424424 * Returns the fd of the pipe from which stderr can be read. */
    425425int stderr_replace(void)
  • owl.h

    rc42a8d1 r7869e48  
    7474#endif /* !OWL_VERSION_STRING */
    7575
    76 /* Feature that is being tested to redirect stderr through a pipe. 
     76/* Feature that is being tested to redirect stderr through a pipe.
    7777 * There may still be some portability problems with this. */
    7878#define OWL_STDERR_REDIR 1
     
    243243  int  (*validate_fn)(const struct _owl_variable *v, const void *newval);
    244244                                /* returns 1 if newval is valid */
    245   int  (*set_fn)(struct _owl_variable *v, const void *newval); 
     245  int  (*set_fn)(struct _owl_variable *v, const void *newval);
    246246                                /* sets the variable to a value
    247247                                 * of the appropriate type.
    248                                  * unless documented, this 
    249                                  * should make a copy. 
     248                                 * unless documented, this
     249                                 * should make a copy.
    250250                                 * returns 0 on success. */
    251251  int  (*set_fromstring_fn)(struct _owl_variable *v, const char *newval);
    252252                                /* sets the variable to a value
    253253                                 * of the appropriate type.
    254                                  * unless documented, this 
    255                                  * should make a copy. 
     254                                 * unless documented, this
     255                                 * should make a copy.
    256256                                 * returns 0 on success. */
    257257  const void *(*get_fn)(const struct _owl_variable *v);
     
    313313
    314314  char *cmd_aliased_to;         /* what this command is aliased to... */
    315  
     315
    316316  /* These don't take any context */
    317317  CALLER_OWN char *(*cmd_args_fn)(int argc, const char *const *argv, const char *buff);
     
    406406  owl_window *cmdwin;
    407407} owl_viewwin;
    408  
     408
    409409typedef struct _owl_popwin {
    410410  owl_window *border;
     
    413413  gulong sig_resize_id;
    414414} owl_popwin;
    415  
     415
    416416typedef struct _owl_msgwin {
    417417  char *msg;
  • perl/lib/BarnOwl.pm

    rb303ba2 r7869e48  
    661661=head3 random_zephyr_signature
    662662
    663 Retrieve a random line from ~/.zsigs (except those beginning with '#') 
     663Retrieve a random line from ~/.zsigs (except those beginning with '#')
    664664and use it as the zephyr signature.
    665665
  • perl/lib/BarnOwl/Complete/Filter.pm

    r6dba228 r7869e48  
    8181        return $INCOMPLETE if $i == $INCOMPLETE;
    8282    }
    83    
     83
    8484    return $i; # Well, it looks like we're happy
    8585    # (Actually, I'm pretty sure this never happens...)
  • perl/lib/BarnOwl/Completion/Util.pm

    re6cec01 r7869e48  
    108108
    109109    my ($pfx, $base) = splitfile($string);
    110    
     110
    111111    opendir(my $dh, $dir) or return;
    112112    my @dirs = readdir($dh);
     
    119119            next;
    120120        }
    121        
     121
    122122        my ($text, $value, $done) = ($d, "${pfx}${d}", 1);
    123123
  • perl/lib/BarnOwl/Hooks.pm

    rb8a3e00 r7869e48  
    1212
    1313C<BarnOwl::Hooks> exports a set of C<BarnOwl::Hook> objects made
    14 available by BarnOwl internally. 
     14available by BarnOwl internally.
    1515
    1616=head2 USAGE
     
    135135        package BarnOwl;
    136136        if(*BarnOwl::format_msg{CODE}) {
    137             # if the config defines a legacy formatting function, add 'perl' as a style 
     137            # if the config defines a legacy formatting function, add 'perl' as a style
    138138            BarnOwl::create_style("perl", BarnOwl::Style::Legacy->new(
    139139                "BarnOwl::format_msg",
     
    163163        BarnOwl::error("Can't load BarnOwl::ModuleLoader, loadable module support disabled:\n$@");
    164164    }
    165    
     165
    166166    $mainLoop->check_owlconf();
    167167    $startup->run(0);
     
    171171sub _shutdown {
    172172    $shutdown->run;
    173    
     173
    174174    BarnOwl::shutdown() if *BarnOwl::shutdown{CODE};
    175175}
     
    179179
    180180    $receiveMessage->run($m);
    181    
     181
    182182    BarnOwl::receive_msg($m) if *BarnOwl::receive_msg{CODE};
    183183}
     
    187187
    188188    $newMessage->run($m);
    189    
     189
    190190    BarnOwl::new_msg($m) if *BarnOwl::new_msg{CODE};
    191191}
  • perl/lib/BarnOwl/Message/Zephyr.pm

    r6401db3 r7869e48  
    165165    } elsif($sender && !$self->is_private) {
    166166        # Possible future feature: (Optionally?) include the class and/or
    167         # instance of the message being replied to in the instance of the 
     167        # instance of the message being replied to in the instance of the
    168168        # outgoing personal reply
    169169        $class = 'MESSAGE';
  • perl/modules/Facebook/lib/Facebook/Graph.pm

    r5ef98c7 r7869e48  
    8787}
    8888
    89 sub authorize { 
     89sub authorize {
    9090    my ($self) = @_;
    9191    return Facebook::Graph::Authorize->new(
     
    302302 my $sarah_bownds = $fb->fetch('sarahbownds');
    303303 my $perl_page = $fb->fetch('16665510298');
    304  
     304
    305305Or better yet:
    306306
     
    311311    ->request
    312312    ->as_hashref;
    313    
     313
    314314 my $sarahs_picture_uri = $fb->picture('sarahbownds')->get_large->uri_as_string;
    315315
     
    319319    ->request('https://graph.facebook.com/btaylor')
    320320    ->as_hashref;
    321  
    322  
     321
     322
    323323=head2 Building A Privileged App
    324324
     
    342342 my $q = Plack::Request->new($env);
    343343 $fb->request_access_token($q->query_param('code'));
    344  
     344
    345345Or if you already had the access token:
    346346
    347347 $fb->access_token($token);
    348  
     348
    349349Get some info:
    350350
     
    419419
    420420 my $sarah = $fb->fetch('sarahbownds');
    421  
     421
    422422 my $sarah = $fb->query->find('sarahbownds')->request->as_hashref;
    423423
  • perl/modules/Facebook/lib/Facebook/Graph/Cookbook/Recipe1.pod

    r2a42248 r7869e48  
    6464
    6565 my $urlmap = Plack::App::URLMap->new;
    66  
     66
    6767 # your code will go here
    6868
    6969 $urlmap->to_app;
    7070
    71 All the code we have you add should go in the C<# your code will go here> block, in the order that we have you add it. 
    72  
     71All the code we have you add should go in the C<# your code will go here> block, in the order that we have you add it.
     72
    7373=head2 Step 6: Create your Facebook::Graph object.
    7474
     
    8080    secret      => 'Put Your Application Secret Here',
    8181 );
    82  
     82
    8383Now you need the URL you entered in step 3, and the application ID and secret you got in step 4.
    8484
     
    186186
    187187 sudo plackup --port 80 app.psgi
    188  
     188
    189189Now we point our browser to:
    190190
    191191 http://www.yourapplication.com/facebook
    192  
     192
    193193Voila! You have created an authenticated Facebook app. If you would like to see this full program check out C<eg/recipe1.psgi> inside this distribution of L<Facebook::Graph>.
    194194
     
    196196=head1 CAVEATS
    197197
    198 You should never design an application using all the poor stuff we've done here, like using a shared L<Facebook::Graph> object, not using a Framework/CMS or at least L<Plack::Builder>, not using a templating system, passing the offline access token through the URL, etc. We've made comments about these things as we did them to warn you. These choices were made here B<only> because this is example code who's primary purpose is to show you how to use L<Facebook::Graph>, and not best practices for web development. 
     198You should never design an application using all the poor stuff we've done here, like using a shared L<Facebook::Graph> object, not using a Framework/CMS or at least L<Plack::Builder>, not using a templating system, passing the offline access token through the URL, etc. We've made comments about these things as we did them to warn you. These choices were made here B<only> because this is example code who's primary purpose is to show you how to use L<Facebook::Graph>, and not best practices for web development.
    199199
    200200=head1 SEE ALSO
  • perl/modules/Facebook/lib/Facebook/Graph/Cookbook/Recipe2.pod

    r2a42248 r7869e48  
    1515You'll need to have all of the following modules installed in order to run this app (in addition to L<Facebook::Graph>):
    1616
    17 L<DateTime::Format::ICal> L<Dancer> L<Template> L<Data::ICal> L<XML::FeedPP> 
     17L<DateTime::Format::ICal> L<Dancer> L<Template> L<Data::ICal> L<XML::FeedPP>
    1818
    1919=head2 Assumptions
     
    6565 mkdir -p /opt/webapp
    6666 cp -Rfp Facebook-Graph/eg/recipe2/* /opt/webapp
    67  
     67
    6868=head2 Step 6: Configure your app.
    6969
     
    7373 vi config.yml
    7474
    75 Specifically we need to set the C<app_id> and C<secret> fields with information from our Facebook application settings page. And we need to update the C<postback> with the domain pointing to our server. 
     75Specifically we need to set the C<app_id> and C<secret> fields with information from our Facebook application settings page. And we need to update the C<postback> with the domain pointing to our server.
    7676
    7777=head2 Step 7: Start it.
  • perl/modules/Facebook/lib/Facebook/Graph/Picture.pm

    r2a42248 r7869e48  
    6363
    6464 my $fb = Facebook::Graph->new;
    65  
     65
    6666 my $default_picture =  $fb->picture('16665510298')->uri_as_string;
    6767 my $large_picture = $fb->picture('16665510298')->get_large->uri_as_string;
  • perl/modules/Facebook/lib/Facebook/Graph/Publish.pm

    rfe03126 r7869e48  
    7777=head1 DESCRIPTION
    7878
    79 This module shouldn't be used by you directly for any purpose. 
     79This module shouldn't be used by you directly for any purpose.
    8080
    8181=head1 LEGAL
  • perl/modules/Facebook/lib/Facebook/Graph/Publish/Event.pm

    r2a42248 r7869e48  
    183183
    184184 {"id":"1647395831_130068550371568"}
    185  
    186  
     185
     186
    187187=head1 TODO
    188188
  • perl/modules/Facebook/lib/Facebook/Graph/Publish/Post.pm

    r2a42248 r7869e48  
    381381=head2 set_privacy ( setting, options )
    382382
    383 A completely optional privacy setting. 
     383A completely optional privacy setting.
    384384
    385385=head2 set_properties ( properties )
     
    425425
    426426 $post->set_target_countries( ['US'] );
    427  
     427
    428428=head3 countries
    429429
     
    436436
    437437 $post->set_target_regions( [6,53] );
    438  
     438
    439439=head3 regions
    440440
     
    448448
    449449 $post->set_target_cities( [2547804] );
    450  
     450
    451451=head3 cities
    452452
     
    460460
    461461 $post->set_target_locales( [6] );
    462  
     462
    463463=head3 locales
    464464
  • perl/modules/Facebook/lib/Facebook/Graph/Query.pm

    rb7fa912 r7869e48  
    7979    my ($self, $limit) = @_;
    8080    $self->limit($limit);
    81     return $self;   
     81    return $self;
    8282}
    8383
     
    109109    my ($self, $offset) = @_;
    110110    $self->offset($offset);
    111     return $self;   
     111    return $self;
    112112}
    113113
     
    215215
    216216 my $fb = Facebook::Graph->new;
    217  
     217
    218218 my $perl_page = $fb->find('16665510298')
    219219    ->include_metadata
    220220    ->request
    221221    ->as_hashref;
    222  
     222
    223223 my $sarah_bownds = $fb->find('sarahbownds')
    224224    ->select_fields(qw(id name))
     
    254254    ->request
    255255    ->as_hashref;
    256    
     256
    257257The above query, if you were read it like text, says: "Give me the user ids and full names of all users named Dave that have been created since yesterday, and limit the result set to the first 25."
    258258
     
    314314=head2 search ( query, context )
    315315
    316 Perform a keyword search on a group of items. 
     316Perform a keyword search on a group of items.
    317317
    318318If you prefer not to search by keyword see the C<from> method.
  • perl/modules/Facebook/lib/Facebook/Graph/Role/Uri.pm

    r2a42248 r7869e48  
    2424=head1 DESCRIPTION
    2525
    26 Provides a C<uri> method in any class which returns a L<URI> object that points to the Facebook Graph API. 
     26Provides a C<uri> method in any class which returns a L<URI> object that points to the Facebook Graph API.
    2727
    2828=head1 LEGAL
  • perl/modules/IRC/inc/Module/Install/Fetch.pm

    r43c62e4 r7869e48  
    1414sub get_file {
    1515    my ($self, %args) = @_;
    16     my ($scheme, $host, $path, $file) = 
     16    my ($scheme, $host, $path, $file) =
    1717        $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
    1818
     
    2020        $args{url} = $args{ftp_url}
    2121            or (warn("LWP support unavailable!\n"), return);
    22         ($scheme, $host, $path, $file) = 
     22        ($scheme, $host, $path, $file) =
    2323            $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
    2424    }
  • perl/modules/IRC/inc/Module/Install/Makefile.pm

    r43c62e4 r7869e48  
    6565        my $clean = $self->makemaker_args->{clean} ||= {};
    6666        %$clean = (
    67                 %$clean, 
     67                %$clean,
    6868                FILES => join(' ', grep length, $clean->{FILES}, @_),
    6969        );
     
    7474        my $realclean = $self->makemaker_args->{realclean} ||= {};
    7575        %$realclean = (
    76                 %$realclean, 
     76                %$realclean,
    7777                FILES => join(' ', grep length, $realclean->{FILES}, @_),
    7878        );
     
    181181        my $top_version   = $self->_top->VERSION || '';
    182182
    183         my $preamble = $self->preamble 
     183        my $preamble = $self->preamble
    184184                ? "# Preamble by $top_class $top_version\n"
    185185                        . $self->preamble
  • perl/modules/IRC/inc/Module/Install/Metadata.pm

    r43c62e4 r7869e48  
    282282        $author =~ s{E<lt>}{<}g;
    283283        $author =~ s{E<gt>}{>}g;
    284         $self->author($author); 
     284        $self->author($author);
    285285    }
    286286    else {
  • perl/modules/IRC/inc/Module/Install/Win32.pm

    r43c62e4 r7869e48  
    1717        $self->load('can_run');
    1818        $self->load('get_file');
    19        
     19
    2020        require Config;
    2121        return unless (
  • perl/modules/IRC/lib/BarnOwl/Module/IRC/Connection.pm

    r13ee8f2 r7869e48  
    412412        $self->{reconnect_timer}->stop;
    413413    }
    414     $self->{reconnect_timer} = 
     414    $self->{reconnect_timer} =
    415415        BarnOwl::Timer->new( {
    416416            name  => 'IRC (' . $self->alias . ') reconnect_timer',
     
    472472    $body =~ s/\cC\d+(?:,\d+)?//g;
    473473    $body =~ s/\cO//g;
    474    
     474
    475475    my @pieces = split /\cB/, $body;
    476476    my $out = '';
  • perl/modules/Jabber/inc/Module/Install/Fetch.pm

    r300b470 r7869e48  
    1414sub get_file {
    1515    my ($self, %args) = @_;
    16     my ($scheme, $host, $path, $file) = 
     16    my ($scheme, $host, $path, $file) =
    1717        $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
    1818
     
    2020        $args{url} = $args{ftp_url}
    2121            or (warn("LWP support unavailable!\n"), return);
    22         ($scheme, $host, $path, $file) = 
     22        ($scheme, $host, $path, $file) =
    2323            $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
    2424    }
  • perl/modules/Jabber/inc/Module/Install/Makefile.pm

    r300b470 r7869e48  
    6565    my $clean = $self->makemaker_args->{clean} ||= {};
    6666    %$clean = (
    67         %$clean, 
     67        %$clean,
    6868        FILES => join(' ', grep length, $clean->{FILES}, @_),
    6969    );
     
    7474    my $realclean = $self->makemaker_args->{realclean} ||= {};
    7575    %$realclean = (
    76         %$realclean, 
     76        %$realclean,
    7777        FILES => join(' ', grep length, $realclean->{FILES}, @_),
    7878    );
     
    156156    my $top_version   = $self->_top->VERSION || '';
    157157
    158     my $preamble = $self->preamble 
     158    my $preamble = $self->preamble
    159159        ? "# Preamble by $top_class $top_version\n"
    160160            . $self->preamble
  • perl/modules/Jabber/inc/Module/Install/Metadata.pm

    r300b470 r7869e48  
    273273        $author =~ s{E<lt>}{<}g;
    274274        $author =~ s{E<gt>}{>}g;
    275         $self->author($author); 
     275        $self->author($author);
    276276    }
    277277    else {
  • perl/modules/Jabber/inc/Module/Install/Win32.pm

    r300b470 r7869e48  
    1717        $self->load('can_run');
    1818        $self->load('get_file');
    19        
     19
    2020        require Config;
    2121        return unless (
  • perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm

    r678f607 r7869e48  
    10501050                              sid => $sid } );
    10511051    $jhash{type} = 'admin';
    1052    
     1052
    10531053    BarnOwl::queue_message( BarnOwl::Message->new(%jhash) );
    10541054}
  • perl/modules/Jabber/lib/Net/Jabber/Client.pm

    rc2bed55 r7869e48  
    7070use Net::Jabber::Protocol;
    7171use base qw( Net::XMPP::Client Net::Jabber::Protocol );
    72 use vars qw( $VERSION ); 
     72use vars qw( $VERSION );
    7373
    7474$VERSION = "2.0";
  • perl/modules/Jabber/lib/Net/Jabber/Component.pm

    ra8c55b5 r7869e48  
    9595                                      defaults for the two are localhost
    9696                                      and 5269.
    97                                      
     97
    9898                                      Note: A change from previous
    9999                                      versions is that Component now
     
    160160                           0   - Status ok, no data received.
    161161                         undef - Status not ok, stop processing.
    162                        
     162
    163163                       IMPORTANT: You need to check the output of every
    164164                       Process.  If you get an undef then the connection
     
    196196    bless($self, $proto);
    197197    $self->init(@_);
    198    
     198
    199199    $self->{SERVER}->{port} = 5269;
    200200    $self->{SERVER}->{namespace} = "jabber:component:accept";
    201201    $self->{SERVER}->{allow_register} = 0;
    202    
     202
    203203    return $self;
    204204}
     
    217217    my $self = shift;
    218218    my (%args) = @_;
    219    
     219
    220220    $self->{STREAM}->SetCallBacks(node=>undef);
    221221
     
    248248    my $self = shift;
    249249    my (%args) = @_;
    250    
     250
    251251    my %connect;
    252252    $connect{componentname}  = $args{componentname};
     
    257257    $connect{tls}            = $args{tls}            if exists($args{tls});
    258258
    259    
     259
    260260    return %connect;
    261261}
  • perl/modules/Jabber/lib/Net/Jabber/Data.pm

    rcdd3959 r7869e48  
    4444    jabber:iq:roster
    4545
    46   For more information on what these namespaces are for, visit 
     46  For more information on what these namespaces are for, visit
    4747  http://www.jabber.org and browse the Jabber Programmers Guide.
    4848
  • perl/modules/Jabber/lib/Net/Jabber/Dialback/Result.pm

    rc2bed55 r7869e48  
    144144=head2 Test functions
    145145
    146   DefinedTo() - returns 1 if the to attribute is defined in the 
     146  DefinedTo() - returns 1 if the to attribute is defined in the
    147147                <db:result/>, 0 otherwise.
    148148
    149   DefinedFrom() - returns 1 if the from attribute is defined in the 
     149  DefinedFrom() - returns 1 if the from attribute is defined in the
    150150                  <db:result/>, 0 otherwise.
    151151
    152   DefinedType() - returns 1 if the type attribute is defined in the 
     152  DefinedType() - returns 1 if the type attribute is defined in the
    153153                  <db:result/>, 0 otherwise.
    154154
  • perl/modules/Jabber/lib/Net/Jabber/Dialback/Verify.pm

    rc2bed55 r7869e48  
    151151=head2 Test functions
    152152
    153   DefinedTo() - returns 1 if the to attribute is defined in the 
     153  DefinedTo() - returns 1 if the to attribute is defined in the
    154154                <db:verify/>, 0 otherwise.
    155155
    156   DefinedFrom() - returns 1 if the from attribute is defined in the 
     156  DefinedFrom() - returns 1 if the from attribute is defined in the
    157157                  <db:verify/>, 0 otherwise.
    158158
    159   DefinedType() - returns 1 if the type attribute is defined in the 
     159  DefinedType() - returns 1 if the type attribute is defined in the
    160160                  <db:verify/>, 0 otherwise.
    161161
    162   DefinedID() - returns 1 if the id attribute is defined in the 
     162  DefinedID() - returns 1 if the id attribute is defined in the
    163163                  <db:verify/>, 0 otherwise.
    164164
  • perl/modules/Jabber/lib/Net/Jabber/IQ.pm

    rc2bed55 r7869e48  
    5454sub DefinedQuery { my $self = shift; $self->DefinedChild(@_); }
    5555sub NewQuery     { my $self = shift; $self->RemoveFirstChild(); $self->NewFirstChild(@_);     }
    56 sub AddQuery     { my $self = shift; $self->AddChild(@_);     } 
     56sub AddQuery     { my $self = shift; $self->AddChild(@_);     }
    5757sub RemoveQuery  { my $self = shift; $self->RemoveFirstChild(@_);  }
    5858
     
    6060sub DefinedX { my $self = shift; $self->DefinedChild(@_); }
    6161sub NewX     { my $self = shift; $self->NewChild(@_);     }
    62 sub AddX     { my $self = shift; $self->AddChild(@_);     } 
     62sub AddX     { my $self = shift; $self->AddChild(@_);     }
    6363sub RemoveX  { my $self = shift; $self->RemoveChild(@_);  }
    6464
  • perl/modules/Jabber/lib/Net/Jabber/Key.pm

    ra8c55b5 r7869e48  
    5555    new(debug=>string,       - creates the Key object.  debug should
    5656        debugfh=>FileHandle,   be set to the path for the debug
    57         debuglevel=>integer)   log to be written.  If set to "stdout" 
     57        debuglevel=>integer)   log to be written.  If set to "stdout"
    5858                               then the debug will go there.  Also, you
    5959                               can specify a filehandle that already
     
    6565                 time and the PID.
    6666
    67     Create(cacheString) - generates a key and caches it with the key 
     67    Create(cacheString) - generates a key and caches it with the key
    6868                          of cacheString.  Create returns the key.
    6969
     
    101101
    102102    $self->{VERSION} = $VERSION;
    103    
     103
    104104    $self->{CACHE} = {};
    105105
     
    122122###########################################################################
    123123#
    124 # Generate - returns a random string based on the PID and time and a 
    125 #            random number.  Then it creates an SHA1 Digest of that 
     124# Generate - returns a random string based on the PID and time and a
     125#            random number.  Then it creates an SHA1 Digest of that
    126126#            string and returns it.
    127127#
  • perl/modules/Jabber/lib/Net/Jabber/Log.pm

    rc2bed55 r7869e48  
    3030
    3131  Net::Jabber::Log is a companion to the Net::Jabber module.
    32   It provides the user a simple interface to set and retrieve all 
     32  It provides the user a simple interface to set and retrieve all
    3333  parts of a Jabber Log.
    3434
    3535=head1 DESCRIPTION
    3636
    37   To initialize the Log with a Jabber <log/> you must pass it the 
     37  To initialize the Log with a Jabber <log/> you must pass it the
    3838  XML::Parser Tree array.  For example:
    3939
     
    9797  GetFrom()      -  returns either a string with the Jabber Identifier,
    9898  GetFrom("jid")    or a Net::Jabber::JID object for the person who
    99                     sent the <log/>.  To get the JID object set 
    100                     the string to "jid", otherwise leave blank for the 
     99                    sent the <log/>.  To get the JID object set
     100                    the string to "jid", otherwise leave blank for the
    101101                    text string.
    102102
     
    125125
    126126  SetFrom(string) - sets the from attribute.  You can either pass a string
    127   SetFrom(JID)      or a JID object.  They must be valid Jabber 
     127  SetFrom(JID)      or a JID object.  They must be valid Jabber
    128128                    Identifiers or the server will return an error log.
    129129                    (ie.  jabber:bob@jabber.org/Silent Bob, etc...)
     
    133133                    notice     general logging
    134134                    warn       warning
    135                     alert      critical error (can still run but not 
     135                    alert      critical error (can still run but not
    136136                               correctly)
    137137                    error      fatal error (cannot run anymore)
     
    141141=head2 Test functions
    142142
    143   DefinedFrom() - returns 1 if the from attribute is defined in the 
     143  DefinedFrom() - returns 1 if the from attribute is defined in the
    144144                  <log/>, 0 otherwise.
    145145
    146   DefinedType() - returns 1 if the type attribute is defined in the 
     146  DefinedType() - returns 1 if the type attribute is defined in the
    147147                  <log/>, 0 otherwise.
    148148
     
    170170    my $class = ref($proto) || $proto;
    171171    my $self = { };
    172    
     172
    173173    $self->{VERSION} = $VERSION;
    174174    $self->{TIMESTAMP} = &Net::Jabber::GetTimeStamp("local");
     
    214214    $type = "" unless defined($type);
    215215    my $treeName = "LOG";
    216    
     216
    217217    return "log" if ($AUTOLOAD eq "GetTag");
    218218    return &XML::Stream::BuildXML(@{$self->{$treeName}}) if ($AUTOLOAD eq "GetXML");
  • perl/modules/Jabber/lib/Net/Jabber/Message.pm

    rc2bed55 r7869e48  
    5252$VERSION = "2.0";
    5353
    54 sub GetX     { my $self = shift; $self->GetChild(@_);    } 
     54sub GetX     { my $self = shift; $self->GetChild(@_);    }
    5555sub DefinedX { my $self = shift; $self->DefinedChild(@_); }
    5656sub NewX     { my $self = shift; $self->NewChild(@_);    }
    57 sub AddX     { my $self = shift; $self->AddChild(@_);    } 
     57sub AddX     { my $self = shift; $self->AddChild(@_);    }
    5858sub RemoveX  { my $self = shift; $self->RemoveChild(@_); }
    5959
  • perl/modules/Jabber/lib/Net/Jabber/Namespaces.pm

    rc2bed55 r7869e48  
    487487           );
    488488}
    489        
     489
    490490#-----------------------------------------------------------------------------
    491491# __netjabber__:iq:rpc:methodResponse
     
    514514           );
    515515}
    516        
     516
    517517#-----------------------------------------------------------------------------
    518518# __netjabber__:iq:rpc:fault
     
    535535           );
    536536}
    537        
     537
    538538#-----------------------------------------------------------------------------
    539539# __netjabber__:iq:rpc:params
     
    581581           );
    582582}
    583        
     583
    584584#-----------------------------------------------------------------------------
    585585# __netjabber__:iq:rpc:value
     
    805805           );
    806806}
    807                                    
     807
    808808#-----------------------------------------------------------------------------
    809809# jabber:iq:version
     
    848848           );
    849849}
    850                  
     850
    851851#-----------------------------------------------------------------------------
    852852# jabber:x:conference
     
    969969           );
    970970}
    971        
     971
    972972#-----------------------------------------------------------------------------
    973973# __netjabber__:x:data:item
     
    10611061           );
    10621062}
    1063        
     1063
    10641064#-----------------------------------------------------------------------------
    10651065# jabber:x:event
     
    11521152           );
    11531153}
    1154        
     1154
    11551155#-----------------------------------------------------------------------------
    11561156# __netjabber__:x:roster:item
     
    13961396           );
    13971397}
    1398        
     1398
    13991399#-----------------------------------------------------------------------------
    14001400# __netjabber__:iq:disco:items:item
     
    14331433           );
    14341434}
    1435        
     1435
    14361436#-----------------------------------------------------------------------------
    14371437# http://jabber.org/protocol/muc
     
    14721472                     },
    14731473           );
    1474                    
     1474
    14751475}
    14761476
  • perl/modules/Jabber/lib/Net/Jabber/Presence.pm

    rc2bed55 r7869e48  
    5252$VERSION = "2.0";
    5353
    54 sub GetX     { my $self = shift; $self->GetChild(@_);    } 
     54sub GetX     { my $self = shift; $self->GetChild(@_);    }
    5555sub DefinedX { my $self = shift; $self->DefinedChild(@_); }
    5656sub NewX     { my $self = shift; $self->NewChild(@_);    }
    57 sub AddX     { my $self = shift; $self->AddChild(@_);    } 
     57sub AddX     { my $self = shift; $self->AddChild(@_);    }
    5858sub RemoveX  { my $self = shift; $self->RemoveChild(@_); }
    5959
  • perl/modules/Jabber/lib/Net/Jabber/Protocol.pm

    rcdd3959 r7869e48  
    6262            comes back.  You can optionally specify a timeout so that
    6363            you do not block forever.
    64            
     64
    6565    nonblock - send the packet with an ID, but then return that id and
    6666               control to the master program.  Net::Jabber is still
     
    7373               combined with the XPath function because you can register
    7474               a one shot function tied to the id you get back.
    75                
     75
    7676
    7777=head2 Basic Functions
     
    145145=head2 Bystreams Functions
    146146
    147     %hash = $Con->ByteStreamsProxyRequest(jid=>"proxy.server"); 
     147    %hash = $Con->ByteStreamsProxyRequest(jid=>"proxy.server");
    148148    %hash = $Con->ByteStreamsProxyRequest(jid=>"proxy.server",
    149                                           timeout=>10); 
     149                                          timeout=>10);
    150150
    151151    $id = $Con->ByteStreamsProxyRequest(jid=>"proxy.server",
     
    155155                                        mode=>"passthru");
    156156
    157    
     157
    158158    %hash = $Con->ByteStreamsProxyParse($query);
    159159
    160    
     160
    161161    $status = $Con->ByteStreamsProxyActivate(sid=>"stream_id",
    162                                              jid=>"proxy.server"); 
     162                                             jid=>"proxy.server");
    163163    $status = $Con->ByteStreamsProxyActivate(sid=>"stream_id",
    164164                                             jid=>"proxy.server",
    165                                             timeout=>10); 
     165                                            timeout=>10);
    166166
    167167    $id = $Con->ByteStreamsProxyActivate(sid=>"stream_id",
     
    171171    $id = $Con->ByteStreamsProxyActivate(sid=>"stream_id",
    172172                                         jid=>"proxy.server",
    173                                         mode=>"passthru"); 
     173                                        mode=>"passthru");
    174174
    175175
     
    182182                                                ...
    183183                                               ],
    184                                   jid=>"bob\@jabber.org"); 
     184                                  jid=>"bob\@jabber.org");
    185185    $jid = $Con->ByteStreamsOffer(sid=>"stream_id",
    186186                                  streamhosts=>[{},{},...],
    187187                                  jid=>"bob\@jabber.org",
    188                                   timeout=>10); 
     188                                  timeout=>10);
    189189
    190190    $id = $Con->ByteStreamsOffer(sid=>"stream_id",
     
    197197                                 jid=>"bob\@jabber.org",
    198198                                 mode=>"passthru");
    199  
     199
    200200=head2 Disco Functions
    201201
     
    219219                                 mode=>"passthru");
    220220
    221    
     221
    222222    %hash = $Con->DiscoInfoParse($query);
    223223
     
    233233                                  mode=>"passthru");
    234234
    235    
     235
    236236    %hash = $Con->DiscoItemsParse($query);
    237237
    238238=head2 Feature Negotiation Functions
    239239
    240  
     240
    241241    %hash = $Con->FeatureNegRequest(jid=>"jabber.org",
    242242                                    features=>{ feat1=>["opt1","opt2",...],
     
    259259    $iq->AddQuery($query);
    260260
    261     %hash = $Con->FeatureNegParse($query); 
     261    %hash = $Con->FeatureNegParse($query);
    262262
    263263=head2 File Transfer Functions
     
    568568                                    See DiscoInfoParse for the format
    569569                                    of the resulting tree.
    570                                    
     570
    571571                                    See MODES above for using the mode
    572572                                    and timeout.
     
    586586             $info{feature}->{http://jabber.org/protocol/disco#info} = 1;
    587587             $info{feature}->{http://jabber.org/protocol/muc#admin} = 1;
    588                                    
     588
    589589    DiscoItemsRequest(jid=>string, - sends a disco#items request to
    590590                      mode=>string,  the jid passed as an argument.
     
    594594                                     See DiscoItemsParse for the format
    595595                                     of the resulting tree.
    596                                    
     596
    597597                                     See MODES above for using the mode
    598598                                     and timeout.
     
    618618                                           See DiscoInfoQuery for the format
    619619                                           of the features hash ref.
    620                                    
     620
    621621                                           See DiscoInfoParse for the format
    622622                                           of the resulting tree.
    623                                    
     623
    624624                                           See MODES above for using the mode
    625625                                           and timeout.
     
    715715            params=>array,        to the specified address.  Returns
    716716            mode=>string,         the above data from RPCParse.
    717             timeout=>int)         
     717            timeout=>int)
    718718                                  See MODES above for using the mode
    719719                                  and timeout.
     
    780780                                 present are the required fields the
    781781                                 server needs.
    782                                
     782
    783783                                 See MODES above for using the mode
    784784                                 and timeout.
     
    910910    croak("You must specify functions=>'' for the function call to DefineNamespace")
    911911        if !exists($args{functions});
    912    
     912
    913913    my %xpath;
    914914
     
    959959                            $xpath{$name}->{$type}->{skip_xmlns} = 1;
    960960                        }
    961                        
     961
    962962                        if ($funcHash{$type}->[$i] eq "__netjabber__:specifyname")
    963963                        {
     
    977977            next;
    978978        }
    979        
     979
    980980        my $type = $funcHash{set}->[0];
    981981        my $xpath = $funcHash{set}->[1];
     
    993993            next;
    994994        }
    995        
     995
    996996        if ($type eq "scalar")
    997997        {
     
    999999            next;
    10001000        }
    1001        
     1001
    10021002        if ($type eq "flag")
    10031003        {
     
    10951095        return $id;
    10961096    }
    1097    
     1097
    10981098    return $self->SendWithID($iq) if ($args{mode} eq "nonblock");
    10991099
     
    11311131###############################################################################
    11321132sub BrowseParse
    1133 { 
     1133{
    11341134    my $self = shift;
    11351135    my $item = shift;
     
    12091209###############################################################################
    12101210#
    1211 # ByteStreamsProxyRequest - This queries a proxy server to get a list of 
     1211# ByteStreamsProxyRequest - This queries a proxy server to get a list of
    12121212#
    12131213###############################################################################
     
    12371237        return $id;
    12381238    }
    1239    
     1239
    12401240    return $self->SendWithID($iq) if ($args{mode} eq "nonblock");
    12411241
     
    12891289        push(@hosts,\%host);
    12901290    }
    1291    
     1291
    12921292    return \@hosts;
    12931293}
     
    12961296###############################################################################
    12971297#
    1298 # ByteStreamsProxyActivate - This tells a proxy to activate the connection 
     1298# ByteStreamsProxyActivate - This tells a proxy to activate the connection
    12991299#
    13001300###############################################################################
     
    13151315                           activate=>(ref($args{recipient}) eq "Net::Jabber::JID" ? $args{recipient}->GetJID("full") : $args{recipient})
    13161316                         );
    1317    
     1317
    13181318    #--------------------------------------------------------------------------
    13191319    # Send the IQ with the next available ID and wait for a reply with that
     
    13271327        return $id;
    13281328    }
    1329    
     1329
    13301330    return $self->SendWithID($iq) if ($args{mode} eq "nonblock");
    1331    
     1331
    13321332    $iq = $self->SendAndReceiveWithID($iq,$timeout);
    13331333
     
    13881388        return $id;
    13891389    }
    1390    
     1390
    13911391    return $self->SendWithID($iq) if ($args{mode} eq "nonblock");
    13921392
     
    14471447        return $id;
    14481448    }
    1449    
     1449
    14501450    return $self->SendWithID($iq) if ($args{mode} eq "nonblock");
    14511451
     
    14951495        $disco{feature}->{$feat->GetVar()} = 1;
    14961496    }
    1497    
     1497
    14981498    return \%disco;
    14991499}
     
    15311531        return $id;
    15321532    }
    1533    
     1533
    15341534    return $self->SendWithID($iq) if ($args{mode} eq "nonblock");
    15351535
     
    15771577        $disco{$item->GetJID()}->{$item->GetNode()} = $item->GetName();
    15781578    }
    1579    
     1579
    15801580    return \%disco;
    15811581}
     
    16031603
    16041604    $iq->AddQuery($query);
    1605    
     1605
    16061606    #--------------------------------------------------------------------------
    16071607    # Send the IQ with the next available ID and wait for a reply with that
     
    16151615        return $id;
    16161616    }
    1617    
     1617
    16181618    return $self->SendWithID($iq) if ($args{mode} eq "nonblock");
    16191619
     
    16591659    $tag = $Net::Jabber::Query::TAGS{'http://jabber.org/protocol/feature-neg'}
    16601660        if exists($Net::Jabber::Query::TAGS{'http://jabber.org/protocol/feature-neg'});
    1661    
     1661
    16621662    my $query = Net::Jabber::Query->new($tag);
    16631663    $query->SetXMLNS("http://jabber.org/protocol/feature-neg");
    16641664    my $xdata = $query->NewX("jabber:x:data");
    1665    
     1665
    16661666    foreach my $feature (keys(%{$features}))
    16671667    {
     
    16921692
    16931693    my $xdata = $item->GetX("jabber:x:data");
    1694    
     1694
    16951695    foreach my $field ($xdata->GetFields())
    16961696    {
    16971697        my @options;
    1698        
     1698
    16991699        foreach my $option ($field->GetOptions())
    17001700        {
     
    17041704        if ($#options == -1)
    17051705        {
    1706            
     1706
    17071707            $feats{$field->GetVar()} = $field->GetValue();
    17081708        }
     
    17121712        }
    17131713    }
    1714    
     1714
    17151715    return \%feats;
    17161716}
     
    17491749    $profile->SetFile(desc=>$args{desc}) if exists($args{desc});
    17501750
    1751     $query->SetStream(mimetype=>(-B $args{filename} ? 
     1751    $query->SetStream(mimetype=>(-B $args{filename} ?
    17521752                                    "application/octect-stream" :
    17531753                                    "text/plain"
     
    17811781        return $id;
    17821782    }
    1783    
     1783
    17841784    return $self->SendWithID($iq) if ($args{mode} eq "nonblock");
    17851785
     
    18751875        return %tree;
    18761876    }
    1877    
     1877
    18781878    return $self->SendWithID($iq) if ($args{mode} eq "nonblock");
    18791879
     
    19211921
    19221922    $tree->{size} += (-s $path);
    1923            
     1923
    19241924    opendir(DIR, $path);
    19251925    foreach my $file ( sort {$a cmp $b} readdir(DIR) )
     
    19391939        {
    19401940            $tree->{size} += (-s "$path/$file");
    1941            
     1941
    19421942            $tree->{tree}->{"$path/$file"}->{order} = $tree->{counter};
    19431943            $tree->{tree}->{"$path/$file"}->{sid} =
     
    19701970    my $waitforid = delete($args{waitforid});
    19711971    $args{mode} = "block" if $waitforid;
    1972    
     1972
    19731973    my $timeout = exists($args{timeout}) ? delete($args{timeout}) : undef;
    19741974
     
    19851985        return $id;
    19861986    }
    1987    
     1987
    19881988    return $self->SendWithID($iq) if ($args{mode} eq "nonblock");
    19891989
     
    21362136        return $id;
    21372137    }
    2138    
     2138
    21392139    return $self->SendWithID($iq) if ($args{mode} eq "nonblock");
    21402140
     
    24272427        return $id;
    24282428    }
    2429    
     2429
    24302430    return $self->SendWithID($iq) if ($args{mode} eq "nonblock");
    24312431
     
    25672567        return $id;
    25682568    }
    2569    
     2569
    25702570    return $self->SendWithID($iq) if ($args{mode} eq "nonblock");
    25712571
     
    26242624    my $waitforid = delete($args{waitforid});
    26252625    $args{mode} = "block" if $waitforid;
    2626    
     2626
    26272627    my $timeout = exists($args{timeout}) ? delete($args{timeout}) : undef;
    26282628
     
    26392639        return $id;
    26402640    }
    2641    
     2641
    26422642    return $self->SendWithID($iq) if ($args{mode} eq "nonblock");
    26432643
     
    26982698        $x->SetMUC(password=>$args{password});
    26992699    }
    2700    
     2700
    27012701    return $presence->GetXML() if exists($args{'__netjabber__:test'});
    27022702    $self->Send($presence);
     
    27492749                    $target->{form}->[$order]->{value} = ($field->GetValue())[0];
    27502750                }
    2751             } 
     2751            }
    27522752            my $count = 0;
    27532753            foreach my $option ($field->GetOptions())
     
    29442944    $body .=   "Time: ".$query->GetDisplay()."\n";
    29452945    $body .=   "Timezone: ".$query->GetTZ()."\n";
    2946    
     2946
    29472947    my $message = $self->_message();
    29482948    $message->SetMessage(to=>$iq->GetTo(),
     
    30703070            if ($query->DefinedMessage());
    30713071    }
    3072    
     3072
    30733073    my $message = $self->_message();
    30743074    $message->SetMessage(from=>$iq->GetFrom(),
  • perl/modules/Jabber/lib/Net/Jabber/Server.pm

    rc2bed55 r7869e48  
    6262    %status = $Server->Process();
    6363    %status = $Server->Process(5);
    64    
     64
    6565    $Server->Stop();
    6666
     
    9898                           0   - Status ok, no data received.
    9999                         undef - Status not ok, stop processing.
    100                        
     100
    101101                       IMPORTANT: You need to check the output of every
    102102                       Process.  If you get an undef then the connection
  • perl/modules/Jabber/lib/Net/Jabber/Stanza.pm

    rc2bed55 r7869e48  
    9090
    9191=pod
    92    
    93   For more information on what these namespaces are for, visit 
     92
     93  For more information on what these namespaces are for, visit
    9494  http://www.jabber.org and browse the Jabber Programmers Guide.
    9595
     
    9797
    9898  ny:private:ns
    99  
     99
    100100  Name                        Type     Get  Set  Remove  Defined  Add
    101101  ==========================  =======  ===  ===  ======  =======  ===
    102102  Foo                         scalar    X    X     X        X
    103   Bar                         child                                X 
     103  Bar                         child                                X
    104104  Bars                        child     X
    105105  Test                        master    X    X
     
    108108
    109109    GetFoo(), SetFoo(), RemoveFoo(), DefinedFoo()
    110    
     110
    111111    AddBar()
    112    
     112
    113113    GetBars(), DefinedBars()
    114    
     114
    115115    GetTest(), SetMaster()
    116116
     
    125125  Name                        Type       Get  Set  Remove  Defined  Add
    126126  ==========================  =========  ===  ===  ======  =======  ===
    127   Activate                    scalar      X    X     X        X       
    128   SID                         scalar      X    X     X        X       
    129   StreamHostUsedJID           jid         X    X     X        X       
    130   StreamHost                  child                                  X 
    131   StreamHosts                 child       X          X        X       
    132   ByteStreams                 master      X    X                       
     127  Activate                    scalar      X    X     X        X
     128  SID                         scalar      X    X     X        X
     129  StreamHostUsedJID           jid         X    X     X        X
     130  StreamHost                  child                                  X
     131  StreamHosts                 child       X          X        X
     132  ByteStreams                 master      X    X
    133133
    134134=head1 http://jabber.org/protocol/bytestreams - streamhost objects
     
    136136  Name                        Type       Get  Set  Remove  Defined  Add
    137137  ==========================  =========  ===  ===  ======  =======  ===
    138   Host                        scalar      X    X     X        X       
    139   JID                         jid         X    X     X        X       
    140   Port                        scalar      X    X     X        X       
    141   ZeroConf                    scalar      X    X     X        X       
    142   StreamHost                  master      X    X                       
     138  Host                        scalar      X    X     X        X
     139  JID                         jid         X    X     X        X
     140  Port                        scalar      X    X     X        X
     141  ZeroConf                    scalar      X    X     X        X
     142  StreamHost                  master      X    X
    143143
    144144=head1 http://jabber.org/protocol/commands
     
    146146  Name                        Type       Get  Set  Remove  Defined  Add
    147147  ==========================  =========  ===  ===  ======  =======  ===
    148   Action                      scalar      X    X     X        X       
    149   Node                        scalar      X    X     X        X       
    150   SessionID                   scalar      X    X     X        X       
    151   Status                      scalar      X    X     X        X       
    152   Note                        child                                  X 
    153   Notes                       child       X          X        X       
    154   Command                     master      X    X                       
     148  Action                      scalar      X    X     X        X
     149  Node                        scalar      X    X     X        X
     150  SessionID                   scalar      X    X     X        X
     151  Status                      scalar      X    X     X        X
     152  Note                        child                                  X
     153  Notes                       child       X          X        X
     154  Command                     master      X    X
    155155
    156156=head1 http://jabber.org/protocol/commands - note objects
     
    158158  Name                        Type       Get  Set  Remove  Defined  Add
    159159  ==========================  =========  ===  ===  ======  =======  ===
    160   Message                     scalar      X    X     X        X       
    161   Type                        scalar      X    X     X        X       
    162   Note                        master      X    X                       
     160  Message                     scalar      X    X     X        X
     161  Type                        scalar      X    X     X        X
     162  Note                        master      X    X
    163163
    164164=head1 http://jabber.org/protocol/disco#info
     
    166166  Name                        Type       Get  Set  Remove  Defined  Add
    167167  ==========================  =========  ===  ===  ======  =======  ===
    168   Node                        scalar      X    X     X        X       
    169   Feature                     child                                  X 
    170   Features                    child       X          X        X       
    171   Identities                  child       X          X        X       
    172   Identity                    child                                  X 
    173   DiscoInfo                   master      X    X                       
     168  Node                        scalar      X    X     X        X
     169  Feature                     child                                  X
     170  Features                    child       X          X        X
     171  Identities                  child       X          X        X
     172  Identity                    child                                  X
     173  DiscoInfo                   master      X    X
    174174
    175175=head1 http://jabber.org/protocol/disco#info - feature objects
     
    177177  Name                        Type       Get  Set  Remove  Defined  Add
    178178  ==========================  =========  ===  ===  ======  =======  ===
    179   Var                         scalar      X    X     X        X       
    180   Feature                     master      X    X                       
     179  Var                         scalar      X    X     X        X
     180  Feature                     master      X    X
    181181
    182182=head1 http://jabber.org/protocol/disco#info - identity objects
     
    184184  Name                        Type       Get  Set  Remove  Defined  Add
    185185  ==========================  =========  ===  ===  ======  =======  ===
    186   Category                    scalar      X    X     X        X       
    187   Name                        scalar      X    X     X        X       
    188   Type                        scalar      X    X     X        X       
    189   Identity                    master      X    X                       
     186  Category                    scalar      X    X     X        X
     187  Name                        scalar      X    X     X        X
     188  Type                        scalar      X    X     X        X
     189  Identity                    master      X    X
    190190
    191191=head1 http://jabber.org/protocol/disco#items
     
    193193  Name                        Type       Get  Set  Remove  Defined  Add
    194194  ==========================  =========  ===  ===  ======  =======  ===
    195   Node                        scalar      X    X     X        X       
    196   Item                        child                                  X 
    197   Items                       child       X          X        X       
    198   DiscoItems                  master      X    X                       
     195  Node                        scalar      X    X     X        X
     196  Item                        child                                  X
     197  Items                       child       X          X        X
     198  DiscoItems                  master      X    X
    199199
    200200=head1 http://jabber.org/protocol/disco#items - item objects
     
    202202  Name                        Type       Get  Set  Remove  Defined  Add
    203203  ==========================  =========  ===  ===  ======  =======  ===
    204   Action                      scalar      X    X     X        X       
    205   JID                         jid         X    X     X        X       
    206   Name                        scalar      X    X     X        X       
    207   Node                        scalar      X    X     X        X       
    208   Item                        master      X    X                       
     204  Action                      scalar      X    X     X        X
     205  JID                         jid         X    X     X        X
     206  Name                        scalar      X    X     X        X
     207  Node                        scalar      X    X     X        X
     208  Item                        master      X    X
    209209
    210210=head1 http://jabber.org/protocol/feature-neg
     
    212212  Name                        Type       Get  Set  Remove  Defined  Add
    213213  ==========================  =========  ===  ===  ======  =======  ===
    214   FeatureNeg                  master      X    X                       
     214  FeatureNeg                  master      X    X
    215215
    216216=head1 http://jabber.org/protocol/muc
     
    218218  Name                        Type       Get  Set  Remove  Defined  Add
    219219  ==========================  =========  ===  ===  ======  =======  ===
    220   Password                    scalar      X    X     X        X       
    221   MUC                         master      X    X                       
     220  Password                    scalar      X    X     X        X
     221  MUC                         master      X    X
    222222
    223223=head1 http://jabber.org/protocol/muc#admin
     
    225225  Name                        Type       Get  Set  Remove  Defined  Add
    226226  ==========================  =========  ===  ===  ======  =======  ===
    227   Item                        child                                  X 
    228   Items                       child       X          X        X       
    229   Admin                       master      X    X                       
     227  Item                        child                                  X
     228  Items                       child       X          X        X
     229  Admin                       master      X    X
    230230
    231231=head1 http://jabber.org/protocol/muc#admin - item objects
     
    233233  Name                        Type       Get  Set  Remove  Defined  Add
    234234  ==========================  =========  ===  ===  ======  =======  ===
    235   ActorJID                    jid         X    X     X        X       
    236   Affiliation                 scalar      X    X     X        X       
    237   JID                         jid         X    X     X        X       
    238   Nick                        scalar      X    X     X        X       
    239   Reason                      scalar      X    X     X        X       
    240   Role                        scalar      X    X     X        X       
    241   Item                        master      X    X                       
     235  ActorJID                    jid         X    X     X        X
     236  Affiliation                 scalar      X    X     X        X
     237  JID                         jid         X    X     X        X
     238  Nick                        scalar      X    X     X        X
     239  Reason                      scalar      X    X     X        X
     240  Role                        scalar      X    X     X        X
     241  Item                        master      X    X
    242242
    243243=head1 http://jabber.org/protocol/muc#user
     
    245245  Name                        Type       Get  Set  Remove  Defined  Add
    246246  ==========================  =========  ===  ===  ======  =======  ===
    247   Alt                         scalar      X    X     X        X       
    248   Password                    scalar      X    X     X        X       
    249   StatusCode                  scalar      X    X     X        X       
    250   Invite                      child       X          X        X      X 
    251   Item                        child       X          X        X      X 
    252   User                        master      X    X                       
     247  Alt                         scalar      X    X     X        X
     248  Password                    scalar      X    X     X        X
     249  StatusCode                  scalar      X    X     X        X
     250  Invite                      child       X          X        X      X
     251  Item                        child       X          X        X      X
     252  User                        master      X    X
    253253
    254254=head1 http://jabber.org/protocol/muc#user - invite objects
     
    256256  Name                        Type       Get  Set  Remove  Defined  Add
    257257  ==========================  =========  ===  ===  ======  =======  ===
    258   From                        jid         X    X     X        X       
    259   Reason                      scalar      X    X     X        X       
    260   To                          jid         X    X     X        X       
    261   Invite                      master      X    X                       
     258  From                        jid         X    X     X        X
     259  Reason                      scalar      X    X     X        X
     260  To                          jid         X    X     X        X
     261  Invite                      master      X    X
    262262
    263263=head1 http://jabber.org/protocol/muc#user - item objects
     
    265265  Name                        Type       Get  Set  Remove  Defined  Add
    266266  ==========================  =========  ===  ===  ======  =======  ===
    267   ActorJID                    jid         X    X     X        X       
    268   Affiliation                 scalar      X    X     X        X       
    269   JID                         jid         X    X     X        X       
    270   Nick                        scalar      X    X     X        X       
    271   Reason                      scalar      X    X     X        X       
    272   Role                        scalar      X    X     X        X       
    273   Item                        master      X    X                       
     267  ActorJID                    jid         X    X     X        X
     268  Affiliation                 scalar      X    X     X        X
     269  JID                         jid         X    X     X        X
     270  Nick                        scalar      X    X     X        X
     271  Reason                      scalar      X    X     X        X
     272  Role                        scalar      X    X     X        X
     273  Item                        master      X    X
    274274
    275275=head1 http://jabber.org/protocol/pubsub
     
    277277  Name                        Type       Get  Set  Remove  Defined  Add
    278278  ==========================  =========  ===  ===  ======  =======  ===
    279   Affiliations                child       X          X        X      X 
    280   Configure                   child       X          X        X      X 
    281   Create                      child       X          X        X      X 
    282   Delete                      child       X          X        X      X 
    283   Entities                    child       X          X        X      X 
    284   Entity                      child       X          X        X      X 
    285   Item                        child       X          X        X      X 
    286   Items                       child       X          X        X      X 
    287   Options                     child       X          X        X      X 
    288   Publish                     child       X          X        X      X 
    289   Purge                       child       X          X        X      X 
    290   Retract                     child       X          X        X      X 
    291   Subscribe                   child       X          X        X      X 
    292   Unsubscribe                 child       X          X        X      X 
    293   PubSub                      master      X    X                       
     279  Affiliations                child       X          X        X      X
     280  Configure                   child       X          X        X      X
     281  Create                      child       X          X        X      X
     282  Delete                      child       X          X        X      X
     283  Entities                    child       X          X        X      X
     284  Entity                      child       X          X        X      X
     285  Item                        child       X          X        X      X
     286  Items                       child       X          X        X      X
     287  Options                     child       X          X        X      X
     288  Publish                     child       X          X        X      X
     289  Purge                       child       X          X        X      X
     290  Retract                     child       X          X        X      X
     291  Subscribe                   child       X          X        X      X
     292  Unsubscribe                 child       X          X        X      X
     293  PubSub                      master      X    X
    294294
    295295=head1 http://jabber.org/protocol/pubsub - affiliations objects
     
    297297  Name                        Type       Get  Set  Remove  Defined  Add
    298298  ==========================  =========  ===  ===  ======  =======  ===
    299   Entity                      child       X          X        X      X 
    300   Affiliations                master      X    X                       
     299  Entity                      child       X          X        X      X
     300  Affiliations                master      X    X
    301301
    302302=head1 http://jabber.org/protocol/pubsub - configure objects
     
    304304  Name                        Type       Get  Set  Remove  Defined  Add
    305305  ==========================  =========  ===  ===  ======  =======  ===
    306   Node                        scalar      X    X     X        X       
    307   Configure                   master      X    X                       
     306  Node                        scalar      X    X     X        X
     307  Configure                   master      X    X
    308308
    309309=head1 http://jabber.org/protocol/pubsub - create objects
     
    311311  Name                        Type       Get  Set  Remove  Defined  Add
    312312  ==========================  =========  ===  ===  ======  =======  ===
    313   Node                        scalar      X    X     X        X       
    314   Create                      master      X    X                       
     313  Node                        scalar      X    X     X        X
     314  Create                      master      X    X
    315315
    316316=head1 http://jabber.org/protocol/pubsub - delete objects
     
    318318  Name                        Type       Get  Set  Remove  Defined  Add
    319319  ==========================  =========  ===  ===  ======  =======  ===
    320   Node                        scalar      X    X     X        X       
    321   Delete                      master      X    X                       
     320  Node                        scalar      X    X     X        X
     321  Delete                      master      X    X
    322322
    323323=head1 http://jabber.org/protocol/pubsub - entities objects
     
    325325  Name                        Type       Get  Set  Remove  Defined  Add
    326326  ==========================  =========  ===  ===  ======  =======  ===
    327   Entity                      child       X          X        X      X 
    328   Entities                    master      X    X                       
     327  Entity                      child       X          X        X      X
     328  Entities                    master      X    X
    329329
    330330=head1 http://jabber.org/protocol/pubsub - entity objects
     
    332332  Name                        Type       Get  Set  Remove  Defined  Add
    333333  ==========================  =========  ===  ===  ======  =======  ===
    334   Affiliation                 scalar      X    X     X        X       
    335   JID                         jid         X    X     X        X       
    336   Node                        scalar      X    X     X        X       
    337   Subscription                scalar      X    X     X        X       
    338   SubscribeOptions            child       X          X        X      X 
    339   Entity                      master      X    X                       
     334  Affiliation                 scalar      X    X     X        X
     335  JID                         jid         X    X     X        X
     336  Node                        scalar      X    X     X        X
     337  Subscription                scalar      X    X     X        X
     338  SubscribeOptions            child       X          X        X      X
     339  Entity                      master      X    X
    340340
    341341=head1 http://jabber.org/protocol/pubsub - item objects
     
    343343  Name                        Type       Get  Set  Remove  Defined  Add
    344344  ==========================  =========  ===  ===  ======  =======  ===
    345   ID                          scalar      X    X     X        X       
    346   Payload                     raw         X    X     X        X       
    347   Item                        master      X    X                       
     345  ID                          scalar      X    X     X        X
     346  Payload                     raw         X    X     X        X
     347  Item                        master      X    X
    348348
    349349=head1 http://jabber.org/protocol/pubsub - items objects
     
    351351  Name                        Type       Get  Set  Remove  Defined  Add
    352352  ==========================  =========  ===  ===  ======  =======  ===
    353   MaxItems                    scalar      X    X     X        X       
    354   Node                        scalar      X    X     X        X       
    355   Item                        child       X          X        X      X 
    356   Items                       master      X    X                       
     353  MaxItems                    scalar      X    X     X        X
     354  Node                        scalar      X    X     X        X
     355  Item                        child       X          X        X      X
     356  Items                       master      X    X
    357357
    358358=head1 http://jabber.org/protocol/pubsub - options objects
     
    360360  Name                        Type       Get  Set  Remove  Defined  Add
    361361  ==========================  =========  ===  ===  ======  =======  ===
    362   JID                         jid         X    X     X        X       
    363   Node                        scalar      X    X     X        X       
    364   Options                     master      X    X                       
     362  JID                         jid         X    X     X        X
     363  Node                        scalar      X    X     X        X
     364  Options                     master      X    X
    365365
    366366=head1 http://jabber.org/protocol/pubsub - publish objects
     
    368368  Name                        Type       Get  Set  Remove  Defined  Add
    369369  ==========================  =========  ===  ===  ======  =======  ===
    370   Node                        scalar      X    X     X        X       
    371   Item                        child       X          X        X      X 
    372   Publish                     master      X    X                       
     370  Node                        scalar      X    X     X        X
     371  Item                        child       X          X        X      X
     372  Publish                     master      X    X
    373373
    374374=head1 http://jabber.org/protocol/pubsub - purge objects
     
    376376  Name                        Type       Get  Set  Remove  Defined  Add
    377377  ==========================  =========  ===  ===  ======  =======  ===
    378   Node                        scalar      X    X     X        X       
    379   Purge                       master      X    X                       
     378  Node                        scalar      X    X     X        X
     379  Purge                       master      X    X
    380380
    381381=head1 http://jabber.org/protocol/pubsub - retract objects
     
    383383  Name                        Type       Get  Set  Remove  Defined  Add
    384384  ==========================  =========  ===  ===  ======  =======  ===
    385   Node                        scalar      X    X     X        X       
    386   Item                        child       X          X        X      X 
    387   Retract                     master      X    X                       
     385  Node                        scalar      X    X     X        X
     386  Item                        child       X          X        X      X
     387  Retract                     master      X    X
    388388
    389389=head1 http://jabber.org/protocol/pubsub - subscribe objects
     
    391391  Name                        Type       Get  Set  Remove  Defined  Add
    392392  ==========================  =========  ===  ===  ======  =======  ===
    393   JID                         jid         X    X     X        X       
    394   Node                        scalar      X    X     X        X       
    395   Subscribe                   master      X    X                       
     393  JID                         jid         X    X     X        X
     394  Node                        scalar      X    X     X        X
     395  Subscribe                   master      X    X
    396396
    397397=head1 http://jabber.org/protocol/pubsub - subscribe-options objects
     
    399399  Name                        Type       Get  Set  Remove  Defined  Add
    400400  ==========================  =========  ===  ===  ======  =======  ===
    401   Required                    flag        X    X     X        X       
    402   SubscribeOptions            master      X    X                       
     401  Required                    flag        X    X     X        X
     402  SubscribeOptions            master      X    X
    403403
    404404=head1 http://jabber.org/protocol/pubsub - unsubscribe objects
     
    406406  Name                        Type       Get  Set  Remove  Defined  Add
    407407  ==========================  =========  ===  ===  ======  =======  ===
    408   JID                         jid         X    X     X        X       
    409   Node                        scalar      X    X     X        X       
    410   Unsubscribe                 master      X    X                       
     408  JID                         jid         X    X     X        X
     409  Node                        scalar      X    X     X        X
     410  Unsubscribe                 master      X    X
    411411
    412412=head1 http://jabber.org/protocol/pubsub#event
     
    414414  Name                        Type       Get  Set  Remove  Defined  Add
    415415  ==========================  =========  ===  ===  ======  =======  ===
    416   Delete                      child       X          X        X      X 
    417   Items                       child       X          X        X      X 
    418   Event                       master      X    X                       
     416  Delete                      child       X          X        X      X
     417  Items                       child       X          X        X      X
     418  Event                       master      X    X
    419419
    420420=head1 http://jabber.org/protocol/pubsub#event - delete objects
     
    422422  Name                        Type       Get  Set  Remove  Defined  Add
    423423  ==========================  =========  ===  ===  ======  =======  ===
    424   Node                        scalar      X    X     X        X       
    425   Delete                      master      X    X                       
     424  Node                        scalar      X    X     X        X
     425  Delete                      master      X    X
    426426
    427427=head1 http://jabber.org/protocol/pubsub#event - item objects
     
    429429  Name                        Type       Get  Set  Remove  Defined  Add
    430430  ==========================  =========  ===  ===  ======  =======  ===
    431   ID                          scalar      X    X     X        X       
    432   Payload                     raw         X    X     X        X       
    433   Item                        master      X    X                       
     431  ID                          scalar      X    X     X        X
     432  Payload                     raw         X    X     X        X
     433  Item                        master      X    X
    434434
    435435=head1 http://jabber.org/protocol/pubsub#event - items objects
     
    437437  Name                        Type       Get  Set  Remove  Defined  Add
    438438  ==========================  =========  ===  ===  ======  =======  ===
    439   Node                        scalar      X    X     X        X       
    440   Item                        child       X          X        X      X 
    441   Items                       master      X    X                       
     439  Node                        scalar      X    X     X        X
     440  Item                        child       X          X        X      X
     441  Items                       master      X    X
    442442
    443443=head1 http://jabber.org/protocol/pubsub#owner
     
    445445  Name                        Type       Get  Set  Remove  Defined  Add
    446446  ==========================  =========  ===  ===  ======  =======  ===
    447   Action                      scalar      X    X     X        X       
    448   Configure                   child       X          X        X      X 
    449   Owner                       master      X    X                       
     447  Action                      scalar      X    X     X        X
     448  Configure                   child       X          X        X      X
     449  Owner                       master      X    X
    450450
    451451=head1 http://jabber.org/protocol/pubsub#owner - configure objects
     
    453453  Name                        Type       Get  Set  Remove  Defined  Add
    454454  ==========================  =========  ===  ===  ======  =======  ===
    455   Node                        scalar      X    X     X        X       
    456   Configure                   master      X    X                       
     455  Node                        scalar      X    X     X        X
     456  Configure                   master      X    X
    457457
    458458=head1 http://jabber.org/protocol/si
     
    460460  Name                        Type       Get  Set  Remove  Defined  Add
    461461  ==========================  =========  ===  ===  ======  =======  ===
    462   ID                          scalar      X    X     X        X       
    463   MimeType                    scalar      X    X     X        X       
    464   Profile                     scalar      X    X     X        X       
    465   Stream                      master      X    X                       
     462  ID                          scalar      X    X     X        X
     463  MimeType                    scalar      X    X     X        X
     464  Profile                     scalar      X    X     X        X
     465  Stream                      master      X    X
    466466
    467467=head1 http://jabber.org/protocol/si/profile/file-transfer
     
    469469  Name                        Type       Get  Set  Remove  Defined  Add
    470470  ==========================  =========  ===  ===  ======  =======  ===
    471   Date                        scalar      X    X     X        X       
    472   Desc                        scalar      X    X     X        X       
    473   Hash                        scalar      X    X     X        X       
    474   Name                        scalar      X    X     X        X       
    475   Range                       flag        X    X     X        X       
    476   RangeLength                 scalar      X    X     X        X       
    477   RangeOffset                 scalar      X    X     X        X       
    478   Size                        scalar      X    X     X        X       
    479   File                        master      X    X                       
     471  Date                        scalar      X    X     X        X
     472  Desc                        scalar      X    X     X        X
     473  Hash                        scalar      X    X     X        X
     474  Name                        scalar      X    X     X        X
     475  Range                       flag        X    X     X        X
     476  RangeLength                 scalar      X    X     X        X
     477  RangeOffset                 scalar      X    X     X        X
     478  Size                        scalar      X    X     X        X
     479  File                        master      X    X
    480480
    481481=head1 jabber:iq:agent - DEPRECATED
     
    483483  Name                        Type       Get  Set  Remove  Defined  Add
    484484  ==========================  =========  ===  ===  ======  =======  ===
    485   Agents                      flag        X    X     X        X       
    486   Description                 scalar      X    X     X        X       
    487   GroupChat                   flag        X    X     X        X       
    488   JID                         jid         X    X     X        X       
    489   Name                        scalar      X    X     X        X       
    490   Register                    flag        X    X     X        X       
    491   Search                      flag        X    X     X        X       
    492   Service                     scalar      X    X     X        X       
    493   Transport                   scalar      X    X     X        X       
    494   URL                         scalar      X    X     X        X       
    495   Agent                       master      X    X                       
     485  Agents                      flag        X    X     X        X
     486  Description                 scalar      X    X     X        X
     487  GroupChat                   flag        X    X     X        X
     488  JID                         jid         X    X     X        X
     489  Name                        scalar      X    X     X        X
     490  Register                    flag        X    X     X        X
     491  Search                      flag        X    X     X        X
     492  Service                     scalar      X    X     X        X
     493  Transport                   scalar      X    X     X        X
     494  URL                         scalar      X    X     X        X
     495  Agent                       master      X    X
    496496
    497497=head1 jabber:iq:agents - DEPRECATED
     
    499499  Name                        Type       Get  Set  Remove  Defined  Add
    500500  ==========================  =========  ===  ===  ======  =======  ===
    501   Agent                       child                                  X 
    502   Agents                      child       X          X        X       
     501  Agent                       child                                  X
     502  Agents                      child       X          X        X
    503503
    504504=head1 jabber:iq:autoupdate
     
    506506  Name                        Type       Get  Set  Remove  Defined  Add
    507507  ==========================  =========  ===  ===  ======  =======  ===
    508   Beta                        child                                  X 
    509   Dev                         child                                  X 
    510   Release                     child                                  X 
    511   Releases                    child       X          X        X       
     508  Beta                        child                                  X
     509  Dev                         child                                  X
     510  Release                     child                                  X
     511  Releases                    child       X          X        X
    512512
    513513=head1 jabber:iq:autoupdate - release objects
     
    515515  Name                        Type       Get  Set  Remove  Defined  Add
    516516  ==========================  =========  ===  ===  ======  =======  ===
    517   Desc                        scalar      X    X     X        X       
    518   Priority                    scalar      X    X     X        X       
    519   URL                         scalar      X    X     X        X       
    520   Version                     scalar      X    X     X        X       
    521   Release                     master      X    X                       
     517  Desc                        scalar      X    X     X        X
     518  Priority                    scalar      X    X     X        X
     519  URL                         scalar      X    X     X        X
     520  Version                     scalar      X    X     X        X
     521  Release                     master      X    X
    522522
    523523=head1 jabber:iq:browse - DEPRECATED
     
    525525  Name                        Type       Get  Set  Remove  Defined  Add
    526526  ==========================  =========  ===  ===  ======  =======  ===
    527   Category                    scalar      X    X     X        X       
    528   JID                         jid         X    X     X        X       
    529   NS                          array       X    X     X        X       
    530   Name                        scalar      X    X     X        X       
    531   Type                        scalar      X    X     X        X       
    532   Item                        child                                  X 
    533   Items                       child       X          X        X       
    534   Browse                      master      X    X                       
     527  Category                    scalar      X    X     X        X
     528  JID                         jid         X    X     X        X
     529  NS                          array       X    X     X        X
     530  Name                        scalar      X    X     X        X
     531  Type                        scalar      X    X     X        X
     532  Item                        child                                  X
     533  Items                       child       X          X        X
     534  Browse                      master      X    X
    535535
    536536=head1 jabber:iq:browse - item objects - DEPRECATED
     
    538538  Name                        Type       Get  Set  Remove  Defined  Add
    539539  ==========================  =========  ===  ===  ======  =======  ===
    540   Category                    scalar      X    X     X        X       
    541   JID                         jid         X    X     X        X       
    542   NS                          array       X    X     X        X       
    543   Name                        scalar      X    X     X        X       
    544   Type                        scalar      X    X     X        X       
    545   Item                        child                                  X 
    546   Items                       child       X          X        X       
    547   Browse                      master      X    X                       
     540  Category                    scalar      X    X     X        X
     541  JID                         jid         X    X     X        X
     542  NS                          array       X    X     X        X
     543  Name                        scalar      X    X     X        X
     544  Type                        scalar      X    X     X        X
     545  Item                        child                                  X
     546  Items                       child       X          X        X
     547  Browse                      master      X    X
    548548
    549549=head1 jabber:iq:conference
     
    551551  Name                        Type       Get  Set  Remove  Defined  Add
    552552  ==========================  =========  ===  ===  ======  =======  ===
    553   ID                          scalar      X    X     X        X       
    554   Name                        scalar      X    X     X        X       
    555   Nick                        scalar      X    X     X        X       
    556   Privacy                     flag        X    X     X        X       
    557   Secret                      scalar      X    X     X        X       
    558   Conference                  master      X    X                       
     553  ID                          scalar      X    X     X        X
     554  Name                        scalar      X    X     X        X
     555  Nick                        scalar      X    X     X        X
     556  Privacy                     flag        X    X     X        X
     557  Secret                      scalar      X    X     X        X
     558  Conference                  master      X    X
    559559
    560560=head1 jabber:iq:filter - DEPRECATED
     
    562562  Name                        Type       Get  Set  Remove  Defined  Add
    563563  ==========================  =========  ===  ===  ======  =======  ===
    564   Rule                        child                                  X 
    565   Rules                       child       X          X        X       
     564  Rule                        child                                  X
     565  Rules                       child       X          X        X
    566566
    567567=head1 jabber:iq:filter - rule objects - DEPRECATED
     
    569569  Name                        Type       Get  Set  Remove  Defined  Add
    570570  ==========================  =========  ===  ===  ======  =======  ===
    571   Body                        scalar      X    X     X        X       
    572   Continued                   scalar      X    X     X        X       
    573   Drop                        scalar      X    X     X        X       
    574   Edit                        scalar      X    X     X        X       
    575   Error                       scalar      X    X     X        X       
    576   From                        scalar      X    X     X        X       
    577   Offline                     scalar      X    X     X        X       
    578   Reply                       scalar      X    X     X        X       
    579   Resource                    scalar      X    X     X        X       
    580   Show                        scalar      X    X     X        X       
    581   Size                        scalar      X    X     X        X       
    582   Subject                     scalar      X    X     X        X       
    583   Time                        scalar      X    X     X        X       
    584   Type                        scalar      X    X     X        X       
    585   Unavailable                 scalar      X    X     X        X       
    586   Rule                        master      X    X                       
     571  Body                        scalar      X    X     X        X
     572  Continued                   scalar      X    X     X        X
     573  Drop                        scalar      X    X     X        X
     574  Edit                        scalar      X    X     X        X
     575  Error                       scalar      X    X     X        X
     576  From                        scalar      X    X     X        X
     577  Offline                     scalar      X    X     X        X
     578  Reply                       scalar      X    X     X        X
     579  Resource                    scalar      X    X     X        X
     580  Show                        scalar      X    X     X        X
     581  Size                        scalar      X    X     X        X
     582  Subject                     scalar      X    X     X        X
     583  Time                        scalar      X    X     X        X
     584  Type                        scalar      X    X     X        X
     585  Unavailable                 scalar      X    X     X        X
     586  Rule                        master      X    X
    587587
    588588=head1 jabber:iq:gateway
     
    590590  Name                        Type       Get  Set  Remove  Defined  Add
    591591  ==========================  =========  ===  ===  ======  =======  ===
    592   Desc                        scalar      X    X     X        X       
    593   JID                         jid         X    X     X        X       
    594   Prompt                      scalar      X    X     X        X       
    595   Gateway                     master      X    X                       
     592  Desc                        scalar      X    X     X        X
     593  JID                         jid         X    X     X        X
     594  Prompt                      scalar      X    X     X        X
     595  Gateway                     master      X    X
    596596
    597597=head1 jabber:iq:last
     
    599599  Name                        Type       Get  Set  Remove  Defined  Add
    600600  ==========================  =========  ===  ===  ======  =======  ===
    601   Message                     scalar      X    X     X        X       
    602   Seconds                     scalar      X    X     X        X       
    603   Last                        master      X    X                       
     601  Message                     scalar      X    X     X        X
     602  Seconds                     scalar      X    X     X        X
     603  Last                        master      X    X
    604604
    605605=head1 jabber:iq:oob
     
    607607  Name                        Type       Get  Set  Remove  Defined  Add
    608608  ==========================  =========  ===  ===  ======  =======  ===
    609   Desc                        scalar      X    X     X        X       
    610   URL                         scalar      X    X     X        X       
    611   Oob                         master      X    X                       
     609  Desc                        scalar      X    X     X        X
     610  URL                         scalar      X    X     X        X
     611  Oob                         master      X    X
    612612
    613613=head1 jabber:iq:pass
     
    615615  Name                        Type       Get  Set  Remove  Defined  Add
    616616  ==========================  =========  ===  ===  ======  =======  ===
    617   Client                      scalar      X    X     X        X       
    618   ClientPort                  scalar      X    X     X        X       
    619   Close                       flag        X    X     X        X       
    620   Expire                      scalar      X    X     X        X       
    621   OneShot                     flag        X    X     X        X       
    622   Proxy                       scalar      X    X     X        X       
    623   ProxyPort                   scalar      X    X     X        X       
    624   Server                      scalar      X    X     X        X       
    625   ServerPort                  scalar      X    X     X        X       
    626   Pass                        master      X    X                       
     617  Client                      scalar      X    X     X        X
     618  ClientPort                  scalar      X    X     X        X
     619  Close                       flag        X    X     X        X
     620  Expire                      scalar      X    X     X        X
     621  OneShot                     flag        X    X     X        X
     622  Proxy                       scalar      X    X     X        X
     623  ProxyPort                   scalar      X    X     X        X
     624  Server                      scalar      X    X     X        X
     625  ServerPort                  scalar      X    X     X        X
     626  Pass                        master      X    X
    627627
    628628=head1 jabber:iq:rpc
     
    630630  Name                        Type       Get  Set  Remove  Defined  Add
    631631  ==========================  =========  ===  ===  ======  =======  ===
    632   MethodCall                  child       X          X        X      X 
    633   MethodResponse              child       X          X        X      X 
     632  MethodCall                  child       X          X        X      X
     633  MethodResponse              child       X          X        X      X
    634634
    635635=head1 jabber:iq:rpc - array objects
     
    637637  Name                        Type       Get  Set  Remove  Defined  Add
    638638  ==========================  =========  ===  ===  ======  =======  ===
    639   Data                        child                                  X 
    640   Datas                       child       X          X        X       
     639  Data                        child                                  X
     640  Datas                       child       X          X        X
    641641
    642642=head1 jabber:iq:rpc - data objects
     
    644644  Name                        Type       Get  Set  Remove  Defined  Add
    645645  ==========================  =========  ===  ===  ======  =======  ===
    646   Value                       child       X          X        X      X 
     646  Value                       child       X          X        X      X
    647647
    648648=head1 jabber:iq:rpc - fault objects
     
    650650  Name                        Type       Get  Set  Remove  Defined  Add
    651651  ==========================  =========  ===  ===  ======  =======  ===
    652   Value                       child       X          X        X      X 
     652  Value                       child       X          X        X      X
    653653
    654654=head1 jabber:iq:rpc - member objects
     
    656656  Name                        Type       Get  Set  Remove  Defined  Add
    657657  ==========================  =========  ===  ===  ======  =======  ===
    658   Name                        scalar      X    X     X        X       
    659   Value                       child       X          X        X      X 
    660   Member                      master      X    X                       
     658  Name                        scalar      X    X     X        X
     659  Value                       child       X          X        X      X
     660  Member                      master      X    X
    661661
    662662=head1 jabber:iq:rpc - methodCall objects
     
    664664  Name                        Type       Get  Set  Remove  Defined  Add
    665665  ==========================  =========  ===  ===  ======  =======  ===
    666   MethodName                  scalar      X    X     X        X       
    667   Params                      child       X          X        X      X 
    668   MethodCall                  master      X    X                       
     666  MethodName                  scalar      X    X     X        X
     667  Params                      child       X          X        X      X
     668  MethodCall                  master      X    X
    669669
    670670=head1 jabber:iq:rpc - methodResponse objects
     
    672672  Name                        Type       Get  Set  Remove  Defined  Add
    673673  ==========================  =========  ===  ===  ======  =======  ===
    674   Fault                       child       X          X        X      X 
    675   Params                      child       X          X        X      X 
     674  Fault                       child       X          X        X      X
     675  Params                      child       X          X        X      X
    676676
    677677=head1 jabber:iq:rpc - param objects
     
    679679  Name                        Type       Get  Set  Remove  Defined  Add
    680680  ==========================  =========  ===  ===  ======  =======  ===
    681   Value                       child       X          X        X      X 
     681  Value                       child       X          X        X      X
    682682
    683683=head1 jabber:iq:rpc - params objects
     
    685685  Name                        Type       Get  Set  Remove  Defined  Add
    686686  ==========================  =========  ===  ===  ======  =======  ===
    687   Param                       child                                  X 
    688   Params                      child       X          X        X       
     687  Param                       child                                  X
     688  Params                      child       X          X        X
    689689
    690690=head1 jabber:iq:rpc - struct objects
     
    692692  Name                        Type       Get  Set  Remove  Defined  Add
    693693  ==========================  =========  ===  ===  ======  =======  ===
    694   Member                      child                                  X 
    695   Members                     child       X          X        X       
     694  Member                      child                                  X
     695  Members                     child       X          X        X
    696696
    697697=head1 jabber:iq:rpc - value objects
     
    699699  Name                        Type       Get  Set  Remove  Defined  Add
    700700  ==========================  =========  ===  ===  ======  =======  ===
    701   Base64                      scalar      X    X     X        X       
    702   Boolean                     scalar      X    X     X        X       
    703   DateTime                    scalar      X    X     X        X       
    704   Double                      scalar      X    X     X        X       
    705   I4                          scalar      X    X     X        X       
    706   Int                         scalar      X    X     X        X       
    707   String                      scalar      X    X     X        X       
    708   Value                       scalar      X    X     X        X       
    709   Array                       child       X          X        X      X 
    710   Struct                      child       X          X        X      X 
    711   RPCValue                    master      X    X                       
     701  Base64                      scalar      X    X     X        X
     702  Boolean                     scalar      X    X     X        X
     703  DateTime                    scalar      X    X     X        X
     704  Double                      scalar      X    X     X        X
     705  I4                          scalar      X    X     X        X
     706  Int                         scalar      X    X     X        X
     707  String                      scalar      X    X     X        X
     708  Value                       scalar      X    X     X        X
     709  Array                       child       X          X        X      X
     710  Struct                      child       X          X        X      X
     711  RPCValue                    master      X    X
    712712
    713713=head1 jabber:iq:search
     
    715715  Name                        Type       Get  Set  Remove  Defined  Add
    716716  ==========================  =========  ===  ===  ======  =======  ===
    717   Email                       scalar      X    X     X        X       
    718   Family                      scalar      X    X     X        X       
    719   First                       scalar      X    X     X        X       
    720   Given                       scalar      X    X     X        X       
    721   Instructions                scalar      X    X     X        X       
    722   Key                         scalar      X    X     X        X       
    723   Last                        scalar      X    X     X        X       
    724   Name                        scalar      X    X     X        X       
    725   Nick                        scalar      X    X     X        X       
    726   Truncated                   flag        X    X     X        X       
    727   Item                        child                                  X 
    728   Items                       child       X          X        X       
    729   Search                      master      X    X                       
     717  Email                       scalar      X    X     X        X
     718  Family                      scalar      X    X     X        X
     719  First                       scalar      X    X     X        X
     720  Given                       scalar      X    X     X        X
     721  Instructions                scalar      X    X     X        X
     722  Key                         scalar      X    X     X        X
     723  Last                        scalar      X    X     X        X
     724  Name                        scalar      X    X     X        X
     725  Nick                        scalar      X    X     X        X
     726  Truncated                   flag        X    X     X        X
     727  Item                        child                                  X
     728  Items                       child       X          X        X
     729  Search                      master      X    X
    730730
    731731=head1 jabber:iq:search - item objects
     
    733733  Name                        Type       Get  Set  Remove  Defined  Add
    734734  ==========================  =========  ===  ===  ======  =======  ===
    735   Email                       scalar      X    X     X        X       
    736   Family                      scalar      X    X     X        X       
    737   First                       scalar      X    X     X        X       
    738   Given                       scalar      X    X     X        X       
    739   JID                         jid         X    X     X        X       
    740   Key                         scalar      X    X     X        X       
    741   Last                        scalar      X    X     X        X       
    742   Name                        scalar      X    X     X        X       
    743   Nick                        scalar      X    X     X        X       
    744   Item                        master      X    X                       
     735  Email                       scalar      X    X     X        X
     736  Family                      scalar      X    X     X        X
     737  First                       scalar      X    X     X        X
     738  Given                       scalar      X    X     X        X
     739  JID                         jid         X    X     X        X
     740  Key                         scalar      X    X     X        X
     741  Last                        scalar      X    X     X        X
     742  Name                        scalar      X    X     X        X
     743  Nick                        scalar      X    X     X        X
     744  Item                        master      X    X
    745745
    746746=head1 jabber:iq:time
     
    748748  Name                        Type       Get  Set  Remove  Defined  Add
    749749  ==========================  =========  ===  ===  ======  =======  ===
    750   Display                     special     X    X     X        X       
    751   TZ                          special     X    X     X        X       
    752   UTC                         special     X    X     X        X       
    753   Time                        master      X    X                       
     750  Display                     special     X    X     X        X
     751  TZ                          special     X    X     X        X
     752  UTC                         special     X    X     X        X
     753  Time                        master      X    X
    754754
    755755=head1 jabber:iq:version
     
    757757  Name                        Type       Get  Set  Remove  Defined  Add
    758758  ==========================  =========  ===  ===  ======  =======  ===
    759   Name                        scalar      X    X     X        X       
    760   OS                          special     X    X     X        X       
    761   Ver                         special     X    X     X        X       
    762   Version                     master      X    X                       
     759  Name                        scalar      X    X     X        X
     760  OS                          special     X    X     X        X
     761  Ver                         special     X    X     X        X
     762  Version                     master      X    X
    763763
    764764=head1 jabber:x:autoupdate
     
    766766  Name                        Type       Get  Set  Remove  Defined  Add
    767767  ==========================  =========  ===  ===  ======  =======  ===
    768   JID                         jid         X    X     X        X       
    769   Autoupdate                  master      X    X                       
     768  JID                         jid         X    X     X        X
     769  Autoupdate                  master      X    X
    770770
    771771=head1 jabber:x:conference
     
    773773  Name                        Type       Get  Set  Remove  Defined  Add
    774774  ==========================  =========  ===  ===  ======  =======  ===
    775   JID                         jid         X    X     X        X       
    776   Conference                  master      X    X                       
     775  JID                         jid         X    X     X        X
     776  Conference                  master      X    X
    777777
    778778=head1 jabber:x:data
     
    780780  Name                        Type       Get  Set  Remove  Defined  Add
    781781  ==========================  =========  ===  ===  ======  =======  ===
    782   Form                        scalar      X    X     X        X       
    783   Instructions                scalar      X    X     X        X       
    784   Title                       scalar      X    X     X        X       
    785   Type                        scalar      X    X     X        X       
    786   Field                       child                                  X 
    787   Fields                      child       X          X        X       
    788   Item                        child                                  X 
    789   Items                       child       X          X        X       
    790   Reported                    child       X          X        X      X 
    791   Data                        master      X    X                       
     782  Form                        scalar      X    X     X        X
     783  Instructions                scalar      X    X     X        X
     784  Title                       scalar      X    X     X        X
     785  Type                        scalar      X    X     X        X
     786  Field                       child                                  X
     787  Fields                      child       X          X        X
     788  Item                        child                                  X
     789  Items                       child       X          X        X
     790  Reported                    child       X          X        X      X
     791  Data                        master      X    X
    792792
    793793=head1 jabber:x:data - field objects
     
    795795  Name                        Type       Get  Set  Remove  Defined  Add
    796796  ==========================  =========  ===  ===  ======  =======  ===
    797   Desc                        scalar      X    X     X        X       
    798   Label                       scalar      X    X     X        X       
    799   Required                    flag        X    X     X        X       
    800   Type                        scalar      X    X     X        X       
    801   Value                       array       X    X     X        X       
    802   Var                         scalar      X    X     X        X       
    803   Option                      child                                  X 
    804   Options                     child       X          X        X       
    805   Field                       master      X    X                       
     797  Desc                        scalar      X    X     X        X
     798  Label                       scalar      X    X     X        X
     799  Required                    flag        X    X     X        X
     800  Type                        scalar      X    X     X        X
     801  Value                       array       X    X     X        X
     802  Var                         scalar      X    X     X        X
     803  Option                      child                                  X
     804  Options                     child       X          X        X
     805  Field                       master      X    X
    806806
    807807=head1 jabber:x:data - item objects
     
    809809  Name                        Type       Get  Set  Remove  Defined  Add
    810810  ==========================  =========  ===  ===  ======  =======  ===
    811   Field                       child                                  X 
    812   Fields                      child       X          X        X       
    813   Item                        master      X    X                       
     811  Field                       child                                  X
     812  Fields                      child       X          X        X
     813  Item                        master      X    X
    814814
    815815=head1 jabber:x:data - option objects
     
    817817  Name                        Type       Get  Set  Remove  Defined  Add
    818818  ==========================  =========  ===  ===  ======  =======  ===
    819   Label                       scalar      X    X     X        X       
    820   Value                       scalar      X    X     X        X       
    821   Option                      master      X    X                       
     819  Label                       scalar      X    X     X        X
     820  Value                       scalar      X    X     X        X
     821  Option                      master      X    X
    822822
    823823=head1 jabber:x:data - reported objects
     
    825825  Name                        Type       Get  Set  Remove  Defined  Add
    826826  ==========================  =========  ===  ===  ======  =======  ===
    827   Field                       child                                  X 
    828   Fields                      child       X          X        X       
    829   Reported                    master      X    X                       
     827  Field                       child                                  X
     828  Fields                      child       X          X        X
     829  Reported                    master      X    X
    830830
    831831=head1 jabber:x:delay
     
    833833  Name                        Type       Get  Set  Remove  Defined  Add
    834834  ==========================  =========  ===  ===  ======  =======  ===
    835   From                        jid         X    X     X        X       
    836   Message                     scalar      X    X     X        X       
    837   Stamp                       timestamp   X    X     X        X       
    838   Delay                       master      X    X                       
     835  From                        jid         X    X     X        X
     836  Message                     scalar      X    X     X        X
     837  Stamp                       timestamp   X    X     X        X
     838  Delay                       master      X    X
    839839
    840840=head1 jabber:x:encrypted
     
    842842  Name                        Type       Get  Set  Remove  Defined  Add
    843843  ==========================  =========  ===  ===  ======  =======  ===
    844   Message                     scalar      X    X     X        X       
    845   Encrypted                   master      X    X                       
     844  Message                     scalar      X    X     X        X
     845  Encrypted                   master      X    X
    846846
    847847=head1 jabber:x:event
     
    849849  Name                        Type       Get  Set  Remove  Defined  Add
    850850  ==========================  =========  ===  ===  ======  =======  ===
    851   Composing                   flag        X    X     X        X       
    852   Delivered                   flag        X    X     X        X       
    853   Displayed                   flag        X    X     X        X       
    854   ID                          scalar      X    X     X        X       
    855   Offline                     flag        X    X     X        X       
    856   Event                       master      X    X                       
     851  Composing                   flag        X    X     X        X
     852  Delivered                   flag        X    X     X        X
     853  Displayed                   flag        X    X     X        X
     854  ID                          scalar      X    X     X        X
     855  Offline                     flag        X    X     X        X
     856  Event                       master      X    X
    857857
    858858=head1 jabber:x:expire
     
    860860  Name                        Type       Get  Set  Remove  Defined  Add
    861861  ==========================  =========  ===  ===  ======  =======  ===
    862   Seconds                     scalar      X    X     X        X       
    863   Expire                      master      X    X                       
     862  Seconds                     scalar      X    X     X        X
     863  Expire                      master      X    X
    864864
    865865=head1 jabber:x:oob
     
    867867  Name                        Type       Get  Set  Remove  Defined  Add
    868868  ==========================  =========  ===  ===  ======  =======  ===
    869   Desc                        scalar      X    X     X        X       
    870   URL                         scalar      X    X     X        X       
    871   Oob                         master      X    X                       
     869  Desc                        scalar      X    X     X        X
     870  URL                         scalar      X    X     X        X
     871  Oob                         master      X    X
    872872
    873873=head1 jabber:x:roster
     
    875875  Name                        Type       Get  Set  Remove  Defined  Add
    876876  ==========================  =========  ===  ===  ======  =======  ===
    877   Item                        child                                  X 
    878   Items                       child       X          X        X       
    879   Roster                      master      X    X                       
     877  Item                        child                                  X
     878  Items                       child       X          X        X
     879  Roster                      master      X    X
    880880
    881881=head1 jabber:x:roster - item objects
     
    883883  Name                        Type       Get  Set  Remove  Defined  Add
    884884  ==========================  =========  ===  ===  ======  =======  ===
    885   Ask                         scalar      X    X     X        X       
    886   Group                       array       X    X     X        X       
    887   JID                         jid         X    X     X        X       
    888   Name                        scalar      X    X     X        X       
    889   Subscription                scalar      X    X     X        X       
    890   Item                        master      X    X                       
     885  Ask                         scalar      X    X     X        X
     886  Group                       array       X    X     X        X
     887  JID                         jid         X    X     X        X
     888  Name                        scalar      X    X     X        X
     889  Subscription                scalar      X    X     X        X
     890  Item                        master      X    X
    891891
    892892=head1 jabber:x:signed
     
    894894  Name                        Type       Get  Set  Remove  Defined  Add
    895895  ==========================  =========  ===  ===  ======  =======  ===
    896   Signature                   scalar      X    X     X        X       
    897   Signed                      master      X    X                       
     896  Signature                   scalar      X    X     X        X
     897  Signed                      master      X    X
    898898
    899899# DOC_BEGIN
     
    902902  Name                        Type       Get  Set  Remove  Defined  Add
    903903  ==========================  =========  ===  ===  ======  =======  ===
    904   Activate                    scalar      X    X     X        X       
    905   SID                         scalar      X    X     X        X       
    906   StreamHostUsedJID           jid         X    X     X        X       
    907   StreamHost                  child                                  X 
    908   StreamHosts                 child       X          X        X       
    909   ByteStreams                 master      X    X                       
     904  Activate                    scalar      X    X     X        X
     905  SID                         scalar      X    X     X        X
     906  StreamHostUsedJID           jid         X    X     X        X
     907  StreamHost                  child                                  X
     908  StreamHosts                 child       X          X        X
     909  ByteStreams                 master      X    X
    910910
    911911=head1 http://jabber.org/protocol/bytestreams - streamhost objects
     
    913913  Name                        Type       Get  Set  Remove  Defined  Add
    914914  ==========================  =========  ===  ===  ======  =======  ===
    915   Host                        scalar      X    X     X        X       
    916   JID                         jid         X    X     X        X       
    917   Port                        scalar      X    X     X        X       
    918   ZeroConf                    scalar      X    X     X        X       
    919   StreamHost                  master      X    X                       
     915  Host                        scalar      X    X     X        X
     916  JID                         jid         X    X     X        X
     917  Port                        scalar      X    X     X        X
     918  ZeroConf                    scalar      X    X     X        X
     919  StreamHost                  master      X    X
    920920
    921921=head1 http://jabber.org/protocol/commands
     
    923923  Name                        Type       Get  Set  Remove  Defined  Add
    924924  ==========================  =========  ===  ===  ======  =======  ===
    925   Action                      scalar      X    X     X        X       
    926   Node                        scalar      X    X     X        X       
    927   SessionID                   scalar      X    X     X        X       
    928   Status                      scalar      X    X     X        X       
    929   Note                        child                                  X 
    930   Notes                       child       X          X        X       
    931   Command                     master      X    X                       
     925  Action                      scalar      X    X     X        X
     926  Node                        scalar      X    X     X        X
     927  SessionID                   scalar      X    X     X        X
     928  Status                      scalar      X    X     X        X
     929  Note                        child                                  X
     930  Notes                       child       X          X        X
     931  Command                     master      X    X
    932932
    933933=head1 http://jabber.org/protocol/commands - note objects
     
    935935  Name                        Type       Get  Set  Remove  Defined  Add
    936936  ==========================  =========  ===  ===  ======  =======  ===
    937   Message                     scalar      X    X     X        X       
    938   Type                        scalar      X    X     X        X       
    939   Note                        master      X    X                       
     937  Message                     scalar      X    X     X        X
     938  Type                        scalar      X    X     X        X
     939  Note                        master      X    X
    940940
    941941=head1 http://jabber.org/protocol/disco#info
     
    943943  Name                        Type       Get  Set  Remove  Defined  Add
    944944  ==========================  =========  ===  ===  ======  =======  ===
    945   Node                        scalar      X    X     X        X       
    946   Feature                     child                                  X 
    947   Features                    child       X          X        X       
    948   Identities                  child       X          X        X       
    949   Identity                    child                                  X 
    950   DiscoInfo                   master      X    X                       
     945  Node                        scalar      X    X     X        X
     946  Feature                     child                                  X
     947  Features                    child       X          X        X
     948  Identities                  child       X          X        X
     949  Identity                    child                                  X
     950  DiscoInfo                   master      X    X
    951951
    952952=head1 http://jabber.org/protocol/disco#info - feature objects
     
    954954  Name                        Type       Get  Set  Remove  Defined  Add
    955955  ==========================  =========  ===  ===  ======  =======  ===
    956   Var                         scalar      X    X     X        X       
    957   Feature                     master      X    X                       
     956  Var                         scalar      X    X     X        X
     957  Feature                     master      X    X
    958958
    959959=head1 http://jabber.org/protocol/disco#info - identity objects
     
    961961  Name                        Type       Get  Set  Remove  Defined  Add
    962962  ==========================  =========  ===  ===  ======  =======  ===
    963   Category                    scalar      X    X     X        X       
    964   Name                        scalar      X    X     X        X       
    965   Type                        scalar      X    X     X        X       
    966   Identity                    master      X    X                       
     963  Category                    scalar      X    X     X        X
     964  Name                        scalar      X    X     X        X
     965  Type                        scalar      X    X     X        X
     966  Identity                    master      X    X
    967967
    968968=head1 http://jabber.org/protocol/disco#items
     
    970970  Name                        Type       Get  Set  Remove  Defined  Add
    971971  ==========================  =========  ===  ===  ======  =======  ===
    972   Node                        scalar      X    X     X        X       
    973   Item                        child                                  X 
    974   Items                       child       X          X        X       
    975   DiscoItems                  master      X    X                       
     972  Node                        scalar      X    X     X        X
     973  Item                        child                                  X
     974  Items                       child       X          X        X
     975  DiscoItems                  master      X    X
    976976
    977977=head1 http://jabber.org/protocol/disco#items - item objects
     
    979979  Name                        Type       Get  Set  Remove  Defined  Add
    980980  ==========================  =========  ===  ===  ======  =======  ===
    981   Action                      scalar      X    X     X        X       
    982   JID                         jid         X    X     X        X       
    983   Name                        scalar      X    X     X        X       
    984   Node                        scalar      X    X     X        X       
    985   Item                        master      X    X                       
     981  Action                      scalar      X    X     X        X
     982  JID                         jid         X    X     X        X
     983  Name                        scalar      X    X     X        X
     984  Node                        scalar      X    X     X        X
     985  Item                        master      X    X
    986986
    987987=head1 http://jabber.org/protocol/feature-neg
     
    989989  Name                        Type       Get  Set  Remove  Defined  Add
    990990  ==========================  =========  ===  ===  ======  =======  ===
    991   FeatureNeg                  master      X    X                       
     991  FeatureNeg                  master      X    X
    992992
    993993=head1 http://jabber.org/protocol/muc
     
    995995  Name                        Type       Get  Set  Remove  Defined  Add
    996996  ==========================  =========  ===  ===  ======  =======  ===
    997   Password                    scalar      X    X     X        X       
    998   MUC                         master      X    X                       
     997  Password                    scalar      X    X     X        X
     998  MUC                         master      X    X
    999999
    10001000=head1 http://jabber.org/protocol/muc#admin
     
    10021002  Name                        Type       Get  Set  Remove  Defined  Add
    10031003  ==========================  =========  ===  ===  ======  =======  ===
    1004   Item                        child                                  X 
    1005   Items                       child       X          X        X       
    1006   Admin                       master      X    X                       
     1004  Item                        child                                  X
     1005  Items                       child       X          X        X
     1006  Admin                       master      X    X
    10071007
    10081008=head1 http://jabber.org/protocol/muc#admin - item objects
     
    10101010  Name                        Type       Get  Set  Remove  Defined  Add
    10111011  ==========================  =========  ===  ===  ======  =======  ===
    1012   ActorJID                    jid         X    X     X        X       
    1013   Affiliation                 scalar      X    X     X        X       
    1014   JID                         jid         X    X     X        X       
    1015   Nick                        scalar      X    X     X        X       
    1016   Reason                      scalar      X    X     X        X       
    1017   Role                        scalar      X    X     X        X       
    1018   Item                        master      X    X                       
     1012  ActorJID                    jid         X    X     X        X
     1013  Affiliation                 scalar      X    X     X        X
     1014  JID                         jid         X    X     X        X
     1015  Nick                        scalar      X    X     X        X
     1016  Reason                      scalar      X    X     X        X
     1017  Role                        scalar      X    X     X        X
     1018  Item                        master      X    X
    10191019
    10201020=head1 http://jabber.org/protocol/muc#user
     
    10221022  Name                        Type       Get  Set  Remove  Defined  Add
    10231023  ==========================  =========  ===  ===  ======  =======  ===
    1024   Alt                         scalar      X    X     X        X       
    1025   Password                    scalar      X    X     X        X       
    1026   StatusCode                  scalar      X    X     X        X       
    1027   Invite                      child       X          X        X      X 
    1028   Item                        child       X          X        X      X 
    1029   User                        master      X    X                       
     1024  Alt                         scalar      X    X     X        X
     1025  Password                    scalar      X    X     X        X
     1026  StatusCode                  scalar      X    X     X        X
     1027  Invite                      child       X          X        X      X
     1028  Item                        child       X          X        X      X
     1029  User                        master      X    X
    10301030
    10311031=head1 http://jabber.org/protocol/muc#user - invite objects
     
    10331033  Name                        Type       Get  Set  Remove  Defined  Add
    10341034  ==========================  =========  ===  ===  ======  =======  ===
    1035   From                        jid         X    X     X        X       
    1036   Reason                      scalar      X    X     X        X       
    1037   To                          jid         X    X     X        X       
    1038   Invite                      master      X    X                       
     1035  From                        jid         X    X     X        X
     1036  Reason                      scalar      X    X     X        X
     1037  To                          jid         X    X     X        X
     1038  Invite                      master      X    X
    10391039
    10401040=head1 http://jabber.org/protocol/muc#user - item objects
     
    10421042  Name                        Type       Get  Set  Remove  Defined  Add
    10431043  ==========================  =========  ===  ===  ======  =======  ===
    1044   ActorJID                    jid         X    X     X        X       
    1045   Affiliation                 scalar      X    X     X        X       
    1046   JID                         jid         X    X     X        X       
    1047   Nick                        scalar      X    X     X        X       
    1048   Reason                      scalar      X    X     X        X       
    1049   Role                        scalar      X    X     X        X       
    1050   Item                        master      X    X                       
     1044  ActorJID                    jid         X    X     X        X
     1045  Affiliation                 scalar      X    X     X        X
     1046  JID                         jid         X    X     X        X
     1047  Nick                        scalar      X    X     X        X
     1048  Reason                      scalar      X    X     X        X
     1049  Role                        scalar      X    X     X        X
     1050  Item                        master      X    X
    10511051
    10521052=head1 http://jabber.org/protocol/pubsub
     
    10541054  Name                        Type       Get  Set  Remove  Defined  Add
    10551055  ==========================  =========  ===  ===  ======  =======  ===
    1056   Affiliations                child       X          X        X      X 
    1057   Configure                   child       X          X        X      X 
    1058   Create                      child       X          X        X      X 
    1059   Delete                      child       X          X        X      X 
    1060   Entities                    child       X          X        X      X 
    1061   Entity                      child       X          X        X      X 
    1062   Item                        child       X          X        X      X 
    1063   Items                       child       X          X        X      X 
    1064   Options                     child       X          X        X      X 
    1065   Publish                     child       X          X        X      X 
    1066   Purge                       child       X          X        X      X 
    1067   Retract                     child       X          X        X      X 
    1068   Subscribe                   child       X          X        X      X 
    1069   Unsubscribe                 child       X          X        X      X 
    1070   PubSub                      master      X    X                       
     1056  Affiliations                child       X          X        X      X
     1057  Configure                   child       X          X        X      X
     1058  Create                      child       X          X        X      X
     1059  Delete                      child       X          X        X      X
     1060  Entities                    child       X          X        X      X
     1061  Entity                      child       X          X        X      X
     1062  Item                        child       X          X        X      X
     1063  Items                       child       X          X        X      X
     1064  Options                     child       X          X        X      X
     1065  Publish                     child       X          X        X      X
     1066  Purge                       child       X          X        X      X
     1067  Retract                     child       X          X        X      X
     1068  Subscribe                   child       X          X        X      X
     1069  Unsubscribe                 child       X          X        X      X
     1070  PubSub                      master      X    X
    10711071
    10721072=head1 http://jabber.org/protocol/pubsub - affiliations objects
     
    10741074  Name                        Type       Get  Set  Remove  Defined  Add
    10751075  ==========================  =========  ===  ===  ======  =======  ===
    1076   Entity                      child       X          X        X      X 
    1077   Affiliations                master      X    X                       
     1076  Entity                      child       X          X        X      X
     1077  Affiliations                master      X    X
    10781078
    10791079=head1 http://jabber.org/protocol/pubsub - configure objects
     
    10811081  Name                        Type       Get  Set  Remove  Defined  Add
    10821082  ==========================  =========  ===  ===  ======  =======  ===
    1083   Node                        scalar      X    X     X        X       
    1084   Configure                   master      X    X                       
     1083  Node                        scalar      X    X     X        X
     1084  Configure                   master      X    X
    10851085
    10861086=head1 http://jabber.org/protocol/pubsub - create objects
     
    10881088  Name                        Type       Get  Set  Remove  Defined  Add
    10891089  ==========================  =========  ===  ===  ======  =======  ===
    1090   Node                        scalar      X    X     X        X       
    1091   Create                      master      X    X                       
     1090  Node                        scalar      X    X     X        X
     1091  Create                      master      X    X
    10921092
    10931093=head1 http://jabber.org/protocol/pubsub - delete objects
     
    10951095  Name                        Type       Get  Set  Remove  Defined  Add
    10961096  ==========================  =========  ===  ===  ======  =======  ===
    1097   Node                        scalar      X    X     X        X       
    1098   Delete                      master      X    X                       
     1097  Node                        scalar      X    X     X        X
     1098  Delete                      master      X    X
    10991099
    11001100=head1 http://jabber.org/protocol/pubsub - entities objects
     
    11021102  Name                        Type       Get  Set  Remove  Defined  Add
    11031103  ==========================  =========  ===  ===  ======  =======  ===
    1104   Entity                      child       X          X        X      X 
    1105   Entities                    master      X    X                       
     1104  Entity                      child       X          X        X      X
     1105  Entities                    master      X    X
    11061106
    11071107=head1 http://jabber.org/protocol/pubsub - entity objects
     
    11091109  Name                        Type       Get  Set  Remove  Defined  Add
    11101110  ==========================  =========  ===  ===  ======  =======  ===
    1111   Affiliation                 scalar      X    X     X        X       
    1112   JID                         jid         X    X     X        X       
    1113   Node                        scalar      X    X     X        X       
    1114   Subscription                scalar      X    X     X        X       
    1115   SubscribeOptions            child       X          X        X      X 
    1116   Entity                      master      X    X                       
     1111  Affiliation                 scalar      X    X     X        X
     1112  JID                         jid         X    X     X        X
     1113  Node                        scalar      X    X     X        X
     1114  Subscription                scalar      X    X     X        X
     1115  SubscribeOptions            child       X          X        X      X
     1116  Entity                      master      X    X
    11171117
    11181118=head1 http://jabber.org/protocol/pubsub - item objects
     
    11201120  Name                        Type       Get  Set  Remove  Defined  Add
    11211121  ==========================  =========  ===  ===  ======  =======  ===
    1122   ID                          scalar      X    X     X        X       
    1123   Payload                     raw         X    X     X        X       
    1124   Item                        master      X    X                       
     1122  ID                          scalar      X    X     X        X
     1123  Payload                     raw         X    X     X        X
     1124  Item                        master      X    X
    11251125
    11261126=head1 http://jabber.org/protocol/pubsub - items objects
     
    11281128  Name                        Type       Get  Set  Remove  Defined  Add
    11291129  ==========================  =========  ===  ===  ======  =======  ===
    1130   MaxItems                    scalar      X    X     X        X       
    1131   Node                        scalar      X    X     X        X       
    1132   Item                        child       X          X        X      X 
    1133   Items                       master      X    X                       
     1130  MaxItems                    scalar      X    X     X        X
     1131  Node                        scalar      X    X     X        X
     1132  Item                        child       X          X        X      X
     1133  Items                       master      X    X
    11341134
    11351135=head1 http://jabber.org/protocol/pubsub - options objects
     
    11371137  Name                        Type       Get  Set  Remove  Defined  Add
    11381138  ==========================  =========  ===  ===  ======  =======  ===
    1139   JID                         jid         X    X     X        X       
    1140   Node                        scalar      X    X     X        X       
    1141   Options                     master      X    X                       
     1139  JID                         jid         X    X     X        X
     1140  Node                        scalar      X    X     X        X
     1141  Options                     master      X    X
    11421142
    11431143=head1 http://jabber.org/protocol/pubsub - publish objects
     
    11451145  Name                        Type       Get  Set  Remove  Defined  Add
    11461146  ==========================  =========  ===  ===  ======  =======  ===
    1147   Node                        scalar      X    X     X        X       
    1148   Item                        child       X          X        X      X 
    1149   Publish                     master      X    X                       
     1147  Node                        scalar      X    X     X        X
     1148  Item                        child       X          X        X      X
     1149  Publish                     master      X    X
    11501150
    11511151=head1 http://jabber.org/protocol/pubsub - purge objects
     
    11531153  Name                        Type       Get  Set  Remove  Defined  Add
    11541154  ==========================  =========  ===  ===  ======  =======  ===
    1155   Node                        scalar      X    X     X        X       
    1156   Purge                       master      X    X                       
     1155  Node                        scalar      X    X     X        X
     1156  Purge                       master      X    X
    11571157
    11581158=head1 http://jabber.org/protocol/pubsub - retract objects
     
    11601160  Name                        Type       Get  Set  Remove  Defined  Add
    11611161  ==========================  =========  ===  ===  ======  =======  ===
    1162   Node                        scalar      X    X     X        X       
    1163   Item                        child       X          X        X      X 
    1164   Retract                     master      X    X                       
     1162  Node                        scalar      X    X     X        X
     1163  Item                        child       X          X        X      X
     1164  Retract                     master      X    X
    11651165
    11661166=head1 http://jabber.org/protocol/pubsub - subscribe objects
     
    11681168  Name                        Type       Get  Set  Remove  Defined  Add
    11691169  ==========================  =========  ===  ===  ======  =======  ===
    1170   JID                         jid         X    X     X        X       
    1171   Node                        scalar      X    X     X        X       
    1172   Subscribe                   master      X    X                       
     1170  JID                         jid         X    X     X        X
     1171  Node                        scalar      X    X     X        X
     1172  Subscribe                   master      X    X
    11731173
    11741174=head1 http://jabber.org/protocol/pubsub - subscribe-options objects
     
    11761176  Name                        Type       Get  Set  Remove  Defined  Add
    11771177  ==========================  =========  ===  ===  ======  =======  ===
    1178   Required                    flag        X    X     X        X       
    1179   SubscribeOptions            master      X    X                       
     1178  Required                    flag        X    X     X        X
     1179  SubscribeOptions            master      X    X
    11801180
    11811181=head1 http://jabber.org/protocol/pubsub - unsubscribe objects
     
    11831183  Name                        Type       Get  Set  Remove  Defined  Add
    11841184  ==========================  =========  ===  ===  ======  =======  ===
    1185   JID                         jid         X    X     X        X       
    1186   Node                        scalar      X    X     X        X       
    1187   Unsubscribe                 master      X    X                       
     1185  JID                         jid         X    X     X        X
     1186  Node                        scalar      X    X     X        X
     1187  Unsubscribe                 master      X    X
    11881188
    11891189=head1 http://jabber.org/protocol/pubsub#event
     
    11911191  Name                        Type       Get  Set  Remove  Defined  Add
    11921192  ==========================  =========  ===  ===  ======  =======  ===
    1193   Delete                      child       X          X        X      X 
    1194   Items                       child       X          X        X      X 
    1195   Event                       master      X    X                       
     1193  Delete                      child       X          X        X      X
     1194  Items                       child       X          X        X      X
     1195  Event                       master      X    X
    11961196
    11971197=head1 http://jabber.org/protocol/pubsub#event - delete objects
     
    11991199  Name                        Type       Get  Set  Remove  Defined  Add
    12001200  ==========================  =========  ===  ===  ======  =======  ===
    1201   Node                        scalar      X    X     X        X       
    1202   Delete                      master      X    X                       
     1201  Node                        scalar      X    X     X        X
     1202  Delete                      master      X    X
    12031203
    12041204=head1 http://jabber.org/protocol/pubsub#event - item objects
     
    12061206  Name                        Type       Get  Set  Remove  Defined  Add
    12071207  ==========================  =========  ===  ===  ======  =======  ===
    1208   ID                          scalar      X    X     X        X       
    1209   Payload                     raw         X    X     X        X       
    1210   Item                        master      X    X                       
     1208  ID                          scalar      X    X     X        X
     1209  Payload                     raw         X    X     X        X
     1210  Item                        master      X    X
    12111211
    12121212=head1 http://jabber.org/protocol/pubsub#event - items objects
     
    12141214  Name                        Type       Get  Set  Remove  Defined  Add
    12151215  ==========================  =========  ===  ===  ======  =======  ===
    1216   Node                        scalar      X    X     X        X       
    1217   Item                        child       X          X        X      X 
    1218   Items                       master      X    X                       
     1216  Node                        scalar      X    X     X        X
     1217  Item                        child       X          X        X      X
     1218  Items                       master      X    X
    12191219
    12201220=head1 http://jabber.org/protocol/pubsub#owner
     
    12221222  Name                        Type       Get  Set  Remove  Defined  Add
    12231223  ==========================  =========  ===  ===  ======  =======  ===
    1224   Action                      scalar      X    X     X        X       
    1225   Configure                   child       X          X        X      X 
    1226   Owner                       master      X    X                       
     1224  Action                      scalar      X    X     X        X
     1225  Configure                   child       X          X        X      X
     1226  Owner                       master      X    X
    12271227
    12281228=head1 http://jabber.org/protocol/pubsub#owner - configure objects
     
    12301230  Name                        Type       Get  Set  Remove  Defined  Add
    12311231  ==========================  =========  ===  ===  ======  =======  ===
    1232   Node                        scalar      X    X     X        X       
    1233   Configure                   master      X    X                       
     1232  Node                        scalar      X    X     X        X
     1233  Configure                   master      X    X
    12341234
    12351235=head1 http://jabber.org/protocol/si
     
    12371237  Name                        Type       Get  Set  Remove  Defined  Add
    12381238  ==========================  =========  ===  ===  ======  =======  ===
    1239   ID                          scalar      X    X     X        X       
    1240   MimeType                    scalar      X    X     X        X       
    1241   Profile                     scalar      X    X     X        X       
    1242   Stream                      master      X    X                       
     1239  ID                          scalar      X    X     X        X
     1240  MimeType                    scalar      X    X     X        X
     1241  Profile                     scalar      X    X     X        X
     1242  Stream                      master      X    X
    12431243
    12441244=head1 http://jabber.org/protocol/si/profile/file-transfer
     
    12461246  Name                        Type       Get  Set  Remove  Defined  Add
    12471247  ==========================  =========  ===  ===  ======  =======  ===
    1248   Date                        scalar      X    X     X        X       
    1249   Desc                        scalar      X    X     X        X       
    1250   Hash                        scalar      X    X     X        X       
    1251   Name                        scalar      X    X     X        X       
    1252   Range                       flag        X    X     X        X       
    1253   RangeLength                 scalar      X    X     X        X       
    1254   RangeOffset                 scalar      X    X     X        X       
    1255   Size                        scalar      X    X     X        X       
    1256   File                        master      X    X                       
     1248  Date                        scalar      X    X     X        X
     1249  Desc                        scalar      X    X     X        X
     1250  Hash                        scalar      X    X     X        X
     1251  Name                        scalar      X    X     X        X
     1252  Range                       flag        X    X     X        X
     1253  RangeLength                 scalar      X    X     X        X
     1254  RangeOffset                 scalar      X    X     X        X
     1255  Size                        scalar      X    X     X        X
     1256  File                        master      X    X
    12571257
    12581258=head1 jabber:iq:agent - DEPRECATED
     
    12601260  Name                        Type       Get  Set  Remove  Defined  Add
    12611261  ==========================  =========  ===  ===  ======  =======  ===
    1262   Agents                      flag        X    X     X        X       
    1263   Description                 scalar      X    X     X        X       
    1264   GroupChat                   flag        X    X     X        X       
    1265   JID                         jid         X    X     X        X       
    1266   Name                        scalar      X    X     X        X       
    1267   Register                    flag        X    X     X        X       
    1268   Search                      flag        X    X     X        X       
    1269   Service                     scalar      X    X     X        X       
    1270   Transport                   scalar      X    X     X        X       
    1271   URL                         scalar      X    X     X        X       
    1272   Agent                       master      X    X                       
     1262  Agents                      flag        X    X     X        X
     1263  Description                 scalar      X    X     X        X
     1264  GroupChat                   flag        X    X     X        X
     1265  JID                         jid         X    X     X        X
     1266  Name                        scalar      X    X     X        X
     1267  Register                    flag        X    X     X        X
     1268  Search                      flag        X    X     X        X
     1269  Service                     scalar      X    X     X        X
     1270  Transport                   scalar      X    X     X        X
     1271  URL                         scalar      X    X     X        X
     1272  Agent                       master      X    X
    12731273
    12741274=head1 jabber:iq:agents - DEPRECATED
     
    12761276  Name                        Type       Get  Set  Remove  Defined  Add
    12771277  ==========================  =========  ===  ===  ======  =======  ===
    1278   Agent                       child                                  X 
    1279   Agents                      child       X          X        X       
     1278  Agent                       child                                  X
     1279  Agents                      child       X          X        X
    12801280
    12811281=head1 jabber:iq:autoupdate
     
    12831283  Name                        Type       Get  Set  Remove  Defined  Add
    12841284  ==========================  =========  ===  ===  ======  =======  ===
    1285   Beta                        child                                  X 
    1286   Dev                         child                                  X 
    1287   Release                     child                                  X 
    1288   Releases                    child       X          X        X       
     1285  Beta                        child                                  X
     1286  Dev                         child                                  X
     1287  Release                     child                                  X
     1288  Releases                    child       X          X        X
    12891289
    12901290=head1 jabber:iq:autoupdate - release objects
     
    12921292  Name                        Type       Get  Set  Remove  Defined  Add
    12931293  ==========================  =========  ===  ===  ======  =======  ===
    1294   Desc                        scalar      X    X     X        X       
    1295   Priority                    scalar      X    X     X        X       
    1296   URL                         scalar      X    X     X        X       
    1297   Version                     scalar      X    X     X        X       
    1298   Release                     master      X    X                       
     1294  Desc                        scalar      X    X     X        X
     1295  Priority                    scalar      X    X     X        X
     1296  URL                         scalar      X    X     X        X
     1297  Version                     scalar      X    X     X        X
     1298  Release                     master      X    X
    12991299
    13001300=head1 jabber:iq:browse - DEPRECATED
     
    13021302  Name                        Type       Get  Set  Remove  Defined  Add
    13031303  ==========================  =========  ===  ===  ======  =======  ===
    1304   Category                    scalar      X    X     X        X       
    1305   JID                         jid         X    X     X        X       
    1306   NS                          array       X    X     X        X       
    1307   Name                        scalar      X    X     X        X       
    1308   Type                        scalar      X    X     X        X       
    1309   Item                        child                                  X 
    1310   Items                       child       X          X        X       
    1311   Browse                      master      X    X                       
     1304  Category                    scalar      X    X     X        X
     1305  JID                         jid         X    X     X        X
     1306  NS                          array       X    X     X        X
     1307  Name                        scalar      X    X     X        X
     1308  Type                        scalar      X    X     X        X
     1309  Item                        child                                  X
     1310  Items                       child       X          X        X
     1311  Browse                      master      X    X
    13121312
    13131313=head1 jabber:iq:browse - item objects - DEPRECATED
     
    13151315  Name                        Type       Get  Set  Remove  Defined  Add
    13161316  ==========================  =========  ===  ===  ======  =======  ===
    1317   Category                    scalar      X    X     X        X       
    1318   JID                         jid         X    X     X        X       
    1319   NS                          array       X    X     X        X       
    1320   Name                        scalar      X    X     X        X       
    1321   Type                        scalar      X    X     X        X       
    1322   Item                        child                                  X 
    1323   Items                       child       X          X        X       
    1324   Browse                      master      X    X                       
     1317  Category                    scalar      X    X     X        X
     1318  JID                         jid         X    X     X        X
     1319  NS                          array       X    X     X        X
     1320  Name                        scalar      X    X     X        X
     1321  Type                        scalar      X    X     X        X
     1322  Item                        child                                  X
     1323  Items                       child       X          X        X
     1324  Browse                      master      X    X
    13251325
    13261326=head1 jabber:iq:conference
     
    13281328  Name                        Type       Get  Set  Remove  Defined  Add
    13291329  ==========================  =========  ===  ===  ======  =======  ===
    1330   ID                          scalar      X    X     X        X       
    1331   Name                        scalar      X    X     X        X       
    1332   Nick                        scalar      X    X     X        X       
    1333   Privacy                     flag        X    X     X        X       
    1334   Secret                      scalar      X    X     X        X       
    1335   Conference                  master      X    X                       
     1330  ID                          scalar      X    X     X        X
     1331  Name                        scalar      X    X     X        X
     1332  Nick                        scalar      X    X     X        X
     1333  Privacy                     flag        X    X     X        X
     1334  Secret                      scalar      X    X     X        X
     1335  Conference                  master      X    X
    13361336
    13371337=head1 jabber:iq:filter - DEPRECATED
     
    13391339  Name                        Type       Get  Set  Remove  Defined  Add
    13401340  ==========================  =========  ===  ===  ======  =======  ===
    1341   Rule                        child                                  X 
    1342   Rules                       child       X          X        X       
     1341  Rule                        child                                  X
     1342  Rules                       child       X          X        X
    13431343
    13441344=head1 jabber:iq:filter - rule objects - DEPRECATED
     
    13461346  Name                        Type       Get  Set  Remove  Defined  Add
    13471347  ==========================  =========  ===  ===  ======  =======  ===
    1348   Body                        scalar      X    X     X        X       
    1349   Continued                   scalar      X    X     X        X       
    1350   Drop                        scalar      X    X     X        X       
    1351   Edit                        scalar      X    X     X        X       
    1352   Error                       scalar      X    X     X        X       
    1353   From                        scalar      X    X     X        X       
    1354   Offline                     scalar      X    X     X        X       
    1355   Reply                       scalar      X    X     X        X       
    1356   Resource                    scalar      X    X     X        X       
    1357   Show                        scalar      X    X     X        X       
    1358   Size                        scalar      X    X     X        X       
    1359   Subject                     scalar      X    X     X        X       
    1360   Time                        scalar      X    X     X        X       
    1361   Type                        scalar      X    X     X        X       
    1362   Unavailable                 scalar      X    X     X        X       
    1363   Rule                        master      X    X                       
     1348  Body                        scalar      X    X     X        X
     1349  Continued                   scalar      X    X     X        X
     1350  Drop                        scalar      X    X     X        X
     1351  Edit                        scalar      X    X     X        X
     1352  Error                       scalar      X    X     X        X
     1353  From                        scalar      X    X     X        X
     1354  Offline                     scalar      X    X     X        X
     1355  Reply                       scalar      X    X     X        X
     1356  Resource                    scalar      X    X     X        X
     1357  Show                        scalar      X    X     X        X
     1358  Size                        scalar      X    X     X        X
     1359  Subject                     scalar      X    X     X        X
     1360  Time                        scalar      X    X     X        X
     1361  Type                        scalar      X    X     X        X
     1362  Unavailable                 scalar      X    X     X        X
     1363  Rule                        master      X    X
    13641364
    13651365=head1 jabber:iq:gateway
     
    13671367  Name                        Type       Get  Set  Remove  Defined  Add
    13681368  ==========================  =========  ===  ===  ======  =======  ===
    1369   Desc                        scalar      X    X     X        X       
    1370   JID                         jid         X    X     X        X       
    1371   Prompt                      scalar      X    X     X        X       
    1372   Gateway                     master      X    X                       
     1369  Desc                        scalar      X    X     X        X
     1370  JID                         jid         X    X     X        X
     1371  Prompt                      scalar      X    X     X        X
     1372  Gateway                     master      X    X
    13731373
    13741374=head1 jabber:iq:last
     
    13761376  Name                        Type       Get  Set  Remove  Defined  Add
    13771377  ==========================  =========  ===  ===  ======  =======  ===
    1378   Message                     scalar      X    X     X        X       
    1379   Seconds                     scalar      X    X     X        X       
    1380   Last                        master      X    X                       
     1378  Message                     scalar      X    X     X        X
     1379  Seconds                     scalar      X    X     X        X
     1380  Last                        master      X    X
    13811381
    13821382=head1 jabber:iq:oob
     
    13841384  Name                        Type       Get  Set  Remove  Defined  Add
    13851385  ==========================  =========  ===  ===  ======  =======  ===
    1386   Desc                        scalar      X    X     X        X       
    1387   URL                         scalar      X    X     X        X       
    1388   Oob                         master      X    X                       
     1386  Desc                        scalar      X    X     X        X
     1387  URL                         scalar      X    X     X        X
     1388  Oob                         master      X    X
    13891389
    13901390=head1 jabber:iq:pass
     
    13921392  Name                        Type       Get  Set  Remove  Defined  Add
    13931393  ==========================  =========  ===  ===  ======  =======  ===
    1394   Client                      scalar      X    X     X        X       
    1395   ClientPort                  scalar      X    X     X        X       
    1396   Close                       flag        X    X     X        X       
    1397   Expire                      scalar      X    X     X        X       
    1398   OneShot                     flag        X    X     X        X       
    1399   Proxy                       scalar      X    X     X        X       
    1400   ProxyPort                   scalar      X    X     X        X       
    1401   Server                      scalar      X    X     X        X       
    1402   ServerPort                  scalar      X    X     X        X       
    1403   Pass                        master      X    X                       
     1394  Client                      scalar      X    X     X        X
     1395  ClientPort                  scalar      X    X     X        X
     1396  Close                       flag        X    X     X        X
     1397  Expire                      scalar      X    X     X        X
     1398  OneShot                     flag        X    X     X        X
     1399  Proxy                       scalar      X    X     X        X
     1400  ProxyPort                   scalar      X    X     X        X
     1401  Server                      scalar      X    X     X        X
     1402  ServerPort                  scalar      X    X     X        X
     1403  Pass                        master      X    X
    14041404
    14051405=head1 jabber:iq:rpc
     
    14071407  Name                        Type       Get  Set  Remove  Defined  Add
    14081408  ==========================  =========  ===  ===  ======  =======  ===
    1409   MethodCall                  child       X          X        X      X 
    1410   MethodResponse              child       X          X        X      X 
     1409  MethodCall                  child       X          X        X      X
     1410  MethodResponse              child       X          X        X      X
    14111411
    14121412=head1 jabber:iq:rpc - array objects
     
    14141414  Name                        Type       Get  Set  Remove  Defined  Add
    14151415  ==========================  =========  ===  ===  ======  =======  ===
    1416   Data                        child                                  X 
    1417   Datas                       child       X          X        X       
     1416  Data                        child                                  X
     1417  Datas                       child       X          X        X
    14181418
    14191419=head1 jabber:iq:rpc - data objects
     
    14211421  Name                        Type       Get  Set  Remove  Defined  Add
    14221422  ==========================  =========  ===  ===  ======  =======  ===
    1423   Value                       child       X          X        X      X 
     1423  Value                       child       X          X        X      X
    14241424
    14251425=head1 jabber:iq:rpc - fault objects
     
    14271427  Name                        Type       Get  Set  Remove  Defined  Add
    14281428  ==========================  =========  ===  ===  ======  =======  ===
    1429   Value                       child       X          X        X      X 
     1429  Value                       child       X          X        X      X
    14301430
    14311431=head1 jabber:iq:rpc - member objects
     
    14331433  Name                        Type       Get  Set  Remove  Defined  Add
    14341434  ==========================  =========  ===  ===  ======  =======  ===
    1435   Name                        scalar      X    X     X        X       
    1436   Value                       child       X          X        X      X 
    1437   Member                      master      X    X                       
     1435  Name                        scalar      X    X     X        X
     1436  Value                       child       X          X        X      X
     1437  Member                      master      X    X
    14381438
    14391439=head1 jabber:iq:rpc - methodCall objects
     
    14411441  Name                        Type       Get  Set  Remove  Defined  Add
    14421442  ==========================  =========  ===  ===  ======  =======  ===
    1443   MethodName                  scalar      X    X     X        X       
    1444   Params                      child       X          X        X      X 
    1445   MethodCall                  master      X    X                       
     1443  MethodName                  scalar      X    X     X        X
     1444  Params                      child       X          X        X      X
     1445  MethodCall                  master      X    X
    14461446
    14471447=head1 jabber:iq:rpc - methodResponse objects
     
    14491449  Name                        Type       Get  Set  Remove  Defined  Add
    14501450  ==========================  =========  ===  ===  ======  =======  ===
    1451   Fault                       child       X          X        X      X 
    1452   Params                      child       X          X        X      X 
     1451  Fault                       child       X          X        X      X
     1452  Params                      child       X          X        X      X
    14531453
    14541454=head1 jabber:iq:rpc - param objects
     
    14561456  Name                        Type       Get  Set  Remove  Defined  Add
    14571457  ==========================  =========  ===  ===  ======  =======  ===
    1458   Value                       child       X          X        X      X 
     1458  Value                       child       X          X        X      X
    14591459
    14601460=head1 jabber:iq:rpc - params objects
     
    14621462  Name                        Type       Get  Set  Remove  Defined  Add
    14631463  ==========================  =========  ===  ===  ======  =======  ===
    1464   Param                       child                                  X 
    1465   Params                      child       X          X        X       
     1464  Param                       child                                  X
     1465  Params                      child       X          X        X
    14661466
    14671467=head1 jabber:iq:rpc - struct objects
     
    14691469  Name                        Type       Get  Set  Remove  Defined  Add
    14701470  ==========================  =========  ===  ===  ======  =======  ===
    1471   Member                      child                                  X 
    1472   Members                     child       X          X        X       
     1471  Member                      child                                  X
     1472  Members                     child       X          X        X
    14731473
    14741474=head1 jabber:iq:rpc - value objects
     
    14761476  Name                        Type       Get  Set  Remove  Defined  Add
    14771477  ==========================  =========  ===  ===  ======  =======  ===
    1478   Base64                      scalar      X    X     X        X       
    1479   Boolean                     scalar      X    X     X        X       
    1480   DateTime                    scalar      X    X     X        X       
    1481   Double                      scalar      X    X     X        X       
    1482   I4                          scalar      X    X     X        X       
    1483   Int                         scalar      X    X     X        X       
    1484   String                      scalar      X    X     X        X       
    1485   Value                       scalar      X    X     X        X       
    1486   Array                       child       X          X        X      X 
    1487   Struct                      child       X          X        X      X 
    1488   RPCValue                    master      X    X                       
     1478  Base64                      scalar      X    X     X        X
     1479  Boolean                     scalar      X    X     X        X
     1480  DateTime                    scalar      X    X     X        X
     1481  Double                      scalar      X    X     X        X
     1482  I4                          scalar      X    X     X        X
     1483  Int                         scalar      X    X     X        X
     1484  String                      scalar      X    X     X        X
     1485  Value                       scalar      X    X     X        X
     1486  Array                       child       X          X        X      X
     1487  Struct                      child       X          X        X      X
     1488  RPCValue                    master      X    X
    14891489
    14901490=head1 jabber:iq:search
     
    14921492  Name                        Type       Get  Set  Remove  Defined  Add
    14931493  ==========================  =========  ===  ===  ======  =======  ===
    1494   Email                       scalar      X    X     X        X       
    1495   Family                      scalar      X    X     X        X       
    1496   First                       scalar      X    X     X        X       
    1497   Given                       scalar      X    X     X        X       
    1498   Instructions                scalar      X    X     X        X       
    1499   Key                         scalar      X    X     X        X       
    1500   Last                        scalar      X    X     X        X       
    1501   Name                        scalar      X    X     X        X       
    1502   Nick                        scalar      X    X     X        X       
    1503   Truncated                   flag        X    X     X        X       
    1504   Item                        child                                  X 
    1505   Items                       child       X          X        X       
    1506   Search                      master      X    X                       
     1494  Email                       scalar      X    X     X        X
     1495  Family                      scalar      X    X     X        X
     1496  First                       scalar      X    X     X        X
     1497  Given                       scalar      X    X     X        X
     1498  Instructions                scalar      X    X     X        X
     1499  Key                         scalar      X    X     X        X
     1500  Last                        scalar      X    X     X        X
     1501  Name                        scalar      X    X     X        X
     1502  Nick                        scalar      X    X     X        X
     1503  Truncated                   flag        X    X     X        X
     1504  Item                        child                                  X
     1505  Items                       child       X          X        X
     1506  Search                      master      X    X
    15071507
    15081508=head1 jabber:iq:search - item objects
     
    15101510  Name                        Type       Get  Set  Remove  Defined  Add
    15111511  ==========================  =========  ===  ===  ======  =======  ===
    1512   Email                       scalar      X    X     X        X       
    1513   Family                      scalar      X    X     X        X       
    1514   First                       scalar      X    X     X        X       
    1515   Given                       scalar      X    X     X        X       
    1516   JID                         jid         X    X     X        X       
    1517   Key                         scalar      X    X     X        X       
    1518   Last                        scalar      X    X     X        X       
    1519   Name                        scalar      X    X     X        X       
    1520   Nick                        scalar      X    X     X        X       
    1521   Item                        master      X    X                       
     1512  Email                       scalar      X    X     X        X
     1513  Family                      scalar      X    X     X        X
     1514  First                       scalar      X    X     X        X
     1515  Given                       scalar      X    X     X        X
     1516  JID                         jid         X    X     X        X
     1517  Key                         scalar      X    X     X        X
     1518  Last                        scalar      X    X     X        X
     1519  Name                        scalar      X    X     X        X
     1520  Nick                        scalar      X    X     X        X
     1521  Item                        master      X    X
    15221522
    15231523=head1 jabber:iq:time
     
    15251525  Name                        Type       Get  Set  Remove  Defined  Add
    15261526  ==========================  =========  ===  ===  ======  =======  ===
    1527   Display                     special     X    X     X        X       
    1528   TZ                          special     X    X     X        X       
    1529   UTC                         special     X    X     X        X       
    1530   Time                        master      X    X                       
     1527  Display                     special     X    X     X        X
     1528  TZ                          special     X    X     X        X
     1529  UTC                         special     X    X     X        X
     1530  Time                        master      X    X
    15311531
    15321532=head1 jabber:iq:version
     
    15341534  Name                        Type       Get  Set  Remove  Defined  Add
    15351535  ==========================  =========  ===  ===  ======  =======  ===
    1536   Name                        scalar      X    X     X        X       
    1537   OS                          special     X    X     X        X       
    1538   Ver                         special     X    X     X        X       
    1539   Version                     master      X    X                       
     1536  Name                        scalar      X    X     X        X
     1537  OS                          special     X    X     X        X
     1538  Ver                         special     X    X     X        X
     1539  Version                     master      X    X
    15401540
    15411541=head1 jabber:x:autoupdate
     
    15431543  Name                        Type       Get  Set  Remove  Defined  Add
    15441544  ==========================  =========  ===  ===  ======  =======  ===
    1545   JID                         jid         X    X     X        X       
    1546   Autoupdate                  master      X    X                       
     1545  JID                         jid         X    X     X        X
     1546  Autoupdate                  master      X    X
    15471547
    15481548=head1 jabber:x:conference
     
    15501550  Name                        Type       Get  Set  Remove  Defined  Add
    15511551  ==========================  =========  ===  ===  ======  =======  ===
    1552   JID                         jid         X    X     X        X       
    1553   Conference                  master      X    X                       
     1552  JID                         jid         X    X     X        X
     1553  Conference                  master      X    X
    15541554
    15551555=head1 jabber:x:data
     
    15571557  Name                        Type       Get  Set  Remove  Defined  Add
    15581558  ==========================  =========  ===  ===  ======  =======  ===
    1559   Form                        scalar      X    X     X        X       
    1560   Instructions                scalar      X    X     X        X       
    1561   Title                       scalar      X    X     X        X       
    1562   Type                        scalar      X    X     X        X       
    1563   Field                       child                                  X 
    1564   Fields                      child       X          X        X       
    1565   Item                        child                                  X 
    1566   Items                       child       X          X        X       
    1567   Reported                    child       X          X        X      X 
    1568   Data                        master      X    X                       
     1559  Form                        scalar      X    X     X        X
     1560  Instructions                scalar      X    X     X        X
     1561  Title                       scalar      X    X     X        X
     1562  Type                        scalar      X    X     X        X
     1563  Field                       child                                  X
     1564  Fields                      child       X          X        X
     1565  Item                        child                                  X
     1566  Items                       child       X          X        X
     1567  Reported                    child       X          X        X      X
     1568  Data                        master      X    X
    15691569
    15701570=head1 jabber:x:data - field objects
     
    15721572  Name                        Type       Get  Set  Remove  Defined  Add
    15731573  ==========================  =========  ===  ===  ======  =======  ===
    1574   Desc                        scalar      X    X     X        X       
    1575   Label                       scalar      X    X     X        X       
    1576   Required                    flag        X    X     X        X       
    1577   Type                        scalar      X    X     X        X       
    1578   Value                       array       X    X     X        X       
    1579   Var                         scalar      X    X     X        X       
    1580   Option                      child                                  X 
    1581   Options                     child       X          X        X       
    1582   Field                       master      X    X                       
     1574  Desc                        scalar      X    X     X        X
     1575  Label                       scalar      X    X     X        X
     1576  Required                    flag        X    X     X        X
     1577  Type                        scalar      X    X     X        X
     1578  Value                       array       X    X     X        X
     1579  Var                         scalar      X    X     X        X
     1580  Option                      child                                  X
     1581  Options                     child       X          X        X
     1582  Field                       master      X    X
    15831583
    15841584=head1 jabber:x:data - item objects
     
    15861586  Name                        Type       Get  Set  Remove  Defined  Add
    15871587  ==========================  =========  ===  ===  ======  =======  ===
    1588   Field                       child                                  X 
    1589   Fields                      child       X          X        X       
    1590   Item                        master      X    X                       
     1588  Field                       child                                  X
     1589  Fields                      child       X          X        X
     1590  Item                        master      X    X
    15911591
    15921592=head1 jabber:x:data - option objects
     
    15941594  Name                        Type       Get  Set  Remove  Defined  Add
    15951595  ==========================  =========  ===  ===  ======  =======  ===
    1596   Label                       scalar      X    X     X        X       
    1597   Value                       scalar      X    X     X        X       
    1598   Option                      master      X    X                       
     1596  Label                       scalar      X    X     X        X
     1597  Value                       scalar      X    X     X        X
     1598  Option                      master      X    X
    15991599
    16001600=head1 jabber:x:data - reported objects
     
    16021602  Name                        Type       Get  Set  Remove  Defined  Add
    16031603  ==========================  =========  ===  ===  ======  =======  ===
    1604   Field                       child                                  X 
    1605   Fields                      child       X          X        X       
    1606   Reported                    master      X    X                       
     1604  Field                       child                                  X
     1605  Fields                      child       X          X        X
     1606  Reported                    master      X    X
    16071607
    16081608=head1 jabber:x:delay
     
    16101610  Name                        Type       Get  Set  Remove  Defined  Add
    16111611  ==========================  =========  ===  ===  ======  =======  ===
    1612   From                        jid         X    X     X        X       
    1613   Message                     scalar      X    X     X        X       
    1614   Stamp                       timestamp   X    X     X        X       
    1615   Delay                       master      X    X                       
     1612  From                        jid         X    X     X        X
     1613  Message                     scalar      X    X     X        X
     1614  Stamp                       timestamp   X    X     X        X
     1615  Delay                       master      X    X
    16161616
    16171617=head1 jabber:x:encrypted
     
    16191619  Name                        Type       Get  Set  Remove  Defined  Add
    16201620  ==========================  =========  ===  ===  ======  =======  ===
    1621   Message                     scalar      X    X     X        X       
    1622   Encrypted                   master      X    X                       
     1621  Message                     scalar      X    X     X        X
     1622  Encrypted                   master      X    X
    16231623
    16241624=head1 jabber:x:event
     
    16261626  Name                        Type       Get  Set  Remove  Defined  Add
    16271627  ==========================  =========  ===  ===  ======  =======  ===
    1628   Composing                   flag        X    X     X        X       
    1629   Delivered                   flag        X    X     X        X       
    1630   Displayed                   flag        X    X     X        X       
    1631   ID                          scalar      X    X     X        X       
    1632   Offline                     flag        X    X     X        X       
    1633   Event                       master      X    X                       
     1628  Composing                   flag        X    X     X        X
     1629  Delivered                   flag        X    X     X        X
     1630  Displayed                   flag        X    X     X        X
     1631  ID                          scalar      X    X     X        X
     1632  Offline                     flag        X    X     X        X
     1633  Event                       master      X    X
    16341634
    16351635=head1 jabber:x:expire
     
    16371637  Name                        Type       Get  Set  Remove  Defined  Add
    16381638  ==========================  =========  ===  ===  ======  =======  ===
    1639   Seconds                     scalar      X    X     X        X       
    1640   Expire                      master      X    X                       
     1639  Seconds                     scalar      X    X     X        X
     1640  Expire                      master      X    X
    16411641
    16421642=head1 jabber:x:oob
     
    16441644  Name                        Type       Get  Set  Remove  Defined  Add
    16451645  ==========================  =========  ===  ===  ======  =======  ===
    1646   Desc                        scalar      X    X     X        X       
    1647   URL                         scalar      X    X     X        X       
    1648   Oob                         master      X    X                       
     1646  Desc                        scalar      X    X     X        X
     1647  URL                         scalar      X    X     X        X
     1648  Oob                         master      X    X
    16491649
    16501650=head1 jabber:x:roster
     
    16521652  Name                        Type       Get  Set  Remove  Defined  Add
    16531653  ==========================  =========  ===  ===  ======  =======  ===
    1654   Item                        child                                  X 
    1655   Items                       child       X          X        X       
    1656   Roster                      master      X    X                       
     1654  Item                        child                                  X
     1655  Items                       child       X          X        X
     1656  Roster                      master      X    X
    16571657
    16581658=head1 jabber:x:roster - item objects
     
    16601660  Name                        Type       Get  Set  Remove  Defined  Add
    16611661  ==========================  =========  ===  ===  ======  =======  ===
    1662   Ask                         scalar      X    X     X        X       
    1663   Group                       array       X    X     X        X       
    1664   JID                         jid         X    X     X        X       
    1665   Name                        scalar      X    X     X        X       
    1666   Subscription                scalar      X    X     X        X       
    1667   Item                        master      X    X                       
     1662  Ask                         scalar      X    X     X        X
     1663  Group                       array       X    X     X        X
     1664  JID                         jid         X    X     X        X
     1665  Name                        scalar      X    X     X        X
     1666  Subscription                scalar      X    X     X        X
     1667  Item                        master      X    X
    16681668
    16691669=head1 jabber:x:signed
     
    16711671  Name                        Type       Get  Set  Remove  Defined  Add
    16721672  ==========================  =========  ===  ===  ======  =======  ===
    1673   Signature                   scalar      X    X     X        X       
    1674   Signed                      master      X    X                       
     1673  Signature                   scalar      X    X     X        X
     1674  Signed                      master      X    X
    16751675
    16761676
     
    17261726}
    17271727
    1728 sub GetX     { my $self = shift; $self->GetChild(@_);    } 
     1728sub GetX     { my $self = shift; $self->GetChild(@_);    }
    17291729sub DefinedX { my $self = shift; $self->DefinedChild(@_); }
    17301730sub NewX     { my $self = shift; $self->NewChild(@_);    }
    1731 sub AddX     { my $self = shift; $self->AddChild(@_);    } 
     1731sub AddX     { my $self = shift; $self->AddChild(@_);    }
    17321732sub RemoveX  { my $self = shift; $self->RemoveChild(@_); }
    17331733
     
    17351735sub DefinedQuery { my $self = shift; $self->DefinedChild(@_); }
    17361736sub NewQuery     { my $self = shift; $self->NewChild(@_);     }
    1737 sub AddQuery     { my $self = shift; $self->AddChild(@_);     } 
     1737sub AddQuery     { my $self = shift; $self->AddChild(@_);     }
    17381738sub RemoveQuery  { my $self = shift; $self->RemoveChild(@_);  }
    17391739
     
    17701770    my $self = shift;
    17711771    my $value = shift;
    1772    
     1772
    17731773    if (!defined($value) && ($TIMEZONE == 1))
    17741774    {
     
    18041804    my $self = shift;
    18051805    my $value = shift;
    1806    
     1806
    18071807    if (defined($value))
    18081808    {
     
    18261826        my %result;
    18271827        my @xData = $item->GetX("jabber:x:data");
    1828         if ($#xData == -1) 
     1828        if ($#xData == -1)
    18291829        {
    18301830            %result = $item->GetItem();
  • perl/modules/Jabber/lib/Net/Jabber/XDB.pm

    rc2bed55 r7869e48  
    4141  namspaces and modules see Net::Jabber::Data.
    4242
    43   To initialize the XDB with a Jabber <xdb/> you must pass it the 
     43  To initialize the XDB with a Jabber <xdb/> you must pass it the
    4444  XML::Parser Tree array.  For example:
    4545
  • perl/modules/Jabber/lib/Net/XMPP.pm

    ra8c55b5 r7869e48  
    4040  like to utilize the XMPP Instant Messaging protocol.  While not a
    4141  client in and of itself, it provides all of the necessary back-end
    42   functions to make a CGI client or command-line perl client feasible 
     42  functions to make a CGI client or command-line perl client feasible
    4343  and easy to use.  Net::XMPP is a wrapper around the rest of the
    4444  official Net::XMPP::xxxxxx packages.
  • perl/modules/Jabber/lib/Net/XMPP/Client.pm

    rc2bed55 r7869e48  
    143143                                      sepecified account for you, if it
    144144                                      does not exist.
    145            
     145
    146146    Process(integer) - takes the timeout period as an argument.  If no
    147147                       timeout is listed then the function blocks until
     
    157157                           0   - Status ok, no data received.
    158158                         undef - Status not ok, stop processing.
    159                        
     159
    160160                       IMPORTANT: You need to check the output of every
    161161                       Process.  If you get an undef then the connection
     
    190190    bless($self, $proto);
    191191    $self->init(@_);
    192    
     192
    193193    $self->{SERVER}->{port} = 5222;
    194194    $self->{SERVER}->{namespace} = "jabber:client";
     
    210210    $auth{password} = $args{password};
    211211    $auth{resource} = $args{resource} if exists($args{resource});
    212    
     212
    213213    return $self->AuthSend(%auth);
    214214}
     
    219219    my $self = shift;
    220220    my (%args) = @_;
    221    
     221
    222222    my %connect;
    223223    $connect{hostname}       = $args{hostname};
  • perl/modules/Jabber/lib/Net/XMPP/Connection.pm

    r3bf5516 r7869e48  
    5959
    6060    bless($self, $proto);
    61    
     61
    6262    $self->init(@_);
    63    
     63
    6464    $self->{SERVER}->{namespace} = "unknown";
    6565
     
    7676{
    7777    my $self = shift;
    78    
     78
    7979    $self->{ARGS} = {};
    8080    while($#_ >= 0) { $self->{ARGS}->{ lc(pop(@_)) } = pop(@_); }
     
    103103                         debugtime  => $self->{DEBUG}->GetTime(),
    104104                        );
    105    
     105
    106106    $self->{RCVDB}->{currentID} = 0;
    107107
     
    132132    $self->{DEBUG}->Log1("Connect: host($self->{SERVER}->{hostname}:$self->{SERVER}->{port}) namespace($self->{SERVER}->{namespace})");
    133133    $self->{DEBUG}->Log1("Connect: timeout($self->{SERVER}->{timeout})");
    134    
     134
    135135    delete($self->{SESSION});
    136136    $self->{SESSION} =
     
    210210    $self->{STREAM}->Disconnect($self->{SESSION}->{id})
    211211        if ($self->{CONNECTED} == 1);
    212     $self->{STREAM}->SetCallBacks(node=>undef);   
     212    $self->{STREAM}->SetCallBacks(node=>undef);
    213213    $self->{CONNECTED} = 0;
    214214    $self->{DISCONNECTED} = 1;
     
    270270            &{$self->{CB}->{onauthfail}}()
    271271                if exists($self->{CB}->{onauthfail});
    272            
     272
    273273            if (!$self->{SERVER}->{allow_register} || $args{register} == 0)
    274274            {
     
    288288                    &{$self->{CB}->{onregisterfail}}()
    289289                        if exists($self->{CB}->{onregisterfail});
    290            
     290
    291291                    $self->Disconnect();
    292292                    &{$self->{CB}->{ondisconnect}}()
     
    306306                if exists($self->{CB}->{onauth});
    307307        }
    308  
     308
    309309        while($self->Connected())
    310310        {
  • perl/modules/Jabber/lib/Net/XMPP/Debug.pm

    rb7b2a76 r7869e48  
    151151    my %args;
    152152    while($#_ >= 0) { $args{ lc pop(@_) } = pop(@_); }
    153    
     153
    154154    delete($args{file}) if (lc($args{file}) eq "stdout");
    155155
  • perl/modules/Jabber/lib/Net/XMPP/IQ.pm

    rc2bed55 r7869e48  
    198198
    199199               $IQ->RemoveTo();
    200  
     200
    201201  RemoveFrom() - removes the from attribute from the <iq/>.
    202202
    203203                 $IQ->RemoveFrom();
    204  
     204
    205205  RemoveID() - removes the id attribute from the <iq/>.
    206206
    207207               $IQ->RemoveID();
    208  
     208
    209209  RemoveType() - removes the type attribute from the <iq/>.
    210210
    211211                 $IQ->RemoveType();
    212  
     212
    213213  RemoveError() - removes the <error/> element from the <iq/>.
    214214
    215215                  $IQ->RemoveError();
    216  
     216
    217217  RemoveErrorCode() - removes the code attribute from the <error/>
    218218                      element in the <iq/>.
     
    222222=head2 Test functions
    223223
    224   DefinedTo() - returns 1 if the to attribute is defined in the <iq/>, 
     224  DefinedTo() - returns 1 if the to attribute is defined in the <iq/>,
    225225                0 otherwise.
    226226
     
    232232                  $test = $IQ->DefinedFrom();
    233233
    234   DefinedID() - returns 1 if the id attribute is defined in the <iq/>, 
     234  DefinedID() - returns 1 if the id attribute is defined in the <iq/>,
    235235                0 otherwise.
    236236
     
    242242                  $test = $IQ->DefinedType();
    243243
    244   DefinedError() - returns 1 if <error/> is defined in the <iq/>, 
     244  DefinedError() - returns 1 if <error/> is defined in the <iq/>,
    245245                   0 otherwise.
    246246
     
    285285
    286286    $self->{FUNCS} = \%FUNCTIONS;
    287    
     287
    288288    $self->_init(@_);
    289289
  • perl/modules/Jabber/lib/Net/XMPP/JID.pm

    rc2bed55 r7869e48  
    2929
    3030  Net::XMPP::JID is a companion to the Net::XMPP module.
    31   It provides the user a simple interface to set and retrieve all 
     31  It provides the user a simple interface to set and retrieve all
    3232  parts of a Jabber ID (userid on a server).
    3333
     
    8989  GetUserID() - returns a string with the userid of the JID.
    9090                If the string is an address (bob%jabber.org) then
    91                 the function will return it as an address 
     91                the function will return it as an address
    9292                (bob@jabber.org).
    9393
    9494  GetServer() - returns a string with the server of the JID.
    9595
    96   GetResource() - returns a string with the resource of the JID. 
     96  GetResource() - returns a string with the resource of the JID.
    9797
    9898  GetJID()       - returns a string that represents the JID stored
     
    113113                             then both will be in the jid.  If all
    114114                             you pass is a string, then that string
    115                              is used as the JID.  For valid settings 
     115                             is used as the JID.  For valid settings
    116116                             read the specific Set functions below.
    117117
    118118  SetUserID(string) - sets the userid.  Must be a valid userid or the
    119119                      server will complain if you try to use this JID
    120                       to talk to the server.  If the string is an 
     120                      to talk to the server.  If the string is an
    121121                      address then it will be converted to the %
    122122                      form suitable for using as a User ID.
    123123
    124   SetServer(string) - sets the server.  Must be a valid host on the 
     124  SetServer(string) - sets the server.  Must be a valid host on the
    125125                      network or the server will not be able to talk
    126126                      to it.
     
    283283    my %jid;
    284284
    285     if ($#_ > 0 ) { 
     285    if ($#_ > 0 ) {
    286286        while($#_ >= 0) { $jid{ lc pop(@_) } = pop(@_); }
    287287
  • perl/modules/Jabber/lib/Net/XMPP/Message.pm

    r8574801 r7869e48  
    204204
    205205               $Mess->RemoveTo();
    206  
     206
    207207  RemoveFrom() - removes the from attribute from the <message/>.
    208208
    209209                 $Mess->RemoveFrom();
    210  
     210
    211211  RemoveType() - removes the type attribute from the <message/>.
    212212
    213213                 $Mess->RemoveType();
    214  
     214
    215215  RemoveSubject() - removes the <subject/> element from the
    216216                    <message/>.
     
    220220  RemoveBody() - removes the <body/> element from the
    221221                 <message/>.
    222                  
     222
    223223                 $Mess->RemoveBody();
    224224
     
    226226
    227227                   $Mess->RemoveThread();
    228  
     228
    229229  RemoveError() - removes the <error/> element from the <message/>.
    230230
    231231                  $Mess->RemoveError();
    232  
     232
    233233  RemoveErrorCode() - removes the code attribute from the <error/>
    234234                      element in the <message/>.
  • perl/modules/Jabber/lib/Net/XMPP/Namespaces.pm

    rc2bed55 r7869e48  
    136136
    137137  To repeat, here is an example call to add_ns():
    138  
     138
    139139    &add_ns(ns    => "mynamespace",
    140140            tag   => "mytag",
     
    154154  DefinedXXXX(), RemoveXXXX(), AddXXXX() calls.  The basic options you
    155155  can pass in are:
    156  
     156
    157157     type - This tells Stanza how to handle the call.  The possible
    158158            values are:
    159                        
     159
    160160           array - The value to set and returned is an an array
    161161                   reference.  For example, <group/> in jabber:iq:roster.
     
    265265               ["Add"]
    266266               ["Get","Add","Defined"]
    267              
     267
    268268            It all depends on how you want your API to look.
    269      
     269
    270270  Once more... The following:
    271  
     271
    272272    &add_ns(ns    => "mynamespace",
    273273            tag   => "mytag",
     
    451451           );
    452452}
    453        
     453
    454454#-----------------------------------------------------------------------------
    455455# __netxmpp__:iq:privacy:list:item
     
    588588
    589589    # XXX error check...
    590    
     590
    591591    $NS{$args{ns}}->{tag} = $args{tag} if exists($args{tag});
    592592    $NS{$args{ns}}->{xpath} = $args{xpath};
  • perl/modules/Jabber/lib/Net/XMPP/Presence.pm

    rc2bed55 r7869e48  
    123123
    124124  SetTo(string) - sets the to attribute.  You can either pass a string
    125   SetTo(JID)      or a JID object.  They must be valid JIDs or the 
     125  SetTo(JID)      or a JID object.  They must be valid JIDs or the
    126126                  server will return an error message.
    127127                  (ie.  bob@jabber.org/Silent Bob, etc...)
     
    180180
    181181                $Pres->RemoveTo();
    182  
     182
    183183  RemoveFrom() -  removes the from attribute from the <presence/>.
    184184
    185185                  $Pres->RemoveFrom();
    186  
     186
    187187  RemoveType() -  removes the type attribute from the <presence/>.
    188188
    189189                  $Pres->RemoveType();
    190  
     190
    191191  RemoveStatus() -  removes the <status/> element from the <presence/>.
    192192
    193193                    $Pres->RemoveStatus();
    194  
     194
    195195  RemovePriority() -  removes the <priority/> element from the
    196196                      <presence/>.
    197197
    198198                      $Pres->RemovePriority();
    199  
     199
    200200  RemoveShow() -  removes the <show/> element from the <presence/>.
    201201
    202202                  $Pres->RemoveShow();
    203  
     203
    204204=head2 Test functions
    205205
     
    264264
    265265    $self->{FUNCS} = \%FUNCTIONS;
    266    
     266
    267267    $self->_init(@_);
    268268
  • perl/modules/Jabber/lib/Net/XMPP/PrivacyLists.pm

    rc2bed55 r7869e48  
    6565
    6666    $self->{CONNECTION} = $args{connection};
    67    
     67
    6868    bless($self, $proto);
    6969
    7070    $self->init();
    71    
     71
    7272    return $self;
    7373}
     
    172172    my $self = shift;
    173173    my $list = shift;
    174    
     174
    175175    my $iq = $self->{CONNECTION}->PrivacyListsGet(list=>$list);
    176176    $self->handleIQ($iq);
     
    251251    {
    252252        my $query = $iq->GetChild("jabber:iq:privacy");
    253        
     253
    254254        my @lists = $query->GetLists();
    255255
    256256        return unless ($#lists > -1);
    257        
     257
    258258        my @items = $lists[0]->GetItems();
    259        
     259
    260260        if (($#lists == 0) && ($#items > -1))
    261261        {
     
    274274    my $self = shift;
    275275    my $list = shift;
    276    
     276
    277277    my $name = $list->GetName();
    278278
     
    280280    {
    281281        my %item = $item->GetItem();
    282        
     282
    283283        $self->addItem($name,%item);
    284284    }
     
    290290    my $self = shift;
    291291    my $lists = shift;
    292    
     292
    293293    foreach my $list (@{$lists})
    294294    {
     
    326326    {
    327327        $self->{CONNECTION}->{DEBUG}->Log3("PrivacyLists::remove: deleting $list from the DB");
    328        
     328
    329329        delete($self->{LISTS}->{$list});
    330330        delete($self->{LISTS}) if (scalar(keys(%{$self->{LISTS}})) == 0);
  • perl/modules/Jabber/lib/Net/XMPP/Protocol.pm

    ra8c55b5 r7869e48  
    5858            comes back.  You can optionally specify a timeout so that
    5959            you do not block forever.
    60            
     60
    6161    nonblock - send the packet with an ID, but then return that id and
    6262               control to the master program.  Net::XMPP is still
     
    6969               combined with the XPath function because you can register
    7070               a one shot function tied to the id you get back.
    71                
     71
    7272
    7373=head2 Basic Functions
     
    234234                      groups=>["foo"]
    235235                     );
    236    
     236
    237237    $Con->RosterDBRemove("bob\@jabber.org");
    238238    $Con->RosterDBRemove(Net::XMPP::JID);
     
    244244
    245245    @jids = $Con->RosterDBJIDs();
    246    
     246
    247247    if ($Con->RosterDBGroupExists("foo")) { ...
    248248
    249249    @groups = $Con->RosterDBGroups();
    250    
     250
    251251    @jids = $Con->RosterDBGroupJIDs("foo");
    252    
     252
    253253    @jids = $Con->RosterDBNonGroupJIDs();
    254    
     254
    255255    %hash = $Con->RosterDBQuery("bob\@jabber.org");
    256256    %hash = $Con->RosterDBQuery(Net::XMPP::JID);
     
    340340                              then you must *NOT* specify a callback for
    341341                              presence in the SetCallBacks function.
    342  
     342
    343343                                          Net::XMPP defines a few default
    344344                                          callbacks for various types:
    345  
     345
    346346                                          "subscribe" -
    347347                                            replies with subscribed
    348                                          
     348
    349349                                          "unsubscribe" -
    350350                                            replies with unsubscribed
    351                                          
     351
    352352                                          "subscribed" -
    353353                                            replies with subscribed
    354                                          
     354
    355355                                          "unsubscribed" -
    356356                                            replies with unsubscribed
    357                                          
     357
    358358
    359359    SetMessageCallBacks(type=>function, - sets the callback functions for
     
    441441                           0   - Status ok, no data received.
    442442                         undef - Status not ok, stop processing.
    443                        
     443
    444444                       IMPORTANT: You need to check the output of every
    445445                       Process.  If you get an undef then the connection
     
    684684                            the has returned by RosterParse above, and
    685685                            is the actual hash, not a reference.
    686    
     686
    687687    RosterDBRemove(jid) - Remove a JID from the roster DB. The JID is
    688688                          either a string, or a Net::XMPP::JID object.
     
    696696    RosterDBJIDs() - returns a list of Net::XMPP::JID objects that
    697697                     represents all of the JIDs in the DB.
    698    
     698
    699699    RosterDBGroups() - returns the complete list of roster groups in the
    700700                       roster.
    701    
     701
    702702    RosterDBGroupExists(group) - return 1 if the group is a group in the
    703703                                 roster DB, undef otherwise.
     
    706706                               that represents all of the JIDs in the
    707707                               specified roster group.
    708    
     708
    709709    RosterDBNonGroupJIDs() - returns a list of Net::XMPP::JID objects
    710710                             that represents all of the JIDs not in a
     
    720720                             the given key.  The available keys are:
    721721                               name, ask, subsrcription and groups
    722                              The JID is either a string, or a 
     722                             The JID is either a string, or a
    723723                             Net::XMPP::JID object.
    724724
     
    827827    my $id;
    828828    my $tree;
    829    
     829
    830830    if (ref($object) !~ /^Net::XMPP/)
    831831    {
     
    884884                }
    885885            }
    886            
     886
    887887            return if $direct_pass;
    888888        }
     
    10931093###############################################################################
    10941094sub SetXPathCallBacks
    1095 { 
     1095{
    10961096    my $self = shift;
    10971097    my (%xpaths) = @_;
     
    11331133###############################################################################
    11341134sub SetDirectXPathCallBacks
    1135 { 
     1135{
    11361136    my $self = shift;
    11371137    my (%xpaths) = @_;
     
    15381538
    15391539    $self->{DEBUG}->Log4("PresenceDBParse: pres(",$presence->GetXML(),")");
    1540    
     1540
    15411541    my $type = $presence->GetType();
    15421542    $type = "" unless defined($type);
     
    19421942        &{$self->{CB}->{update}}() if exists($self->{CB}->{update});
    19431943    }
    1944    
     1944
    19451945    #-------------------------------------------------------------------------
    19461946    # The loop finished... but was it done?
     
    19511951        return( "system","SASL timed out authenticating");
    19521952    }
    1953    
     1953
    19541954    #-------------------------------------------------------------------------
    19551955    # Ok, it was done... but did we auth?
     
    19601960        return ( "error", $self->{STREAM}->SASLClientError($sid));
    19611961    }
    1962    
     1962
    19631963    #-------------------------------------------------------------------------
    19641964    # Phew... Restart the <stream:stream> per XMPP
     
    19671967    $self->{SESSION} = $self->{STREAM}->OpenStream($sid);
    19681968    $sid = $self->{SESSION}->{id};
    1969    
     1969
    19701970    $self->{DEBUG}->Log1("AuthSASL: We got a new session. sid($sid)");
    19711971
     
    20122012    $iq->SetIQ(type=>"set");
    20132013    my $bind = $iq->NewChild(&ConstXMLNS("xmpp-bind"));
    2014    
     2014
    20152015    if (defined($resource) && ($resource ne ""))
    20162016    {
     
    20372037    $iq->SetIQ(type=>"set");
    20382038    my $session = $iq->NewChild(&ConstXMLNS("xmpp-session"));
    2039    
     2039
    20402040    my $result = $self->SendAndReceiveWithID($iq);
    20412041}
     
    20962096    my %args;
    20972097    while($#_ >= 0) { $args{ lc pop(@_) } = pop(@_); }
    2098    
     2098
    20992099    my $iq = $self->_iq();
    21002100    $iq->SetIQ(type=>"get");
     
    21222122    my %args;
    21232123    while($#_ >= 0) { $args{ lc pop(@_) } = pop(@_); }
    2124    
     2124
    21252125    my $iq = $self->_iq();
    21262126    $iq->SetIQ(type=>"set");
     
    21812181        return $id;
    21822182    }
    2183    
     2183
    21842184    return $self->SendWithID($iq) if ($args{mode} eq "nonblock");
    21852185
     
    24432443        $jid = $jid->GetJID();
    24442444    }
    2445    
     2445
    24462446    return unless exists($self->{ROSTERDB});
    24472447    return unless exists($self->{ROSTERDB}->{JIDS});
     
    26112611        $jid = $jid->GetJID();
    26122612    }
    2613    
     2613
    26142614    return unless $self->RosterDBExists($jid);
    26152615    if (defined($key))
     
    26192619    }
    26202620    return %{$self->{ROSTERDB}->{JIDS}->{$jid}};
    2621 }                       
     2621}
    26222622
    26232623
     
    26452645            }
    26462646        }
    2647    
     2647
    26482648        delete($self->{ROSTERDB}->{JIDS}->{$jid});
    26492649    }
     
    26922692        $self->TLSClientFailure($node);
    26932693    }
    2694    
     2694
    26952695    if ($tag eq "proceed")
    26962696    {
     
    27112711    $timeout = 120 unless defined($timeout);
    27122712    $timeout = 120 if ($timeout eq "");
    2713    
     2713
    27142714    $self->TLSSendStartTLS();
    27152715
     
    27512751        $self->{TLS}->{error} = $message;
    27522752    }
    2753    
     2753
    27542754    $self->RemoveDirectXPathCallBacks('/[@xmlns="'.&ConstXMLNS("xmpp-tls").'"]'=>$TLS_CALLBACK);
    27552755}
     
    27642764{
    27652765    my $self = shift;
    2766    
     2766
    27672767    return $self->{TLS}->{secure};
    27682768}
     
    27772777{
    27782778    my $self = shift;
    2779    
     2779
    27802780    return $self->{TLS}->{done};
    27812781}
     
    27902790{
    27912791    my $self = shift;
    2792    
     2792
    27932793    return $self->{TLS}->{error};
    27942794}
     
    28042804    my $self = shift;
    28052805    my $node = shift;
    2806    
     2806
    28072807    my $type = &XML::Stream::XPath($node,"*/name()");
    28082808
     
    28212821    my $self = shift;
    28222822    my $type = shift;
    2823    
     2823
    28242824    $self->Send("<failure xmlns='".&ConstXMLNS('xmpp-tls')."'><${type}/></failure>");
    28252825}
     
    28802880        $self->SASLAnswerChallenge($node);
    28812881    }
    2882    
     2882
    28832883    if ($tag eq "failure")
    28842884    {
    28852885        $self->SASLClientFailure($node);
    28862886    }
    2887    
     2887
    28882888    if ($tag eq "success")
    28892889    {
     
    29062906    my $challenge64 = &XML::Stream::XPath($node,"text()");
    29072907    my $challenge = MIME::Base64::decode_base64($challenge64);
    2908    
     2908
    29092909    my $response = $self->SASLGetClient()->client_step($challenge);
    29102910
     
    29292929
    29302930    return unless defined($mechanisms);
    2931    
     2931
    29322932    my $sasl = new Authen::SASL(mechanism=>join(" ",@{$mechanisms}),
    29332933                                callback=>{ user => $username,
     
    29542954{
    29552955    my $self = shift;
    2956    
     2956
    29572957    return $self->{SASL}->{authed};
    29582958}
     
    29672967{
    29682968    my $self = shift;
    2969    
     2969
    29702970    return $self->{SASL}->{done};
    29712971}
     
    29802980{
    29812981    my $self = shift;
    2982    
     2982
    29832983    return $self->{SASL}->{error};
    29842984}
     
    29942994    my $self = shift;
    29952995    my $node = shift;
    2996    
     2996
    29972997    my $type = &XML::Stream::XPath($node,"*/name()");
    29982998
     
    30113011    my $self = shift;
    30123012    my $node = shift;
    3013    
     3013
    30143014    $self->{SASL}->{authed} = 1;
    30153015    $self->{SASL}->{done} = 1;
     
    30273027{
    30283028    my $self = shift;
    3029    
     3029
    30303030    return $self->{SASL}->{client};
    30313031}
     
    30683068    my $self = shift;
    30693069    my $type = shift;
    3070    
     3070
    30713071    $self->Send("<failure xmlns='".&ConstXMLNS('xmpp-sasl')."'><${type}/></failure>");
    30723072}
     
    32323232}
    32333233
    3234    
     3234
    32353235##############################################################################
    32363236#
     
    33093309{
    33103310    my $const = shift;
    3311    
     3311
    33123312    return $XMLNS{$const};
    33133313}
  • perl/modules/Jabber/lib/Net/XMPP/Roster.pm

    rc2bed55 r7869e48  
    3030  Net::XMPP::Roster is a module that provides a developer an easy
    3131  interface to an XMPP roster.  It provides high level functions to
    32   query, update, and manage a user's roster. 
     32  query, update, and manage a user's roster.
    3333
    3434=head1 DESCRIPTION
     
    3838  registers with the connection to receivce the correct packets so
    3939  that it can track all roster updates, and presence packets.
    40  
     40
    4141=head2 Basic Functions
    4242
     
    9191  These functions are only needed if you want to manually control
    9292  the Roster.
    93  
     93
    9494  $Roster->add('bob@jabber.org',
    9595               name=>"Bob",
     
    131131                otherwise.  The jid can either be a string, or a
    132132                Net::XMPP::JID object.
    133                
     133
    134134  groupExists(group) - return 1 if the group exists in the database,
    135135                       undef otherwise.
     
    236236
    237237    $self->{CONNECTION} = $args{connection};
    238    
     238
    239239    bless($self, $proto);
    240240
    241241    $self->init();
    242    
     242
    243243    return $self;
    244244}
     
    365365
    366366    $jid = $jid->GetJID() if UNIVERSAL::isa($jid,"Net::XMPP::JID");
    367    
     367
    368368    return unless exists($self->{JIDS});
    369369    return unless exists($self->{JIDS}->{$jid});
     
    489489    my $resource = $jid->GetResource();
    490490    $resource = " " unless ($resource ne "");
    491    
     491
    492492    $jid = $jid->GetJID();
    493493    $jid = "" unless defined($jid);
     
    505505    {
    506506        my %item;
    507        
     507
    508508        $item{priority} = $presence->GetPriority();
    509509        $item{priority} = 0 unless defined($item{priority});
     
    547547        }
    548548    }
    549    
     549
    550550    if ($type eq "group")
    551551    {
     
    597597
    598598    $jid = $jid->GetJID() if UNIVERSAL::isa($jid,"Net::XMPP::JID");
    599    
     599
    600600    if (defined($resource))
    601601    {
     
    604604        return $self->{JIDS}->{$jid}->{resources}->{$resource}->{priority};
    605605    }
    606    
     606
    607607    return unless exists($self->{JIDS}->{$jid}->{priorities});
    608608    my @priorities = sort{ $b <=> $a } keys(%{$self->{JIDS}->{$jid}->{priorities}});
     
    623623
    624624    $jid = $jid->GetJID() if UNIVERSAL::isa($jid,"Net::XMPP::JID");
    625    
     625
    626626    return unless $self->exists($jid);
    627627    if (defined($key))
     
    649649    {
    650650        $self->{CONNECTION}->{DEBUG}->Log3("Roster::remove: deleting $jid from the DB");
    651        
     651
    652652        if (defined($self->query($jid,"groups")))
    653653        {
     
    661661            }
    662662        }
    663    
     663
    664664        delete($self->{JIDS}->{$jid});
    665665        delete($self->{JIDS}) if (scalar(keys(%{$self->{JIDS}})) == 0);
     
    696696                    if ($self->{JIDS}->{$jid}->{priorities}->{$oldPriority}->[$index]->{resource} eq $resource);
    697697            }
    698            
     698
    699699            splice(@{$self->{JIDS}->{$jid}->{priorities}->{$oldPriority}},$loc,1);
    700700
     
    742742    my $jid = shift;
    743743    my $resource = shift;
    744    
     744
    745745    $jid = $jid->GetJID() if UNIVERSAL::isa($jid,"Net::XMPP::JID");
    746746
     
    765765
    766766    $jid = $jid->GetJID() if UNIVERSAL::isa($jid,"Net::XMPP::JID");
    767    
     767
    768768    return unless $self->resourceExists($jid,$resource);
    769769    if (defined($key))
  • perl/modules/Jabber/lib/Net/XMPP/Stanza.pm

    rc2bed55 r7869e48  
    5959
    6060=pod
    61    
    62   For more information on what these namespaces are for, visit 
     61
     62  For more information on what these namespaces are for, visit
    6363  http://www.jabber.org and browse the Jabber Programmers Guide.
    6464
     
    6666
    6767  ny:private:ns
    68  
     68
    6969  Name                        Type     Get  Set  Remove  Defined  Add
    7070  ==========================  =======  ===  ===  ======  =======  ===
    7171  Foo                         scalar    X    X     X        X
    72   Bar                         child                                X 
     72  Bar                         child                                X
    7373  Bars                        child     X
    7474  Test                        master    X    X
     
    7777
    7878    GetFoo(), SetFoo(), RemoveFoo(), DefinedFoo()
    79    
     79
    8080    AddBar()
    81    
     81
    8282    GetBars(), DefinedBars()
    83    
     83
    8484    GetTest(), SetMaster()
    8585
     
    9494  Name                        Type       Get  Set  Remove  Defined  Add
    9595  ==========================  =========  ===  ===  ======  =======  ===
    96   Digest                      scalar      X    X     X        X       
    97   Hash                        scalar      X    X     X        X       
    98   Password                    scalar      X    X     X        X       
    99   Resource                    scalar      X    X     X        X       
    100   Sequence                    scalar      X    X     X        X       
    101   Token                       scalar      X    X     X        X       
    102   Username                    scalar      X    X     X        X       
    103   Auth                        master      X    X                       
     96  Digest                      scalar      X    X     X        X
     97  Hash                        scalar      X    X     X        X
     98  Password                    scalar      X    X     X        X
     99  Resource                    scalar      X    X     X        X
     100  Sequence                    scalar      X    X     X        X
     101  Token                       scalar      X    X     X        X
     102  Username                    scalar      X    X     X        X
     103  Auth                        master      X    X
    104104
    105105=head1 jabber:iq:privacy
     
    107107  Name                        Type       Get  Set  Remove  Defined  Add
    108108  ==========================  =========  ===  ===  ======  =======  ===
    109   Active                      scalar      X    X     X        X       
    110   Default                     scalar      X    X     X        X       
    111   List                        child                                  X 
    112   Lists                       child       X          X        X       
    113   Privacy                     master      X    X                       
     109  Active                      scalar      X    X     X        X
     110  Default                     scalar      X    X     X        X
     111  List                        child                                  X
     112  Lists                       child       X          X        X
     113  Privacy                     master      X    X
    114114
    115115=head1 jabber:iq:privacy - item objects
     
    117117  Name                        Type       Get  Set  Remove  Defined  Add
    118118  ==========================  =========  ===  ===  ======  =======  ===
    119   Action                      scalar      X    X     X        X       
    120   IQ                          flag        X    X     X        X       
    121   Message                     flag        X    X     X        X       
    122   Order                       scalar      X    X     X        X       
    123   PresenceIn                  flag        X    X     X        X       
    124   PresenceOut                 flag        X    X     X        X       
    125   Type                        scalar      X    X     X        X       
    126   Value                       scalar      X    X     X        X       
    127   Item                        master      X    X                       
     119  Action                      scalar      X    X     X        X
     120  IQ                          flag        X    X     X        X
     121  Message                     flag        X    X     X        X
     122  Order                       scalar      X    X     X        X
     123  PresenceIn                  flag        X    X     X        X
     124  PresenceOut                 flag        X    X     X        X
     125  Type                        scalar      X    X     X        X
     126  Value                       scalar      X    X     X        X
     127  Item                        master      X    X
    128128
    129129=head1 jabber:iq:privacy - list objects
     
    131131  Name                        Type       Get  Set  Remove  Defined  Add
    132132  ==========================  =========  ===  ===  ======  =======  ===
    133   Name                        scalar      X    X     X        X       
    134   Item                        child                                  X 
    135   Items                       child       X          X        X       
    136   List                        master      X    X                       
     133  Name                        scalar      X    X     X        X
     134  Item                        child                                  X
     135  Items                       child       X          X        X
     136  List                        master      X    X
    137137
    138138=head1 jabber:iq:register
     
    140140  Name                        Type       Get  Set  Remove  Defined  Add
    141141  ==========================  =========  ===  ===  ======  =======  ===
    142   Address                     scalar      X    X     X        X       
    143   City                        scalar      X    X     X        X       
    144   Date                        scalar      X    X     X        X       
    145   Email                       scalar      X    X     X        X       
    146   First                       scalar      X    X     X        X       
    147   Instructions                scalar      X    X     X        X       
    148   Key                         scalar      X    X     X        X       
    149   Last                        scalar      X    X     X        X       
    150   Misc                        scalar      X    X     X        X       
    151   Name                        scalar      X    X     X        X       
    152   Nick                        scalar      X    X     X        X       
    153   Password                    scalar      X    X     X        X       
    154   Phone                       scalar      X    X     X        X       
    155   Registered                  flag        X    X     X        X       
    156   Remove                      flag        X    X     X        X       
    157   State                       scalar      X    X     X        X       
    158   Text                        scalar      X    X     X        X       
    159   URL                         scalar      X    X     X        X       
    160   Username                    scalar      X    X     X        X       
    161   Zip                         scalar      X    X     X        X       
    162   Register                    master      X    X                       
     142  Address                     scalar      X    X     X        X
     143  City                        scalar      X    X     X        X
     144  Date                        scalar      X    X     X        X
     145  Email                       scalar      X    X     X        X
     146  First                       scalar      X    X     X        X
     147  Instructions                scalar      X    X     X        X
     148  Key                         scalar      X    X     X        X
     149  Last                        scalar      X    X     X        X
     150  Misc                        scalar      X    X     X        X
     151  Name                        scalar      X    X     X        X
     152  Nick                        scalar      X    X     X        X
     153  Password                    scalar      X    X     X        X
     154  Phone                       scalar      X    X     X        X
     155  Registered                  flag        X    X     X        X
     156  Remove                      flag        X    X     X        X
     157  State                       scalar      X    X     X        X
     158  Text                        scalar      X    X     X        X
     159  URL                         scalar      X    X     X        X
     160  Username                    scalar      X    X     X        X
     161  Zip                         scalar      X    X     X        X
     162  Register                    master      X    X
    163163
    164164=head1 jabber:iq:roster
     
    166166  Name                        Type       Get  Set  Remove  Defined  Add
    167167  ==========================  =========  ===  ===  ======  =======  ===
    168   Item                        child                                  X 
    169   Items                       child       X                           
    170   Roster                      master      X    X                       
     168  Item                        child                                  X
     169  Items                       child       X
     170  Roster                      master      X    X
    171171
    172172=head1 jabber:iq:roster - item objects
     
    174174  Name                        Type       Get  Set  Remove  Defined  Add
    175175  ==========================  =========  ===  ===  ======  =======  ===
    176   Ask                         scalar      X    X     X        X       
    177   Group                       array       X    X     X        X       
    178   JID                         jid         X    X     X        X       
    179   Name                        scalar      X    X     X        X       
    180   Subscription                scalar      X    X     X        X       
    181   Item                        master      X    X                       
     176  Ask                         scalar      X    X     X        X
     177  Group                       array       X    X     X        X
     178  JID                         jid         X    X     X        X
     179  Name                        scalar      X    X     X        X
     180  Subscription                scalar      X    X     X        X
     181  Item                        master      X    X
    182182
    183183=head1 urn:ietf:params:xml:ns:xmpp-bind
     
    185185  Name                        Type       Get  Set  Remove  Defined  Add
    186186  ==========================  =========  ===  ===  ======  =======  ===
    187   JID                         jid         X    X     X        X       
    188   Resource                    scalar      X    X     X        X       
    189   Bind                        master      X    X                       
     187  JID                         jid         X    X     X        X
     188  Resource                    scalar      X    X     X        X
     189  Bind                        master      X    X
    190190
    191191=head1 urn:ietf:params:xml:ns:xmpp-session
     
    193193  Name                        Type       Get  Set  Remove  Defined  Add
    194194  ==========================  =========  ===  ===  ======  =======  ===
    195   Session                     master      X    X                       
     195  Session                     master      X    X
    196196
    197197
     
    233233
    234234    $self->{FUNCS} = \%FUNCTIONS;
    235    
     235
    236236    my $result = $self->_init(@_);
    237237
    238238    return $result if defined($result);
    239    
     239
    240240    return $self;
    241241}
     
    309309#
    310310##############################################################################
    311 sub GetXML 
     311sub GetXML
    312312{
    313313    my $self = shift;
     
    324324{
    325325    my $self = shift;
    326    
     326
    327327    return $self->{TAG};
    328328}
     
    345345    $node->remove_attrib("xmlns")
    346346        if (exists($self->{SKIPXMLNS}) && ($keepXMLNS == 0));
    347    
     347
    348348    foreach my $child (@{$self->{CHILDREN}})
    349349    {
     
    365365
    366366    return $node;
    367 } 
     367}
    368368
    369369
     
    379379    my $xmlns = shift;
    380380    my $tag = shift;
    381    
     381
    382382    return unless exists($Net::XMPP::Namespaces::NS{$xmlns});
    383383
     
    388388            if exists($Net::XMPP::Namespaces::NS{$xmlns});
    389389    }
    390    
     390
    391391    my $node = new XML::Stream::Node($tag);
    392392    $node->put_attrib(xmlns=>$xmlns);
     
    445445    my $xmlns = shift;
    446446    my $tag = shift;
    447    
     447
    448448    return unless exists($Net::XMPP::Namespaces::NS{$xmlns});
    449449
     
    454454            if exists($Net::XMPP::Namespaces::NS{$xmlns});
    455455    }
    456    
     456
    457457    my $node = new XML::Stream::Node($tag);
    458458    $node->put_attrib(xmlns=>$xmlns);
     
    592592
    593593    #$self->_debug("_xpath_AUTOLOAD: setFuncs(",join(",",@setFuncs),")");
    594                
    595    
     594
     595
    596596    my $type = (exists($funcs->{$var}->{type}) ?
    597597                $funcs->{$var}->{type} :
     
    607607
    608608    my $child = "";
    609    
     609
    610610    #-------------------------------------------------------------------------
    611611    # When this is a master function... change the above variables...
     
    630630                        (ref($funcType) eq "ARRAY"));
    631631            }
    632                
     632
    633633            $child = \@newSetFuncs;
    634634        }
     
    644644    {
    645645        $child = $funcs->{$var}->{child};
    646                
     646
    647647        #$self->_debug("_xpath_AUTOLOAD: child($child)");
    648                
     648
    649649        if (exists($child->{ns}))
    650650        {
    651651            my $addXMLNS = $child->{ns};
    652                
     652
    653653            my $addFuncs = $Net::XMPP::Namespaces::NS{$addXMLNS}->{xpath};
    654654            my @calls =
     
    691691
    692692    my $funcs;
    693    
     693
    694694    my $coreFuncs = $self->{FUNCS};
    695695    #eval "\$coreFuncs = \\%".$package."::FUNCTIONS";
     
    750750
    751751    #$self->_debug("_xpath: call($call) args(",join(",",@_),")");
    752    
     752
    753753    if ($call eq "Get")        { return $self->_xpath_get(@_)    ; }
    754754    elsif ($call eq "Set")     { return $self->_xpath_set(@_);     }
     
    761761##############################################################################
    762762#
    763 # _xpath_get - returns the value stored in the node 
     763# _xpath_get - returns the value stored in the node
    764764#
    765765##############################################################################
     
    771771    my $childtype = shift;
    772772    my ($arg0) = shift;
    773    
     773
    774774    #$self->_debug("_xpath_get: self($self) type($type) xpath($xpath) childtype($childtype)");
    775775    #$self->{TREE}->debug();
     
    777777    my $subType;
    778778    ($type,$subType) = $self->_xpath_resolve_types($type);
    779    
     779
    780780
    781781    #-------------------------------------------------------------------------
     
    785785    {
    786786        my %fields;
    787        
     787
    788788        foreach my $func (sort {$a cmp $b} @{$childtype})
    789789        {
     
    808808        return %fields;
    809809    }
    810    
     810
    811811    #-------------------------------------------------------------------------
    812812    # type == node
     
    814814    # XXX Remove this if there are no problems
    815815    #if ($type eq "node")
    816     #{ 
     816    #{
    817817        #$self->_debug("_xpath_get: node: xmlns($arg0)") if defined($arg0);
    818818
     
    825825            #push(@results,$child)
    826826            #     if (!defined($arg0) ||
    827             #         ($arg0 eq "") || 
     827            #         ($arg0 eq "") ||
    828828            #         ($child->GetTree(1)->get_attrib("xmlns") eq $arg0));
    829829            #}
     
    866866        return $#nodes > -1;
    867867    }
    868    
     868
    869869    #-------------------------------------------------------------------------
    870870    # type == array
     
    875875        return $nodes[0];
    876876    }
    877    
     877
    878878    #-------------------------------------------------------------------------
    879879    # type == raw
     
    884884
    885885        return join("",@{$self->{RAWXML}}) if ($#{$self->{RAWXML}} > -1);
    886        
     886
    887887        foreach my $node (@nodes)
    888888        {
     
    10471047        #$self->_debug("_xpath_set: val($val)") unless !defined($val);
    10481048        #$self->_debug("_xpath_set: path($path)");
    1049    
     1049
    10501050        my $childPath = "";
    10511051        while(($path !~ /^\/?\@/) && ($path !~ /^\/?text\(\)/))
     
    10561056            #$self->_debug("_xpath_set: path($path)");
    10571057            #$self->_debug("_xpath_set: childPath($childPath)");
    1058            
     1058
    10591059            if (($type eq "scalar") || ($type eq "jid") || ($type eq "timestamp"))
    10601060            {
    10611061                my $tmpPath = $child;
    10621062                $tmpPath = "$childPath/$child" if ($childPath ne "");
    1063                
     1063
    10641064                my @nodes = $self->{TREE}->XPath("$tmpPath");
    10651065                #$self->_debug("_xpath_set: \$#nodes($#nodes)");
     
    10921092                return;
    10931093            }
    1094            
     1094
    10951095            $childPath .= "/" unless ($childPath eq "");
    10961096            $childPath .= $child;
     
    10981098
    10991099        my ($piece) = ($path =~ /^\/?([^\/]+)/);
    1100    
     1100
    11011101        #$self->_debug("_xpath_set: piece($piece)");
    11021102
     
    11451145    my @nodes = $self->{TREE}->XPath($xpath);
    11461146    my $defined = ($#nodes > -1);
    1147    
     1147
    11481148    #$self->_debug("_xpath_defined: nodes(",join(",",@nodes),")");
    11491149    #$self->_debug("_xpath_defined: ",$#nodes);
    1150    
     1150
    11511151    if (!$defined && (($type eq "child") || ($type eq "children") || ($type eq "node")))
    11521152    {
     
    11551155            $ns = $childtype->{ns};
    11561156        }
    1157    
     1157
    11581158        foreach my $packet (@{$self->{CHILDREN}})
    11591159        {
     
    11741174##############################################################################
    11751175#
    1176 # _xpath_add - returns the value stored in the node 
     1176# _xpath_add - returns the value stored in the node
    11771177#
    11781178##############################################################################
     
    12421242
    12431243    #$self->_debug("_xpath_remove: nodes($#nodes)");
    1244    
     1244
    12451245    if ($xpath =~ /\@(\S+)/)
    12461246    {
    12471247        my $attrib = $1;
    12481248        #$self->_debug("_xpath_remove: attrib($attrib)");
    1249        
     1249
    12501250        if ($nodePath eq "")
    12511251        {
     
    12611261        return;
    12621262    }
    1263    
     1263
    12641264    foreach my $node (@nodes)
    12651265    {
     
    12921292    my $self = shift;
    12931293    my $type = shift;
    1294    
     1294
    12951295    my $subType = "";
    12961296    if (ref($type) eq "ARRAY")
     
    13071307        }
    13081308    }
    1309    
     1309
    13101310    #$self->_debug("_xpath_resolve_types: type($type) subtype($subType)");
    13111311
  • perl/modules/Jabber/lib/XML/Stream.pm

    ra8d5a39 r7869e48  
    317317
    318318        my $lc = lc($module);
    319        
     319
    320320        eval("\$HANDLERS{\$lc}->{startElement} = \\&XML::Stream::${module}::_handle_element;");
    321321        eval("\$HANDLERS{\$lc}->{endElement}   = \\&XML::Stream::${module}::_handle_close;");
     
    600600
    601601    my $root = $self->GetRoot($sid);
    602    
     602
    603603    if ($root->{xmlns} ne $self->{SIDS}->{$serverid}->{namespace})
    604604    {
     
    668668    }
    669669    while($#_ >= 0) { $self->{SIDS}->{newconnection}->{ lc pop(@_) } = pop(@_); }
    670    
     670
    671671    my $timeout = exists($self->{SIDS}->{newconnection}->{timeout}) ?
    672672                  delete($self->{SIDS}->{newconnection}->{timeout}) :
     
    674674
    675675    $self->debug(4,"Connect: timeout($timeout)");
    676    
     676
    677677
    678678    if (exists($self->{SIDS}->{newconnection}->{srv}))
     
    683683            my $res = Net::DNS::Resolver->new();
    684684            my $query = $res->query($self->{SIDS}->{newconnection}->{srv}.".".$self->{SIDS}->{newconnection}->{hostname},"SRV");
    685            
     685
    686686            if ($query)
    687             { 
     687            {
    688688                $self->{SIDS}->{newconnection}->{hostname} = ($query->answer)[0]->target();
    689689                $self->{SIDS}->{newconnection}->{port} = ($query->answer)[0]->port();
     
    771771        $self->{SIDS}->{newconnection}->{sock} =
    772772            new FileHandle(">&STDOUT");
    773     } 
     773    }
    774774
    775775    #---------------------------------------------------------------------------
     
    10301030    #---------------------------------------------------------------------------
    10311031    my %stream_args;
    1032    
     1032
    10331033    if (($self->{SIDS}->{$currsid}->{connectiontype} eq "tcpip") ||
    10341034        ($self->{SIDS}->{$currsid}->{connectiontype} eq "http"))
     
    10361036        $stream_args{to}= $self->{SIDS}->{$currsid}->{hostname}
    10371037            unless exists($self->{SIDS}->{$currsid}->{to});
    1038        
     1038
    10391039        $stream_args{to} = $self->{SIDS}->{$currsid}->{to}
    10401040            if exists($self->{SIDS}->{$currsid}->{to});
     
    10441044                ($self->{SIDS}->{$currsid}->{myhostname} ne "")
    10451045               );
    1046        
     1046
    10471047        $stream_args{from} = $self->{SIDS}->{$currsid}->{from}
    10481048            if exists($self->{SIDS}->{$currsid}->{from});
    1049        
     1049
    10501050        $stream_args{id} = $self->{SIDS}->{$currsid}->{id}
    10511051            if (exists($self->{SIDS}->{$currsid}->{id}) &&
     
    10551055        $stream_args{namespaces} = $self->{SIDS}->{$currsid}->{namespaces};
    10561056    }
    1057    
     1057
    10581058    my $stream =
    10591059        $self->StreamHeader(
     
    11721172        }
    11731173    }
    1174        
     1174
    11751175    return $self->GetRoot($sid);
    11761176}
     
    13331333    #---------------------------------------------------------------------------
    13341334    $self->{SIDS}->{$sid}->{streamfeatures}->{received} = 0;
    1335    
     1335
    13361336    #---------------------------------------------------------------------------
    13371337    # First acitivty is the connection... duh. =)
     
    15221522                $self->debug(4,"Process: sid($sid) time(",time,") timeout(undef)");
    15231523            }
    1524            
     1524
    15251525            $self->Respond($sid)
    15261526                if (exists($self->{SIDS}->{$sid}->{activitytimeout}) &&
     
    16371637    $self->debug(3,"Send: sid($sid)");
    16381638    $self->debug(3,"Send: status($self->{SIDS}->{$sid}->{status})");
    1639    
     1639
    16401640    $self->{SIDS}->{$sid}->{keepalive} = time;
    16411641
     
    16771677                return;
    16781678            }
    1679            
     1679
    16801680            $self->debug(4,"Send: SENDWRITTEN($self->{SENDWRITTEN})");
    16811681
     
    17361736        }
    17371737    }
    1738    
     1738
    17391739    #-------------------------------------------------------------------------
    17401740    # XMPP-TLS - 1.0
     
    17531753        }
    17541754    }
    1755    
     1755
    17561756    #-------------------------------------------------------------------------
    17571757    # XMPP-Bind - 1.0
     
    17621762        $self->{SIDS}->{$sid}->{streamfeatures}->{'xmpp-bind'} = 1;
    17631763    }
    1764    
     1764
    17651765    #-------------------------------------------------------------------------
    17661766    # XMPP-Session - 1.0
     
    17711771        $self->{SIDS}->{$sid}->{streamfeatures}->{'xmpp-session'} = 1;
    17721772    }
    1773    
     1773
    17741774}
    17751775
     
    18331833        $self->TLSClientFailure($sid,$node);
    18341834    }
    1835    
     1835
    18361836    if ($tag eq "proceed")
    18371837    {
     
    18531853    $timeout = 120 unless defined($timeout);
    18541854    $timeout = 120 if ($timeout eq "");
    1855    
     1855
    18561856    $self->TLSStartTLS($sid);
    18571857
     
    19041904        return;
    19051905    }
    1906    
     1906
    19071907    IO::Socket::SSL->start_SSL($self->{SIDS}->{$sid}->{sock},{SSL_verify_mode=>0x00});
    19081908
     
    19101910    $self->debug(1,"TLSClientProceed: SSL: We are secure")
    19111911        if ($self->{SIDS}->{$sid}->{sock});
    1912    
     1912
    19131913    $self->{SIDS}->{$sid}->{tls}->{done} = 1;
    19141914    $self->{SIDS}->{$sid}->{tls}->{secure} = 1;
     
    19251925    my $self = shift;
    19261926    my $sid = shift;
    1927    
     1927
    19281928    return $self->{SIDS}->{$sid}->{tls}->{secure};
    19291929}
     
    19391939    my $self = shift;
    19401940    my $sid = shift;
    1941    
     1941
    19421942    return $self->{SIDS}->{$sid}->{tls}->{done};
    19431943}
     
    19531953    my $self = shift;
    19541954    my $sid = shift;
    1955    
     1955
    19561956    return $self->{SIDS}->{$sid}->{tls}->{error};
    19571957}
     
    19681968    my $sid = shift;
    19691969    my $node = shift;
    1970    
     1970
    19711971    my $type = &XPath($node,"*/name()");
    19721972
     
    19861986    my $sid = shift;
    19871987    my $type = shift;
    1988    
     1988
    19891989    $self->Send($sid,"<failure xmlns='".&ConstXMLNS('xmpp-tls')."'><${type}/></failure>");
    19901990}
     
    20182018        $self->SASLAnswerChallenge($sid,$node);
    20192019    }
    2020    
     2020
    20212021    if ($tag eq "failure")
    20222022    {
    20232023        $self->SASLClientFailure($sid,$node);
    20242024    }
    2025    
     2025
    20262026    if ($tag eq "success")
    20272027    {
     
    20452045    my $challenge64 = &XPath($node,"text()");
    20462046    my $challenge = MIME::Base64::decode_base64($challenge64);
    2047    
     2047
    20482048    #-------------------------------------------------------------------------
    20492049    # As far as I can tell, if the challenge contains rspauth, then we authed.
     
    21122112
    21132113    return unless defined($mechanisms);
    2114    
     2114
    21152115    my $sasl = new Authen::SASL(mechanism=>join(" ",@{$mechanisms}),
    21162116                                callback=>{
     
    21402140    my $self = shift;
    21412141    my $sid = shift;
    2142    
     2142
    21432143    return $self->{SIDS}->{$sid}->{sasl}->{authed};
    21442144}
     
    21542154    my $self = shift;
    21552155    my $sid = shift;
    2156    
     2156
    21572157    return $self->{SIDS}->{$sid}->{sasl}->{done};
    21582158}
     
    21682168    my $self = shift;
    21692169    my $sid = shift;
    2170    
     2170
    21712171    return $self->{SIDS}->{$sid}->{sasl}->{error};
    21722172}
     
    21832183    my $sid = shift;
    21842184    my $node = shift;
    2185    
     2185
    21862186    my $type = &XPath($node,"*/name()");
    21872187
     
    22012201    my $sid = shift;
    22022202    my $node = shift;
    2203    
     2203
    22042204    $self->{SIDS}->{$sid}->{sasl}->{authed} = 1;
    22052205    $self->{SIDS}->{$sid}->{sasl}->{done} = 1;
     
    22172217    my $sid = shift;
    22182218    my $type = shift;
    2219    
     2219
    22202220    $self->Send($sid,"<failure xmlns='".&ConstXMLNS('xmpp-sasl')."'><${type}/></failure>");
    22212221}
     
    22922292        # Make sure we are receiving a valid stream on the same namespace.
    22932293        #---------------------------------------------------------------------
    2294        
     2294
    22952295        $self->debug(3,"_handle_root: ($self->{SIDS}->{$self->{SIDS}->{$sid}->{serverid}}->{namespace})");
    22962296        $self->{SIDS}->{$sid}->{status} =
     
    23282328        }
    23292329    }
    2330    
     2330
    23312331    #-------------------------------------------------------------------------
    23322332    # Sometimes we will get an error, so let's parse the tag assuming that we
     
    23352335    my $stream_prefix = $self->StreamPrefix($sid);
    23362336    $self->debug(5,"_handle_root: stream_prefix($stream_prefix)");
    2337    
     2337
    23382338    if ($tag eq $stream_prefix.":error")
    23392339    {
     
    24412441    $self->{SIDS}->{$sid}->{streamerror}->{type} = "unknown";
    24422442    $self->{SIDS}->{$sid}->{streamerror}->{node} = $node;
    2443    
     2443
    24442444    #-------------------------------------------------------------------------
    24452445    # Check for older 0.9 streams and handle the errors for them.
     
    26762676    my $tree = shift;
    26772677    my $path = shift;
    2678    
     2678
    26792679    my $query = new XML::Stream::XPath::Query($path);
    26802680    my $result = $query->execute($tree);
     
    26832683        my %attribs = $result->getAttribs();
    26842684        return %attribs if (scalar(keys(%attribs)) > 0);
    2685        
     2685
    26862686        my @values = $result->getValues();
    26872687        @values = $result->getList() unless ($#values > -1);
     
    27032703    my $tree = shift;
    27042704    my $path = shift;
    2705    
     2705
    27062706    my $query = new XML::Stream::XPath::Query($path);
    27072707    my $result = $query->execute($tree);
     
    28912891{
    28922892    my $const = shift;
    2893    
     2893
    28942894    return $XMLNS{$const};
    28952895}
     
    29052905    my $self = shift;
    29062906    my $sid = shift;
    2907    
     2907
    29082908    return $self->ns2prefix($sid,&ConstXMLNS("stream"));
    29092909}
     
    29912991
    29922992    $self->debug(1,"LoadSSL: Load the IO::Socket::SSL module");
    2993    
     2993
    29942994    if (defined($SSL) && ($SSL == 1))
    29952995    {
     
    29972997        return 1;
    29982998    }
    2999    
     2999
    30003000    if (defined($SSL) && ($SSL == 0))
    30013001    {
     
    31063106        $stream .= " ".$ns->GetStream();
    31073107    }
    3108    
     3108
    31093109    $stream .= ">";
    31103110
  • perl/modules/Jabber/lib/XML/Stream/Namespace.pm

    rc2bed55 r7869e48  
    2525=head1 NAME
    2626
    27 XML::Stream::Namespace - Object to make defining Namespaces easier in 
     27XML::Stream::Namespace - Object to make defining Namespaces easier in
    2828                         XML::Stream.
    2929
     
    4949  GetAttributes() returns a hash ( attrib1=>"value1",attrib2=>"value2")
    5050  GetStream() returns the following string:
    51     "xmlns:mynamespace='http://www.nynamespace.com/xmlns' 
    52      mynamespace:attrib1='value1' 
     51    "xmlns:mynamespace='http://www.nynamespace.com/xmlns'
     52     mynamespace:attrib1='value1'
    5353     mynamespace:attrib2='value2'"
    5454
     
    7171  # of the stream to foo.bar.org:1234...
    7272  #
    73   #   <stream:stream 
     73  #   <stream:stream
    7474  #    xmlns:stream="http://etherx.jabber.org/streams"
    7575  #    to="foo.bar.org"
    76   #    xmlns="foo:bar" 
     76  #    xmlns="foo:bar"
    7777  #    xmlns:mynamespace="http://www.mynamespace.org/xmlns"
    7878  #    mynamespace:foo="bar"
    7979  #    mynamespace:bob="vila">
    8080  #
    81    
     81
    8282
    8383=head1 AUTHOR
     
    183183    $string .= "='".$self->GetAttributes($attrib)."'";
    184184  }
    185    
     185
    186186  return $string;
    187187}
  • perl/modules/Jabber/lib/XML/Stream/Node.pm

    rc2bed55 r7869e48  
    8585
    8686  remove_child(node) - removes the child node from the current node.
    87  
     87
    8888  remove_cdata() - removes all of the cdata children from the current node.
    8989
     
    120120
    121121  XPath(path) - run XML::Stream::XPath on this node.
    122  
     122
    123123  XPathCheck(path) - run XML::Stream::XPath on this node and return 1 or 0
    124124                     to see if it matches or not.
     
    266266
    267267    return $cdata;
    268 } 
     268}
    269269
    270270
     
    286286        splice(@{$self->{CHILDREN}},$index,1);
    287287    }
    288 } 
     288}
    289289
    290290
     
    294294    return () unless exists($self->{ATTRIBS});
    295295    return %{$self->{ATTRIBS}};
    296 } 
     296}
    297297
    298298
     
    308308
    309309sub put_attrib
    310 { 
     310{
    311311    my $self = shift;
    312312    my (%att) = @_;
     
    366366    my ($tag) = @_;
    367367
    368     $self->{TAG} = $tag; 
     368    $self->{TAG} = $tag;
    369369}
    370370
     
    513513
    514514    $self->debug(2,"Node: _handle_close: check2(",$#{$self->{SIDS}->{$sid}->{node}},")");
    515    
     515
    516516    if($#{$self->{SIDS}->{$sid}->{node}} == -1)
    517517    {
     
    521521        {
    522522            my $stream_prefix = $self->StreamPrefix($sid);
    523            
     523
    524524            if(defined($self->{SIDS}->{$sid}->{node}->[0]) &&
    525525               ($self->{SIDS}->{$sid}->{node}->[0]->get_tag() =~ /^${stream_prefix}\:/))
     
    542542                {
    543543                    my $xmlns = $node->get_attrib("xmlns");
    544                    
     544
    545545                    $self->ProcessSASLPacket($sid,$node)
    546546                        if ($xmlns eq &XML::Stream::ConstXMLNS("xmpp-sasl"));
  • perl/modules/Jabber/lib/XML/Stream/Parser.pm

    rc2bed55 r7869e48  
    324324                $self->{CNAME}->[$self->{CURR}] = $name;
    325325            }
    326    
     326
    327327            $self->{XML} = substr($self->{XML},$close+1,length($self->{XML})-$close-1);
    328328            next;
     
    337337                return $self->returnData(0);
    338338            }
    339            
     339
    340340            &{$self->{HANDLER}->{characters}}($self,substr($self->{XML},9,$cdataclose-9));
    341            
     341
    342342            $self->{XML} = substr($self->{XML},$cdataclose+3,length($self->{XML})-$cdataclose-3);
    343343            next;
     
    510510    return unless ($self->{DOC} == 1);
    511511
    512     if ($self->{STYLE} eq "debug") 
     512    if ($self->{STYLE} eq "debug")
    513513    {
    514514        my $str = $cdata;
     
    530530            push @{$self->{TREE}[$#{$self->{TREE}}]}, 0;
    531531            push @{$self->{TREE}[$#{$self->{TREE}}]}, $cdata;
    532         } 
     532        }
    533533    }
    534534}
  • perl/modules/Jabber/lib/XML/Stream/Tree.pm

    rc2bed55 r7869e48  
    142142        push @{$self->{SIDS}->{$sid}->{tree}[$#{$self->{SIDS}->{$sid}->{tree}}]}, 0;
    143143        push @{$self->{SIDS}->{$sid}->{tree}[$#{$self->{SIDS}->{$sid}->{tree}}]}, $cdata;
    144     } 
     144    }
    145145}
    146146
     
    187187            if(defined($self->{SIDS}->{$sid}->{tree}->[0]) &&
    188188               ($self->{SIDS}->{$sid}->{tree}->[0] =~ /^${stream_prefix}\:/))
    189             { 
     189            {
    190190                my @tree = @{$self->{SIDS}->{$sid}->{tree}};
    191191                $self->{SIDS}->{$sid}->{tree} = [];
     
    196196                my @tree = @{$self->{SIDS}->{$sid}->{tree}};
    197197                $self->{SIDS}->{$sid}->{tree} = [];
    198                
     198
    199199                my @special =
    200200                    &XML::Stream::XPath(
     
    384384                    return 1;
    385385                }
    386                
     386
    387387                #---------------------------------------------------------------------
    388388                # Return the raw CDATA value without mark ups, or the value of the
     
    592592
    593593    my $str = "";
    594     if (ref($parseTree->[0]) eq "") 
     594    if (ref($parseTree->[0]) eq "")
    595595    {
    596596        if ($parseTree->[0] eq "0")
     
    608608        {
    609609            $str .= ">";
    610            
     610
    611611            my $index = 1;
    612612            while($index <= $#{$parseTree->[1]})
     
    616616                $index += 2;
    617617            }
    618            
     618
    619619            $str .= $rawXML if defined($rawXML);
    620620            $str .= "</".$parseTree->[0].">";
  • perl/modules/Jabber/lib/XML/Stream/XPath/Op.pm

    rc2bed55 r7869e48  
    5050    $self->{TYPE} = shift;
    5151    $self->{VALUE} = shift;
    52    
     52
    5353    return $self;
    5454}
     
    165165        {
    166166            push(@valid_elems,$elem);
    167         }   
    168     }
    169 
    170     $$ctxt->setList(@valid_elems);
    171    
     167        }
     168    }
     169
     170    $$ctxt->setList(@valid_elems);
     171
    172172    if ($#valid_elems == -1)
    173173    {
     
    224224
    225225    my @valid_elems;
    226    
     226
    227227    foreach my $elem (@elems)
    228228    {
    229229        push(@valid_elems,$self->descend($elem));
    230230    }
    231    
     231
    232232    $$ctxt->setList(@valid_elems);
    233233
     
    247247
    248248    my @valid_elems;
    249    
     249
    250250    if (($self->{VALUE} eq "*") || (&XML::Stream::GetXMLData("tag",$elem) eq $self->{VALUE}))
    251251    {
    252252        push(@valid_elems,$elem);
    253253    }
    254    
     254
    255255    foreach my $child (&XML::Stream::GetXMLData("child array",$elem,"*"))
    256256    {
    257257        push(@valid_elems,$self->descend($child));
    258258    }
    259    
     259
    260260    return @valid_elems;
    261261}
     
    326326        }
    327327    }
    328    
     328
    329329    $$ctxt->setList(@valid_elems);
    330330
     
    343343    my $elem = shift;
    344344    return &XML::Stream::GetXMLData("value",$elem);
    345 } 
     345}
    346346
    347347
     
    374374    $tmp_ctxt->setList($$ctxt->getList());
    375375    $tmp_ctxt->in_context(0);
    376    
     376
    377377    if (!$self->{OP_L}->isValid(\$tmp_ctxt) || !$self->{OP_R}->isValid(\$tmp_ctxt))
    378378    {
     
    393393        @valid_elems = $$ctxt->getList();
    394394    }
    395    
     395
    396396    $$ctxt->setList(@valid_elems);
    397397
     
    414414    print $space,"    op_l: ";
    415415    $self->{OP_L}->display($space."    ");
    416    
     416
    417417    print $space,"    op_r: ";
    418418    $self->{OP_R}->display($space."    ");
     
    449449    $tmp_ctxt->setList($$ctxt->getList());
    450450    $tmp_ctxt->in_context(0);
    451    
     451
    452452    if (!$self->{OP_L}->isValid(\$tmp_ctxt) || !$self->{OP_R}->isValid(\$tmp_ctxt))
    453453    {
     
    468468        @valid_elems = $$ctxt->getList();
    469469    }
    470    
     470
    471471    $$ctxt->setList(@valid_elems);
    472472
     
    489489    print $space,"    op_l: ";
    490490    $self->{OP_L}->display($space."    ");
    491    
     491
    492492    print $space,"    op_r: ";
    493493    $self->{OP_R}->display($space."    ");
     
    524524    my @values;
    525525    my %attribs;
    526    
     526
    527527    foreach my $elem (@elems)
    528528    {
     
    558558        return;
    559559    }
    560    
     560
    561561    return 1;
    562562}
     
    607607    my $opl = $self->{OP_L}->isValid($ctxt);
    608608    my $opr = $self->{OP_R}->isValid($ctxt);
    609    
     609
    610610    if ($opl && $opr)
    611611    {
     
    628628    print $space,"  op_l: \n";
    629629    $self->{OP_L}->display($space."    ");
    630    
     630
    631631    print $space,"  op_r: \n";
    632632    $self->{OP_R}->display($space."    ");
     
    672672        my $opl = $self->{OP_L}->isValid(\$tmp_ctxt_l);
    673673        my $opr = $self->{OP_R}->isValid(\$tmp_ctxt_r);
    674    
     674
    675675        if ($opl || $opr)
    676676        {
    677677            push(@valid_elems,$elem);
    678         }   
    679     }
    680 
    681     $$ctxt->setList(@valid_elems);
    682    
     678        }
     679    }
     680
     681    $$ctxt->setList(@valid_elems);
     682
    683683    if ($#valid_elems == -1)
    684684    {
     
    699699    print "$space    op_l: ";
    700700    $self->{OP_L}->display("$space    ");
    701    
     701
    702702    print "$space    op_r: ";
    703703    $self->{OP_R}->display("$space    ");
     
    750750    my $self = shift;
    751751    my $elem = shift;
    752    
     752
    753753    my $result;
    754754    eval("\$result = &{\$XML::Stream::XPath::VALUES{\$self->{VALUE}}}(\$elem);");
     
    790790            push(@valid_elems,$elem);
    791791            push(@valid_values,$text);
    792         }   
     792        }
    793793    }
    794794
    795795    $$ctxt->setList(@valid_elems);
    796796    $$ctxt->setValues(@valid_values);
    797    
     797
    798798    if ($#valid_elems == -1)
    799799    {
     
    819819        {
    820820            push(@valid_elems,$elem);
    821         }   
    822     }
    823 
    824     $$ctxt->setList(@valid_elems);
    825    
     821        }
     822    }
     823
     824    $$ctxt->setList(@valid_elems);
     825
    826826    if ($#valid_elems == -1)
    827827    {
     
    848848            push(@valid_elems,$elem);
    849849            push(@valid_values,$text);
    850         }   
     850        }
    851851    }
    852852
    853853    $$ctxt->setList(@valid_elems);
    854854    $$ctxt->setValues(@valid_values);
    855    
     855
    856856    if ($#valid_elems == -1)
    857857    {
     
    878878        {
    879879            push(@valid_elems,$elem);
    880         }   
    881     }
    882 
    883     $$ctxt->setList(@valid_elems);
    884    
     880        }
     881    }
     882
     883    $$ctxt->setList(@valid_elems);
     884
    885885    if ($#valid_elems == -1)
    886886    {
  • perl/modules/Jabber/lib/XML/Stream/XPath/Query.pm

    rc2bed55 r7869e48  
    3737    bless($self,$proto);
    3838
    39     $self->{TOKENS} = [ '/','[',']','@','"',"'",'=','!','(',')',':',' ',',']; 
     39    $self->{TOKENS} = [ '/','[',']','@','"',"'",'=','!','(',')',':',' ',','];
    4040    $self->{QUERY} = shift;
    41    
     41
    4242    if (!defined($self->{QUERY}) || ($self->{QUERY} eq ""))
    4343    {
    4444        confess("No query string specified");
    4545    }
    46    
     46
    4747    $self->parseQuery();
    48    
     48
    4949    return $self;
    5050}
     
    5252
    5353sub getNextToken
    54 { 
     54{
    5555    my $self = shift;
    5656    my $pos = shift;
     
    104104        my $token_start = ++$$pos;
    105105        my $ident;
    106      
     106
    107107        if (defined($token))
    108108        {
     
    193193                        return;
    194194                    }
    195                    
     195
    196196                    $$pos = $token_start;
    197197                    my $val = $self->getNextIdentifier($pos);
     
    234234
    235235                $self->getOp($pos,$token);
    236                
     236
    237237                foreach my $arg ($op_pos..$#{$self->{OPS}})
    238238                {
     
    241241
    242242                splice(@{$self->{OPS}},$op_pos);
    243                
     243
    244244            }
    245245            elsif ($token eq ")")
     
    261261                    confess("Found ',' but not in a function");
    262262                }
    263  
     263
    264264            }
    265265            elsif ($token eq "=")
     
    280280                }
    281281                $$pos++;
    282                
     282
    283283                my $tmp_op;
    284284                while(!defined($tmp_op))
     
    307307            confess("Token undefined");
    308308        }
    309        
     309
    310310        $loop = 0 unless $in_context;
    311311    }
  • perl/modules/Jabber/lib/XML/Stream/XPath/Value.pm

    rc2bed55 r7869e48  
    9696
    9797sub getAttribs
    98 { 
     98{
    9999    my $self = shift;
    100100    return unless (scalar(keys(%{$self->{ATTRIBS}})) > 0);
  • perl/modules/Twitter/lib/BarnOwl/Module/Twitter.pm

    rb8a3e00 r7869e48  
    137137        my $twitter_args = { username   => $cfg->{user},
    138138                             password   => $cfg->{password},
    139                              source     => 'barnowl', 
     139                             source     => 'barnowl',
    140140                         };
    141141        if (defined $cfg->{service}) {
     
    230230        my $handle = find_account($account);
    231231        $handle->twitter(@_);
    232     } 
     232    }
    233233    else {
    234234        # broadcast
     
    258258    summary     => 'Send a Twitter @ message',
    259259    usage       => 'twitter-atreply USER [ACCOUNT]',
    260     description => 'Send a Twitter @reply Message to USER on ACCOUNT (defaults to default_sender,' 
     260    description => 'Send a Twitter @reply Message to USER on ACCOUNT (defaults to default_sender,'
    261261    . "\nor first service if no default is provided)"
    262262    }
  • perl/modules/Twitter/lib/BarnOwl/Module/Twitter/Handle.pm

    r4ebbfbc r7869e48  
    397397                type      => 'Twitter',
    398398                sender    => $self->{cfg}->{user} || $self->{user},
    399                 recipient => $who, 
     399                recipient => $who,
    400400                direction => 'out',
    401401                body      => $msg,
  • perl/modules/WordWrap/inc/Module/Install/Metadata.pm

    r1375a6a r7869e48  
    482482sub _perl_version {
    483483        my $v = $_[-1];
    484         $v =~ s/^([1-9])\.([1-9]\d?\d?)$/sprintf("%d.%03d",$1,$2)/e;   
     484        $v =~ s/^([1-9])\.([1-9]\d?\d?)$/sprintf("%d.%03d",$1,$2)/e;
    485485        $v =~ s/^([1-9])\.([1-9]\d?\d?)\.(0|[1-9]\d?\d?)$/sprintf("%d.%03d%03d",$1,$2,$3 || 0)/e;
    486486        $v =~ s/(\.\d\d\d)000$/$1/;
     
    505505sub write_mymeta {
    506506        my $self = shift;
    507        
     507
    508508        # If there's no existing META.yml there is nothing we can do
    509509        return unless -f 'META.yml';
  • perlconfig.c

    r6401db3 r7869e48  
    117117                   owl_new_sv(owl_pair_get_value(pair)),0);
    118118  }
    119  
     119
    120120  MSG2H(h, type);
    121121  MSG2H(h, direction);
     
    132132  MSG2H(h, zwriteline);
    133133  if (owl_message_get_header(m)) {
    134     MSG2H(h, header); 
     134    MSG2H(h, header);
    135135  }
    136136  (void)hv_store(h, "time", strlen("time"), owl_new_sv(owl_message_get_timestr(m)),0);
     
    232232  SV *msgref, *srv;
    233233  char *out;
    234  
     234
    235235  ENTER ;
    236236  SAVETMPS;
    237  
     237
    238238  PUSHMARK(SP) ;
    239239  msgref = owl_perlconfig_message2hashref(m);
    240240  XPUSHs(sv_2mortal(msgref));
    241241  PUTBACK ;
    242  
     242
    243243  count = call_pv(subname, G_SCALAR|G_EVAL);
    244  
     244
    245245  SPAGAIN ;
    246246
     
    263263    out = NULL;
    264264  }
    265  
     265
    266266  PUTBACK ;
    267267  FREETMPS ;
     
    543543  XPUSHs(sv_2mortal(newSViv(success)));
    544544  PUTBACK;
    545  
     545
    546546  call_sv(cb, G_DISCARD|G_EVAL);
    547547
  • perlglue.xs

    rb303ba2 r7869e48  
    171171        CODE:
    172172        {
    173                 owl_function_adminmsg(header, body);           
    174         }
    175 
    176 
    177 const char * 
     173                owl_function_adminmsg(header, body);
     174        }
     175
     176
     177const char *
    178178get_data_dir ()
    179179        CODE:
     
    182182        RETVAL
    183183
    184 const char * 
     184const char *
    185185get_config_dir ()
    186186        CODE:
    187187                RETVAL = owl_global_get_confdir(&g);
    188188        OUTPUT:
    189         RETVAL 
    190 
    191 void
    192 popless_text(text) 
     189        RETVAL
     190
     191void
     192popless_text(text)
    193193        const char *text
    194194        CODE:
     
    198198
    199199void
    200 popless_ztext(text) 
     200popless_ztext(text)
    201201        const char *text
    202202        CODE:
     
    210210
    211211void
    212 error(text) 
     212error(text)
    213213        const char *text
    214214        CODE:
     
    273273        CODE:
    274274                rv = owl_text_wordwrap(in, cols);
    275                 RETVAL = rv;   
     275                RETVAL = rv;
    276276        OUTPUT:
    277277                RETVAL
  • popexec.c

    re146cd7 r7869e48  
    9494  if (!pe) return FALSE;
    9595
    96   /* If pe->winactive is 0 then the vwin has closed. 
     96  /* If pe->winactive is 0 then the vwin has closed.
    9797   * If pe->pid is 0 then the child has already been reaped.
    9898   * if d->fd is -1 then the fd has been closed out.
     
    119119    owl_function_debugmsg("waitpid got child status: <%d>\n", status);
    120120    pe->pid = 0;
    121     if (pe->winactive) { 
     121    if (pe->winactive) {
    122122      owl_viewwin_append_text(pe->vwin, "\n");
    123123    }
  • regex.c

    rf271129 r7869e48  
    1313  char *errbuf;
    1414  const char *ptr;
    15  
     15
    1616  re->string=g_strdup(string);
    1717
     
    4343  char *quoted;
    4444  int ret;
    45  
     45
    4646  quoted = owl_text_quote(string, OWL_REGEX_QUOTECHARS, OWL_REGEX_QUOTEWITH);
    4747  ret = owl_regex_create(re, quoted);
     
    5959    return(0);
    6060  }
    61  
     61
    6262  ret=regexec(&(re->re), string, 1, &match, 0);
    6363  out=ret;
  • sepbar.c

    r6eb3ed9 r7869e48  
    114114  getyx(sepwin, y, x);
    115115  wmove(sepwin, y, owl_global_get_cols(&g)-1);
    116    
     116
    117117  wattroff(sepwin, A_BOLD);
    118118  wattroff(sepwin, A_REVERSE);
  • stubgen.pl

    rca54fd6 r7869e48  
    2929        print "int owl_global_get_$altvarname(const owl_global *g) {\n";
    3030        print "  return owl_variable_get_int(owl_variable_get_var(&g->vars, \"$varname\"));\n}\n";
    31     } 
     31    }
    3232    }
    3333    }
  • style.c

    r14be3a5 r7869e48  
    4848
    4949  SV *sv = NULL;
    50  
     50
    5151  /* Call the perl object */
    5252  OWL_PERL_CALL_METHOD(s->perlobj,
  • t/completion.t

    re59d775 r7869e48  
    2121    my $before_point = shift;
    2222    my $after_point = shift;
    23    
     23
    2424    my $ctx = BarnOwl::Completion::Context->new($before_point,
    2525                                                $after_point);
     
    5757    my $after_point = shift;
    5858    my $shift = shift;
    59    
     59
    6060    my $ctx = BarnOwl::Completion::Context->new($before_point,
    6161                                                $after_point);
     
    207207    my $words = shift;
    208208    my $complete = shift || \&complete_zwrite;
    209    
     209
    210210    my $ctx = BarnOwl::Completion::Context->new($before, $after);
    211211
     
    346346    my $files = shift;
    347347
    348     my $expect = [ sort {$a->[1] cmp $b->[1]} 
     348    my $expect = [ sort {$a->[1] cmp $b->[1]}
    349349        ((map {["$_/", defined($pfx)?"$pfx/$_/":"$_/", 0]} @$dirs),
    350350         (map {["$_",  defined($pfx)?"$pfx/$_" :$_   , 1]} @$files))
  • tester.c

    r97cdbaf5 r7869e48  
    151151                     owl_text_substitute("~/meep", "~", "/u/foo"));
    152152
    153   FAIL_UNLESS("skiptokens 1", 
     153  FAIL_UNLESS("skiptokens 1",
    154154              !strcmp("bar quux", skiptokens("foo bar quux", 1)));
    155   FAIL_UNLESS("skiptokens 2", 
     155  FAIL_UNLESS("skiptokens 2",
    156156              !strcmp("meep", skiptokens("foo 'bar quux' meep", 2)));
    157157
     
    329329  l = owl_dict_get_keys(&d);
    330330  FAIL_UNLESS("get_keys result size", 3 == l->len);
    331  
     331
    332332  /* these assume the returned keys are sorted */
    333333  FAIL_UNLESS("get_keys result val", 0 == strcmp("a", l->pdata[0]));
  • text.c

    rf271129 r7869e48  
    5858  ptr1=in;
    5959  end=in+strlen(in);
    60  
     60
    6161  while(ptr1<end) {
    6262    /* look for an open bracket */
     
    7676    /* find the close bracket */
    7777    ptr3=strchr(ptr2, '>');
    78    
     78
    7979    /* if there is no close, copy as you are and exit */
    8080    if (!ptr3) {
  • util.c

    r7b89e8c r7869e48  
    255255  owl_string_vappendf_quoted(buf, tmpl, ap);
    256256  va_end(ap);
    257   return g_string_free(buf, false); 
     257  return g_string_free(buf, false);
    258258}
    259259
     
    306306{
    307307  /* 32 chosen for first attempt because timestr will end up being
    308    * something like "Www Mmm dd hh:mm:ss AM yyyy UTC\0" */ 
     308   * something like "Www Mmm dd hh:mm:ss AM yyyy UTC\0" */
    309309  size_t timestr_size = 16;
    310310  char *timestr = NULL;
     
    385385CALLER_OWN char *owl_util_stripnewlines(const char *in)
    386386{
    387  
     387
    388388  char  *tmp, *ptr1, *ptr2, *out;
    389389
     
    643643int owl_util_can_break_after(gunichar c)
    644644{
    645  
     645
    646646  if (c == ' ') return 1;
    647647  if (c >= 0x3000 && c <= 0x312f) {
     
    803803/*
    804804 * There are three ways the signal could come to an end:
    805  * 
     805 *
    806806 * 1. The user explicitly disconnects it with the returned signal_id.
    807807 *    - In that case, the disconnection unref's the closure, causing it
  • variable.c

    rd126a19 r7869e48  
    9393
    9494  OWLVAR_BOOL( "logging" /* %OwlVarStub */, 0,
    95                "turn personal logging on or off", 
     95               "turn personal logging on or off",
    9696               "If this is set to on, personal messages are\n"
    9797               "logged in the directory specified\n"
     
    103103               "If this is set to on, class messages are\n"
    104104               "logged in the directory specified\n"
    105                "by the 'classlogpath' variable.\n" 
     105               "by the 'classlogpath' variable.\n"
    106106               "The filename in that directory is derived from\n"
    107107               "the name of the class to which the message was sent.\n" ),
     
    172172
    173173  OWLVAR_PATH( "logpath" /* %OwlVarStub */, "~/zlog/people",
    174                "path for logging personal zephyrs", 
     174               "path for logging personal zephyrs",
    175175               "Specifies a directory which must exist.\n"
    176176               "Files will be created in the directory for each sender.\n"),
     
    185185               "This file will be logged to if 'debug' is set to 'on'.\n"
    186186               "BarnOwl will append a dot and the current process's pid to the filename."),
    187  
     187
    188188  OWLVAR_PATH( "zsigproc" /* %OwlVarStub:zsigproc */, NULL,
    189189               "name of a program to run that will generate zsigs",
     
    230230               "turn zaway on or off", "" ),
    231231
    232   OWLVAR_STRING( "zaway_msg" /* %OwlVarStub */, 
     232  OWLVAR_STRING( "zaway_msg" /* %OwlVarStub */,
    233233                 OWL_DEFAULT_ZAWAYMSG,
    234234                 "zaway msg for responding to zephyrs when away", "" ),
    235235
    236   OWLVAR_STRING( "zaway_msg_default" /* %OwlVarStub */, 
     236  OWLVAR_STRING( "zaway_msg_default" /* %OwlVarStub */,
    237237                 OWL_DEFAULT_ZAWAYMSG,
    238238                 "default zaway message", "" ),
     
    243243                    NULL, owl_variable_aaway_set, NULL),
    244244
    245   OWLVAR_STRING( "aaway_msg" /* %OwlVarStub */, 
     245  OWLVAR_STRING( "aaway_msg" /* %OwlVarStub */,
    246246                 OWL_DEFAULT_AAWAYMSG,
    247247                 "AIM away msg for responding when away", "" ),
    248248
    249   OWLVAR_STRING( "aaway_msg_default" /* %OwlVarStub */, 
     249  OWLVAR_STRING( "aaway_msg_default" /* %OwlVarStub */,
    250250                 OWL_DEFAULT_AAWAYMSG,
    251251                 "default AIM away message", "" ),
    252252
    253253  OWLVAR_STRING( "view_home" /* %OwlVarStub */, "all",
    254                  "home view to switch to after 'X' and 'V'", 
     254                 "home view to switch to after 'X' and 'V'",
    255255                 "SEE ALSO: view, filter\n" ),
    256256
     
    300300              "notifications of buddies as soon as you login, set it to 0 instead."),
    301301
    302              
    303   OWLVAR_INT_FULL( "typewinsize" /* %OwlVarStub:typwin_lines */, 
     302
     303  OWLVAR_INT_FULL( "typewinsize" /* %OwlVarStub:typwin_lines */,
    304304                   OWL_TYPWIN_SIZE,
    305                   "number of lines in the typing window", 
     305                  "number of lines in the typing window",
    306306                   "This specifies the height of the window at the\n"
    307307                   "bottom of the screen where commands are entered\n"
     
    529529}
    530530
    531 /* note that changing the value of this will clobber 
     531/* note that changing the value of this will clobber
    532532 * any user setting of this */
    533533int owl_variable_disable_ctrl_d_set(owl_variable *v, const void *newval)
     
    541541      owl_function_command_norv("bindkey editmulti C-d command edit:done");
    542542    }
    543   } 
    544   return owl_variable_int_set_default(v, newval); 
     543  }
     544  return owl_variable_int_set_default(v, newval);
    545545}
    546546
     
    593593      break;
    594594    case OWL_VARIABLE_STRING:
    595       if (!cur->validate_fn) 
     595      if (!cur->validate_fn)
    596596        cur->validate_fn = owl_variable_string_validate_default;
    597       if (!cur->set_fn) 
     597      if (!cur->set_fn)
    598598        cur->set_fn = owl_variable_string_set_default;
    599       if (!cur->set_fromstring_fn) 
     599      if (!cur->set_fromstring_fn)
    600600        cur->set_fromstring_fn = owl_variable_string_set_fromstring_default;
    601       if (!cur->get_fn) 
     601      if (!cur->get_fn)
    602602        cur->get_fn = owl_variable_get_default;
    603       if (!cur->get_tostring_fn) 
    604         cur->get_tostring_fn = owl_variable_string_get_tostring_default;     
     603      if (!cur->get_tostring_fn)
     604        cur->get_tostring_fn = owl_variable_string_get_tostring_default;
    605605      if (!cur->delete_fn)
    606606        cur->delete_fn = owl_variable_delete_default;
     
    609609      break;
    610610    case OWL_VARIABLE_BOOL:
    611       if (!cur->validate_fn) 
     611      if (!cur->validate_fn)
    612612        cur->validate_fn = owl_variable_bool_validate_default;
    613       if (!cur->set_fn) 
     613      if (!cur->set_fn)
    614614        cur->set_fn = owl_variable_bool_set_default;
    615       if (!cur->set_fromstring_fn) 
     615      if (!cur->set_fromstring_fn)
    616616        cur->set_fromstring_fn = owl_variable_bool_set_fromstring_default;
    617       if (!cur->get_fn) 
     617      if (!cur->get_fn)
    618618        cur->get_fn = owl_variable_get_default;
    619       if (!cur->get_tostring_fn) 
    620         cur->get_tostring_fn = owl_variable_bool_get_tostring_default;     
     619      if (!cur->get_tostring_fn)
     620        cur->get_tostring_fn = owl_variable_bool_get_tostring_default;
    621621      if (!cur->delete_fn)
    622622        cur->delete_fn = owl_variable_delete_default;
     
    625625      break;
    626626    case OWL_VARIABLE_INT:
    627       if (!cur->validate_fn) 
     627      if (!cur->validate_fn)
    628628        cur->validate_fn = owl_variable_int_validate_default;
    629       if (!cur->set_fn) 
     629      if (!cur->set_fn)
    630630        cur->set_fn = owl_variable_int_set_default;
    631       if (!cur->set_fromstring_fn) 
     631      if (!cur->set_fromstring_fn)
    632632        cur->set_fromstring_fn = owl_variable_int_set_fromstring_default;
    633       if (!cur->get_fn) 
     633      if (!cur->get_fn)
    634634        cur->get_fn = owl_variable_get_default;
    635       if (!cur->get_tostring_fn) 
    636         cur->get_tostring_fn = owl_variable_int_get_tostring_default;     
     635      if (!cur->get_tostring_fn)
     636        cur->get_tostring_fn = owl_variable_int_get_tostring_default;
    637637      if (!cur->delete_fn)
    638638        cur->delete_fn = owl_variable_delete_default;
     
    793793  if (!v->set_fromstring_fn) {
    794794    if (msg) owl_function_error("Variable %s is read-only", owl_variable_get_name(v));
    795     return -1;   
     795    return -1;
    796796  }
    797797  if (0 != v->set_fromstring_fn(v, value)) {
     
    807807      owl_function_makemsg("%s = <null>", owl_variable_get_name(v));
    808808    g_free(tostring);
    809   }   
     809  }
    810810  return 0;
    811811}
    812  
     812
    813813int owl_variable_set_string(owl_variable *v, const char *newval)
    814814{
     
    816816  return v->set_fn(v, newval);
    817817}
    818  
     818
    819819int owl_variable_set_int(owl_variable *v, int newval)
    820820{
     
    822822  return v->set_fn(v, &newval);
    823823}
    824  
     824
    825825int owl_variable_set_bool_on(owl_variable *v)
    826826{
     
    10351035  } else {
    10361036    return g_strdup_printf("%d", *(const int*)val);
    1037   } 
     1037  }
    10381038}
    10391039
    10401040/* default functions for enums (a variant of integers) */
    10411041
    1042 int owl_variable_enum_validate(const owl_variable *v, const void *newval) { 
     1042int owl_variable_enum_validate(const owl_variable *v, const void *newval) {
    10431043  char **enums;
    10441044  int nenums, val;
  • view.c

    r219f52c r7869e48  
    8888}
    8989
    90 /* Returns the position in the view with a message closest 
     90/* Returns the position in the view with a message closest
    9191 * to the passed msgid. */
    9292int owl_view_get_nearest_to_msgid(const owl_view *v, int targetid)
  • wcwidth.c

    r49a8434 r7869e48  
    188188  /* if we arrive here, ucs is not a combining or C0/C1 control character */
    189189
    190   return 1 + 
     190  return 1 +
    191191    (ucs >= 0x1100 &&
    192192     (ucs <= 0x115f ||                    /* Hangul Jamo init. consonants */
  • zephyr.c

    r9b3167b r7869e48  
    320320      subs = g_renew(ZSubscription_t, subs, subSize);
    321321    }
    322    
     322
    323323    /* add it to the list of subs */
    324324    if ((tmp = strtok(start, ",\n\r")) == NULL)
     
    649649  else if (!strcasecmp(n->z_default_format, "New transaction [$1] entered in $2\nFrom: $3 ($5)\nSubject: $4") ||
    650650           !strcasecmp(n->z_default_format, "New transaction [$1] entered in $2\nFrom: $3\nSubject: $4")) {
    651    
     651
    652652    msg = g_strdup_printf("New transaction [%s] entered in %s\nFrom: %s (%s)\nSubject: %s",
    653653                          fields[1], fields[2], fields[3], fields[5], fields[4]);
     
    707707  ZNotice_t notice;
    708708  char *zsender = NULL;
    709    
     709
    710710  memset(&notice, 0, sizeof(notice));
    711711
     
    713713
    714714  if (!zsig) zsig="";
    715  
     715
    716716  notice.z_kind=ACKED;
    717717  notice.z_port=0;
     
    738738  /* ret=ZSendNotice(&notice, ZAUTH); */
    739739  ret=ZSrvSendNotice(&notice, ZAUTH, send_zephyr_helper);
    740  
     740
    741741  /* free then check the return */
    742742  g_free(notice.z_message);
     
    771771{
    772772  char *tmp;
    773  
     773
    774774  /* if it's an HMACK ignore it */
    775775  if (retnotice->z_kind == HMACK) return;
     
    880880}
    881881#endif
    882  
     882
    883883void owl_zephyr_zaway(const owl_message *m)
    884884{
     
    886886  char *tmpbuff, *myuser, *to;
    887887  owl_zwrite *z;
    888  
     888
    889889  /* bail if it doesn't look like a message we should reply to.  Some
    890890   * of this defined by the way zaway(1) works
     
    10321032  char *line, *subsfile;
    10331033  int linesdeleted;
    1034  
     1034
    10351035  line=owl_zephyr_makesubline(class, inst, recip);
    10361036  line[strlen(line)-1]='\0';
    10371037
    10381038  subsfile = owl_zephyr_dotfile(".zephyr.subs", filename);
    1039  
     1039
    10401040  linesdeleted = owl_util_file_deleteline(subsfile, line, 1);
    10411041  if (linesdeleted > 0) {
     
    10821082  char *filename;
    10831083  FILE *file;
    1084  
     1084
    10851085  filename = owl_zephyr_dotfile(".anyone", NULL);
    10861086  file = fopen(filename, "a");
     
    11181118  } else {
    11191119    return ("UNKNOWN");
    1120   }           
     1120  }
    11211121}
    11221122#else
     
    12541254  return 0;
    12551255}
    1256  
     1256
    12571257/* Strip a local realm fron the zephyr user name.
    12581258 * The caller must free the return
  • zwrite.c

    r919cbf2 r7869e48  
    4242  int badargs = 0;
    4343  char *msg = NULL;
    44  
     44
    4545  /* start with null entries */
    4646  z->cmd=NULL;
     
    177177
    178178  if (z->noping) return;
    179  
     179
    180180  if (strcasecmp(z->class, "message")) {
    181181    return;
Note: See TracChangeset for help on using the changeset viewer.