Changeset 8efa2f4
- Timestamp:
- 2005-12-08T14:57:13Z (19 years ago)
- Branches:
- master
- Children:
- 09adf08
- Parents:
- 7989fcf3 (diff), c2295f7 (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. - Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
crypting.c
r7989fcf3 r8efa2f4 46 46 } irc_t; 47 47 48 #define set_add( a, b, c, d )49 #define set_find( a, b ) NULL50 51 48 #include "md5.h" 52 49 #include "crypting.h" … … 69 66 void setpassnc (irc_t *irc, const char *pass) 70 67 { 71 if (!set_find (irc, "password"))72 set_add (irc, "password", NULL, passchange);73 74 68 if (irc->password) g_free (irc->password); 75 69 … … 82 76 } 83 77 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) { 78 int setpass (irc_t *irc, const char *pass, const char* md5sum) 79 { 90 80 md5_state_t md5state; 91 81 md5_byte_t digest[16]; -
crypting.h
r7989fcf3 r8efa2f4 25 25 26 26 void setpassnc (irc_t *irc, const char *pass); /* USE WITH CAUTION! */ 27 char *passchange (irc_t *irc, void *set, char *value); 28 int setpass (irc_t *irc, const char *pass, char* md5sum); 27 int setpass (irc_t *irc, const char *pass, const char* md5sum); 29 28 char *hashpass (irc_t *irc); 30 29 char *obfucrypt (irc_t *irc, char *line); -
irc.c
r7989fcf3 r8efa2f4 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 } 33 39 34 40 irc_t *irc_new( int fd ) … … 129 135 set_add( irc, "to_char", ": ", set_eval_to_char ); 130 136 set_add( irc, "typing_notice", "false", set_eval_bool ); 137 set_add( irc, "password", NULL, passchange); 131 138 132 139 conf_loaddefaults( irc ); -
nick.c
r7989fcf3 r8efa2f4 27 27 #include "bitlbee.h" 28 28 29 void nick_set( irc_t *irc, c har *handle, int proto,char *nick )29 void nick_set( irc_t *irc, const char *handle, int proto, const 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 har *handle, int proto, const char *realname )58 char *nick_get( irc_t *irc, const 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 har *nick )131 void nick_del( irc_t *irc, const char *nick ) 132 132 { 133 133 nick_t *l = NULL, *n = irc->nicks; … … 176 176 } 177 177 178 int nick_ok( c har *nick )179 { 180 c har *s;178 int nick_ok( const char *nick ) 179 { 180 const char *s; 181 181 182 182 /* Empty/long nicks are not allowed */ … … 237 237 } 238 238 239 int nick_cmp( c har *a,char *b )239 int nick_cmp( const char *a, const char *b ) 240 240 { 241 241 char aa[1024] = "", bb[1024] = ""; … … 253 253 } 254 254 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 } 255 char *nick_dup( const char *nick ) 256 { 257 return g_strndup( nick, MAX_NICK_LENGTH ); 258 } -
nick.h
r7989fcf3 r8efa2f4 32 32 } nick_t; 33 33 34 void nick_set( irc_t *irc, c har *handle, int proto,char *nick );35 char *nick_get( irc_t *irc, c har *handle, int proto, const char *realname );36 void nick_del( irc_t *irc, c har *nick );34 void nick_set( irc_t *irc, const char *handle, int proto, const char *nick ); 35 char *nick_get( irc_t *irc, const char *handle, int proto, const char *realname ); 36 void nick_del( irc_t *irc, const char *nick ); 37 37 void nick_strip( char *nick ); 38 38 39 int nick_ok( c har *nick );39 int nick_ok( const char *nick ); 40 40 int nick_lc( char *nick ); 41 41 int nick_uc( char *nick ); 42 int nick_cmp( c har *a,char *b );43 char *nick_dup( c har *nick );42 int nick_cmp( const char *a, const char *b ); 43 char *nick_dup( const char *nick ); -
protocols/proxy.c
r7989fcf3 r8efa2f4 50 50 #define GAIM_ERR_COND (G_IO_HUP | G_IO_ERR | G_IO_NVAL) 51 51 52 /*FIXME*53 #ifndef _WIN3254 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 62 52 char proxyhost[128] = ""; 63 53 int proxyport = 0; … … 83 73 84 74 85 static struct sockaddr_in *gaim_gethostbyname(c har *host, int port)75 static struct sockaddr_in *gaim_gethostbyname(const char *host, int port) 86 76 { 87 77 static struct sockaddr_in sin; … … 154 144 } 155 145 156 static int proxy_connect_none(c har *host, unsigned short port, struct PHB *phb)146 static int proxy_connect_none(const char *host, unsigned short port, struct PHB *phb) 157 147 { 158 148 struct sockaddr_in *sin; … … 281 271 } 282 272 283 static int proxy_connect_http(c har *host, unsigned short port, struct PHB *phb)273 static int proxy_connect_http(const char *host, unsigned short port, struct PHB *phb) 284 274 { 285 275 phb->host = g_strdup(host); … … 365 355 } 366 356 367 static int proxy_connect_socks4(c har *host, unsigned short port, struct PHB *phb)357 static int proxy_connect_socks4(const char *host, unsigned short port, struct PHB *phb) 368 358 { 369 359 phb->host = g_strdup(host); … … 547 537 } 548 538 549 static int proxy_connect_socks5(c har *host, unsigned short port, struct PHB *phb)539 static int proxy_connect_socks5(const char *host, unsigned short port, struct PHB *phb) 550 540 { 551 541 phb->host = g_strdup(host); … … 588 578 } 589 579 590 int proxy_connect(c har *host, int port, GaimInputFunction func, gpointer data)580 int proxy_connect(const char *host, int port, GaimInputFunction func, gpointer data) 591 581 { 592 582 struct PHB *phb; -
protocols/proxy.h
r7989fcf3 r8efa2f4 56 56 G_MODULE_EXPORT void gaim_input_remove(gint); 57 57 58 G_MODULE_EXPORT int proxy_connect(c har *host, int port, GaimInputFunction func, gpointer data);58 G_MODULE_EXPORT int proxy_connect(const 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.