Changeset 9d6b229


Ignore:
Timestamp:
2006-01-14T20:34:10Z (19 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
0431ea1
Parents:
5c577bd (diff), 277674c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Imported changes from main tree.

Files:
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • bitlbee.c

    r5c577bd r9d6b229  
    194194        int st, size;
    195195        char *temp;
    196 #ifdef FLOOD_SEND
    197         time_t newtime;
    198 #endif
    199 
    200 #ifdef FLOOD_SEND       
    201         newtime = time( NULL );
    202         if( ( newtime - irc->oldtime ) > FLOOD_SEND_INTERVAL )
    203         {
    204                 irc->sentbytes = 0;
    205                 irc->oldtime = newtime;
    206         }
    207 #endif
    208        
     196
    209197        if( irc->sendbuffer == NULL )
    210198                return( FALSE );
    211199       
    212200        size = strlen( irc->sendbuffer );
    213        
    214 #ifdef FLOOD_SEND
    215         if( ( FLOOD_SEND_BYTES - irc->sentbytes ) > size )
    216                 st = write( irc->fd, irc->sendbuffer, size );
    217         else
    218                 st = write( irc->fd, irc->sendbuffer, ( FLOOD_SEND_BYTES - irc->sentbytes ) );
    219 #else
    220201        st = write( irc->fd, irc->sendbuffer, size );
    221 #endif
    222202       
    223203        if( st <= 0 )
     
    233213                }
    234214        }
    235        
    236 #ifdef FLOOD_SEND
    237         irc->sentbytes += st;
    238 #endif         
    239215       
    240216        if( st == size )
  • configure

    r5c577bd r9d6b229  
    2323debug=0
    2424strip=1
    25 flood=0
    2625ipv6=1
    2726ssl=auto
     
    289288fi
    290289
    291 if [ "$flood" = 1 ]; then
    292         # echo '#define FLOOD_SEND' >> config.h
    293         echo 'Flood protection is disabled in this release because of too many bugs.' 2> /dev/stderr
    294         rm config.h
    295         rm Makefile.settings
    296         exit 1
    297 fi
    298 
    299290echo
    300291if [ -z "$BITLBEE_VERSION" -a -d .bzr -a -x "`which bzr`" ]; then
  • irc.c

    r5c577bd r9d6b229  
    945945        if( irc->sendbuffer != NULL ) {
    946946                size = strlen( irc->sendbuffer ) + strlen( line );
    947 #ifdef FLOOD_SEND
    948                 if( size > FLOOD_SEND_MAXBUFFER ) {
    949                         /* Die flooder, die! >:) */
    950 
    951                         g_free(irc->sendbuffer);
    952                        
    953                         /* We need the \r\n at the start because else we might append our string to a half
    954                          * sent line. A bit hackish, but it works.
    955                          */
    956                         irc->sendbuffer = g_strdup( "\r\nERROR :Sendq Exceeded\r\n" );
    957                         irc->quit = 1;
    958                        
    959                         return;
    960                 }
    961 #endif
    962947                irc->sendbuffer = g_renew ( char, irc->sendbuffer, size + 1 );
    963948                strcpy( ( irc->sendbuffer + strlen( irc->sendbuffer ) ), line );
  • irc.h

    r5c577bd r9d6b229  
    3232#define IRC_LOGIN_TIMEOUT 60
    3333#define IRC_PING_STRING "PinglBee"
    34 
    35 /* #define FLOOD_SEND
    36  * Not yet enabled by default due to some problems.
    37  */
    38 #define FLOOD_SEND_INTERVAL 30
    39 #define FLOOD_SEND_BYTES (1024*10)
    40 #define FLOOD_SEND_MAXBUFFER (1024*20)
    4134
    4235#define UMODES "ias"
  • protocols/yahoo/Makefile

    r5c577bd r9d6b229  
    1010
    1111# [SH] Program variables
    12 objects = yahoo.o crypt.o libyahoo2.o yahoo_fn.o yahoo_httplib.o yahoo_list.o yahoo_util.o
     12objects = yahoo.o crypt.o libyahoo2.o yahoo_fn.o yahoo_httplib.o yahoo_util.o
    1313
    1414CFLAGS += -Wall -DSTDC_HEADERS -DHAVE_STRING_H -DHAVE_STRCHR -DHAVE_MEMCPY -DHAVE_GLIB
  • protocols/yahoo/yahoo_list.h

    r5c577bd r9d6b229  
    2121 */
    2222
    23 /*
    24  * This is a replacement for the GList.  It only provides functions that
    25  * we use in Ayttm.  Thanks to Meredyyd from everybuddy dev for doing
    26  * most of it.
    27  */
    28 
    2923#ifndef __YLIST_H__
    3024#define __YLIST_H__
    3125
    32 #ifdef __cplusplus
    33 extern "C" {
     26/* GLib has linked list already, so I don't see why libyahoo2 has to copy this... */
     27
     28typedef GList YList;
     29
     30#define y_list_append g_list_append
     31#define y_list_concat g_list_concat
     32#define y_list_copy g_list_copy
     33#define y_list_empty g_list_empty
     34#define y_list_find g_list_find
     35#define y_list_find_custom g_list_find_custom
     36#define y_list_foreach g_list_foreach
     37#define y_list_free g_list_free
     38#define y_list_free_1 g_list_free_1
     39#define y_list_insert_sorted g_list_insert_sorted
     40#define y_list_length g_list_length
     41#define y_list_next g_list_next
     42#define y_list_nth g_list_nth
     43#define y_list_prepend g_list_prepend
     44#define y_list_remove g_list_remove
     45#define y_list_remove_link g_list_remove_link
     46#define y_list_singleton g_list_singleton
     47
    3448#endif
    35 
    36 typedef struct _YList {
    37         struct _YList *next;
    38         struct _YList *prev;
    39         void *data;
    40 } YList;
    41 
    42 typedef int (*YListCompFunc) (const void *, const void *);
    43 typedef void (*YListFunc) (void *, void *);
    44 
    45 YList *y_list_append(YList * list, void *data);
    46 YList *y_list_prepend(YList * list, void *data);
    47 YList *y_list_remove_link(YList * list, const YList * link);
    48 YList *y_list_remove(YList * list, void *data);
    49 
    50 YList *y_list_insert_sorted(YList * list, void * data, YListCompFunc comp);
    51 
    52 YList *y_list_copy(YList * list);
    53 
    54 YList *y_list_concat(YList * list, YList * add);
    55 
    56 YList *y_list_find(YList * list, const void *data);
    57 YList *y_list_find_custom(YList * list, const void *data, YListCompFunc comp);
    58 
    59 YList *y_list_nth(YList * list, int n);
    60 
    61 void y_list_foreach(YList * list, YListFunc fn, void *user_data);
    62 
    63 void y_list_free_1(YList * list);
    64 void y_list_free(YList * list);
    65 int  y_list_length(const YList * list);
    66 int  y_list_empty(const YList * list);
    67 int  y_list_singleton(const YList * list);
    68 
    69 #define y_list_next(list)       list->next
    70 
    71 #ifdef __cplusplus
    72 }
    73 #endif
    74 #endif
  • util.c

    r5c577bd r9d6b229  
    3636#include <stdlib.h>
    3737#include <string.h>
     38#include <ctype.h>
    3839#include <glib.h>
    3940#include <time.h>
     
    377378        for( i = j = 0; t[i]; i ++, j ++ )
    378379        {
    379                 if( t[i] <= ' ' || ((unsigned char *)t)[i] >= 128 || t[i] == '%' )
     380                /* if( t[i] <= ' ' || ((unsigned char *)t)[i] >= 128 || t[i] == '%' ) */
     381                if( !isalnum( t[i] ) )
    380382                {
    381383                        sprintf( s + j, "%%%02X", ((unsigned char*)t)[i] );
Note: See TracChangeset for help on using the changeset viewer.