Changes in / [8efa2f4:7989fcf3]
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
crypting.c
r8efa2f4 r7989fcf3 46 46 } irc_t; 47 47 48 #define set_add( a, b, c, d ) 49 #define set_find( a, b ) NULL 50 48 51 #include "md5.h" 49 52 #include "crypting.h" … … 66 69 void setpassnc (irc_t *irc, const char *pass) 67 70 { 71 if (!set_find (irc, "password")) 72 set_add (irc, "password", NULL, passchange); 73 68 74 if (irc->password) g_free (irc->password); 69 75 … … 76 82 } 77 83 78 int setpass (irc_t *irc, const char *pass, const char* md5sum) 79 { 84 char *passchange (irc_t *irc, void *set, char *value) { 85 setpassnc (irc, value); 86 return (NULL); 87 } 88 89 int setpass (irc_t *irc, const char *pass, char* md5sum) { 80 90 md5_state_t md5state; 81 91 md5_byte_t digest[16]; -
crypting.h
r8efa2f4 r7989fcf3 25 25 26 26 void setpassnc (irc_t *irc, const char *pass); /* USE WITH CAUTION! */ 27 int setpass (irc_t *irc, const char *pass, const char* md5sum); 27 char *passchange (irc_t *irc, void *set, char *value); 28 int setpass (irc_t *irc, const char *pass, char* md5sum); 28 29 char *hashpass (irc_t *irc); 29 30 char *obfucrypt (irc_t *irc, char *line); -
irc.c
r8efa2f4 r7989fcf3 31 31 32 32 GSList *irc_connection_list = NULL; 33 34 char *passchange (irc_t *irc, void *set, char *value)35 {36 setpassnc (irc, value);37 return (NULL);38 }39 33 40 34 irc_t *irc_new( int fd ) … … 135 129 set_add( irc, "to_char", ": ", set_eval_to_char ); 136 130 set_add( irc, "typing_notice", "false", set_eval_bool ); 137 set_add( irc, "password", NULL, passchange);138 131 139 132 conf_loaddefaults( irc ); -
nick.c
r8efa2f4 r7989fcf3 27 27 #include "bitlbee.h" 28 28 29 void nick_set( irc_t *irc, c onst char *handle, int proto, constchar *nick )29 void nick_set( irc_t *irc, char *handle, int proto, char *nick ) 30 30 { 31 31 nick_t *m = NULL, *n = irc->nicks; … … 56 56 } 57 57 58 char *nick_get( irc_t *irc, c onst char *handle, int proto, const char *realname )58 char *nick_get( irc_t *irc, char *handle, int proto, const char *realname ) 59 59 { 60 60 static char nick[MAX_NICK_LENGTH+1]; … … 129 129 } 130 130 131 void nick_del( irc_t *irc, c onst char *nick )131 void nick_del( irc_t *irc, char *nick ) 132 132 { 133 133 nick_t *l = NULL, *n = irc->nicks; … … 176 176 } 177 177 178 int nick_ok( c onst char *nick )179 { 180 c onst char *s;178 int nick_ok( char *nick ) 179 { 180 char *s; 181 181 182 182 /* Empty/long nicks are not allowed */ … … 237 237 } 238 238 239 int nick_cmp( c onst char *a, constchar *b )239 int nick_cmp( char *a, char *b ) 240 240 { 241 241 char aa[1024] = "", bb[1024] = ""; … … 253 253 } 254 254 255 char *nick_dup( const char *nick ) 256 { 257 return g_strndup( nick, MAX_NICK_LENGTH ); 258 } 255 char *nick_dup( char *nick ) 256 { 257 char *cp; 258 259 cp = g_new0 ( char, MAX_NICK_LENGTH + 1 ); 260 strncpy( cp, nick, MAX_NICK_LENGTH ); 261 262 return( cp ); 263 } -
nick.h
r8efa2f4 r7989fcf3 32 32 } nick_t; 33 33 34 void nick_set( irc_t *irc, c onst char *handle, int proto, constchar *nick );35 char *nick_get( irc_t *irc, c onst char *handle, int proto, const char *realname );36 void nick_del( irc_t *irc, c onst char *nick );34 void nick_set( irc_t *irc, char *handle, int proto, char *nick ); 35 char *nick_get( irc_t *irc, char *handle, int proto, const char *realname ); 36 void nick_del( irc_t *irc, char *nick ); 37 37 void nick_strip( char *nick ); 38 38 39 int nick_ok( c onst char *nick );39 int nick_ok( char *nick ); 40 40 int nick_lc( char *nick ); 41 41 int nick_uc( char *nick ); 42 int nick_cmp( c onst char *a, constchar *b );43 char *nick_dup( c onst char *nick );42 int nick_cmp( char *a, char *b ); 43 char *nick_dup( char *nick ); -
protocols/proxy.c
r8efa2f4 r7989fcf3 50 50 #define GAIM_ERR_COND (G_IO_HUP | G_IO_ERR | G_IO_NVAL) 51 51 52 /*FIXME* 53 #ifndef _WIN32 54 if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { 55 closesocket(fd); 56 g_free(phb); 57 return -1; 58 } 59 fcntl(fd, F_SETFL, 0); 60 #endif*/ 61 52 62 char proxyhost[128] = ""; 53 63 int proxyport = 0; … … 73 83 74 84 75 static struct sockaddr_in *gaim_gethostbyname(c onst char *host, int port)85 static struct sockaddr_in *gaim_gethostbyname(char *host, int port) 76 86 { 77 87 static struct sockaddr_in sin; … … 144 154 } 145 155 146 static int proxy_connect_none(c onst char *host, unsigned short port, struct PHB *phb)156 static int proxy_connect_none(char *host, unsigned short port, struct PHB *phb) 147 157 { 148 158 struct sockaddr_in *sin; … … 271 281 } 272 282 273 static int proxy_connect_http(c onst char *host, unsigned short port, struct PHB *phb)283 static int proxy_connect_http(char *host, unsigned short port, struct PHB *phb) 274 284 { 275 285 phb->host = g_strdup(host); … … 355 365 } 356 366 357 static int proxy_connect_socks4(c onst char *host, unsigned short port, struct PHB *phb)367 static int proxy_connect_socks4(char *host, unsigned short port, struct PHB *phb) 358 368 { 359 369 phb->host = g_strdup(host); … … 537 547 } 538 548 539 static int proxy_connect_socks5(c onst char *host, unsigned short port, struct PHB *phb)549 static int proxy_connect_socks5(char *host, unsigned short port, struct PHB *phb) 540 550 { 541 551 phb->host = g_strdup(host); … … 578 588 } 579 589 580 int proxy_connect(c onst char *host, int port, GaimInputFunction func, gpointer data)590 int proxy_connect(char *host, int port, GaimInputFunction func, gpointer data) 581 591 { 582 592 struct PHB *phb; -
protocols/proxy.h
r8efa2f4 r7989fcf3 56 56 G_MODULE_EXPORT void gaim_input_remove(gint); 57 57 58 G_MODULE_EXPORT int proxy_connect(c onst char *host, int port, GaimInputFunction func, gpointer data);58 G_MODULE_EXPORT int proxy_connect(char *host, int port, GaimInputFunction func, gpointer data); 59 59 60 60 #endif /* _PROXY_H_ */
Note: See TracChangeset
for help on using the changeset viewer.