Changeset c4a1036
- Timestamp:
- 2008-06-09T01:52:28Z (16 years ago)
- Branches:
- master
- Children:
- 12ebe74
- Parents:
- e46e077 (diff), 783e9b7 (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:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
bitlbee.c
re46e077 rc4a1036 54 54 ; 55 55 56 i = getaddrinfo( global.conf->iface , global.conf->port, &hints, &addrinfo_bind );56 i = getaddrinfo( global.conf->iface_in, global.conf->port, &hints, &addrinfo_bind ); 57 57 if( i ) 58 58 { 59 59 log_message( LOGLVL_ERROR, "Couldn't parse address `%s': %s", 60 global.conf->iface , gai_strerror(i) );60 global.conf->iface_in, gai_strerror(i) ); 61 61 return -1; 62 62 } … … 225 225 if( st == size ) 226 226 { 227 g_free( irc->sendbuffer );228 irc->sendbuffer = NULL;229 irc->w_watch_source_id = 0;230 231 227 if( irc->status & USTATUS_SHUTDOWN ) 228 { 232 229 irc_free( irc ); 230 } 231 else 232 { 233 g_free( irc->sendbuffer ); 234 irc->sendbuffer = NULL; 235 irc->w_watch_source_id = 0; 236 } 233 237 234 238 return FALSE; -
bitlbee.conf
re46e077 rc4a1036 34 34 # DaemonInterface = 0.0.0.0 35 35 # DaemonPort = 6667 36 37 ## ClientInterface: 38 ## 39 ## If for any reason, you want BitlBee to use a specific address/interface 40 ## for outgoing traffic (IM connections, HTTP(S), etc.), set it here. 41 ## 42 # ClientInterface = 0.0.0.0 36 43 37 44 ## AuthMode -
bitlbee.h
re46e077 rc4a1036 157 157 gboolean bitlbee_shutdown( gpointer data, gint fd, b_input_condition cond ); 158 158 159 char *set_eval_root_nick( set_t *set, char *new_nick ); 160 159 161 extern global_t global; 160 162 -
conf.c
re46e077 rc4a1036 45 45 conf = g_new0( conf_t, 1 ); 46 46 47 conf->iface = NULL; 47 conf->iface_in = NULL; 48 conf->iface_out = NULL; 48 49 conf->port = g_strdup( "6667" ); 49 50 conf->nofork = 0; … … 82 83 if( opt == 'i' ) 83 84 { 84 conf->iface = g_strdup( optarg );85 conf->iface_in = g_strdup( optarg ); 85 86 } 86 87 else if( opt == 'p' ) … … 202 203 else if( g_strcasecmp( ini->key, "daemoninterface" ) == 0 ) 203 204 { 204 g_free( conf->iface );205 conf->iface = g_strdup( ini->value );205 g_free( conf->iface_in ); 206 conf->iface_in = g_strdup( ini->value ); 206 207 } 207 208 else if( g_strcasecmp( ini->key, "daemonport" ) == 0 ) … … 209 210 g_free( conf->port ); 210 211 conf->port = g_strdup( ini->value ); 212 } 213 else if( g_strcasecmp( ini->key, "clientinterface" ) == 0 ) 214 { 215 g_free( conf->iface_out ); 216 conf->iface_out = g_strdup( ini->value ); 211 217 } 212 218 else if( g_strcasecmp( ini->key, "authmode" ) == 0 ) -
conf.h
re46e077 rc4a1036 32 32 typedef struct conf 33 33 { 34 char *iface ;34 char *iface_in, *iface_out; 35 35 char *port; 36 36 int nofork; -
debian/changelog
re46e077 rc4a1036 1 bitlbee (1.2-5) UNRELEASED; urgency=low 2 3 * Add Homepage and Vcs-Bzr fields. 4 5 -- Jelmer Vernooij <jelmer@samba.org> Sun, 11 May 2008 14:18:16 +0200 6 1 7 bitlbee (1.2-4) unstable; urgency=low 2 8 3 * Not a real release, just a placeholder for the changelog.4 9 * Fixed init script to use the BITLBEE_OPTS variable, not an undefined 5 DAEMON_OPT. 10 DAEMON_OPT. (Closes: #474583) 6 11 * Added dependency information to the init script. (Closes: #472567) 7 8 -- Wilmer van der Gaast <wilmer@gaast.net> Sat, 29 Mar 2008 21:10:33 +0000 12 * Added bitlbee-dev package. Patch from RISKO Gergely <risko@debian.org> 13 with some small modifications. (Closes: #473480) 14 15 -- Wilmer van der Gaast <wilmer@gaast.net> Wed, 07 May 2008 22:40:40 -0700 9 16 10 17 bitlbee (1.2-3) unstable; urgency=low -
debian/control
re46e077 rc4a1036 5 5 Standards-Version: 3.5.9 6 6 Build-Depends: libglib2.0-dev (>= 2.4), libevent-dev, libgnutls-dev | libnss-dev (>= 1.6), debconf-2.0, po-debconf 7 Homepage: http://www.bitlbee.org/ 8 Vcs-Bzr: http://code.bitlbee.org/bitlbee/ 7 9 8 10 Package: bitlbee … … 12 14 This program can be used as an IRC server which forwards everything you 13 15 say to people on other chat networks: Jabber, ICQ, AIM, MSN and Yahoo. 16 17 Package: bitlbee-dev 18 Architecture: all 19 Depends: bitlbee (= ${binary:Version}) 20 Description: An IRC to other chat networks gateway 21 This program can be used as an IRC server which forwards everything you 22 say to people on other chat networks: Jabber, ICQ, AIM, MSN and Yahoo. 23 . 24 This package holds development stuff for compiling plug-ins. -
debian/rules
re46e077 rc4a1036 13 13 build-arch: build-arch-stamp 14 14 build-arch-stamp: 15 if [ ! -d debian ]; then exit 1; fi15 [ -d debian ] 16 16 ./configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee --events=libevent 17 17 $(MAKE) … … 20 20 21 21 clean: 22 if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi23 rm -rf build-arch-stamp debian/bitlbee debian/*.substvars debian/files 22 [ "`whoami`" = "root" -a -d debian ] 23 rm -rf build-arch-stamp debian/bitlbee debian/*.substvars debian/files debian/bitlbee-dev 24 24 -$(MAKE) distclean 25 25 # -$(MAKE) -C doc/ clean … … 27 27 28 28 install-arch: build-arch 29 if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi29 [ "`whoami`" = "root" -a -d debian ] 30 30 mkdir -p debian/bitlbee/DEBIAN/ 31 31 $(MAKE) install install-etc DESTDIR=`pwd`/debian/bitlbee … … 35 35 cp doc/user-guide/user-guide.html debian/bitlbee/usr/share/doc/bitlbee/ 36 36 37 install-indep: install-arch 38 [ "`whoami`" = "root" -a -d debian ] 39 mkdir -p debian/bitlbee-dev/DEBIAN/ 40 $(MAKE) install-dev DESTDIR=`pwd`/debian/bitlbee-dev 41 42 mkdir -p debian/bitlbee-dev/usr/share/doc/bitlbee-dev/ 43 37 44 binary-arch: build-arch install-arch 38 if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi45 [ "`whoami`" = "root" -a -d debian ] 39 46 40 47 chmod 755 debian/post* debian/pre* debian/config debian/bitlbee.init … … 52 59 doc/bitlbee/examples/* man/man8/bitlbee.8 man/man5/bitlbee.conf.5 53 60 54 chown -R root .root debian/bitlbee/61 chown -R root:root debian/bitlbee/ 55 62 find debian/bitlbee/usr/share/ -type d -exec chmod 755 {} \; 56 63 find debian/bitlbee/usr/share/ -type f -exec chmod 644 {} \; … … 77 84 dpkg --build debian/bitlbee .. 78 85 79 debug-build: 80 BITLBEE_VERSION=\"`date +%Y%m%d`-`hostname`-debug\" debian/rules clean binary DEBUG=186 binary-indep: install-indep 87 [ "`whoami`" = "root" -a -d debian ] 81 88 82 binary: binary-arch 89 chown -R root.root debian/bitlbee-dev/ 90 find debian/bitlbee-dev/usr/share/ -type d -exec chmod 755 {} \; 91 find debian/bitlbee-dev/usr/share/ -type f -exec chmod 644 {} \; 92 93 cp debian/changelog debian/bitlbee-dev/usr/share/doc/bitlbee-dev/changelog.Debian 94 gzip -9 debian/bitlbee-dev/usr/share/doc/bitlbee-dev/changelog.Debian 95 cp debian/copyright debian/bitlbee-dev/usr/share/doc/bitlbee-dev/copyright 96 97 cd debian/bitlbee-dev; \ 98 find usr -type f -exec md5sum {} \; > DEBIAN/md5sums 99 100 dpkg-gencontrol -ldebian/changelog -isp -pbitlbee-dev -Pdebian/bitlbee-dev 101 102 dpkg --build debian/bitlbee-dev .. 103 104 binary: binary-arch binary-indep 83 105 build: build-arch 84 install: install-arch 106 install: install-arch install-indep 85 107 86 .PHONY: build-arch build clean binary-arch binary install-arch install 108 .PHONY: build-arch build clean binary-arch binary install-arch install binary-indep install-indep -
doc/user-guide/commands.xml
re46e077 rc4a1036 589 589 </bitlbee-setting> 590 590 591 <bitlbee-setting name="root_nick" type="string" scope="global"> 592 <default>root</default> 593 594 <description> 595 <para> 596 Normally the "bot" that takes all your BitlBee commands is called "root". If you don't like this name, you can rename it to anything else using the <emphasis>rename</emphasis> command, or by changing this setting. 597 </para> 598 </description> 599 </bitlbee-setting> 600 591 601 <bitlbee-setting name="save_on_quit" type="boolean" scope="global"> 592 602 <default>true</default> -
irc.c
re46e077 rc4a1036 151 151 set_add( &irc->set, "private", "true", set_eval_bool, irc ); 152 152 set_add( &irc->set, "query_order", "lifo", NULL, irc ); 153 set_add( &irc->set, "root_nick", irc->mynick, set_eval_root_nick, irc ); 153 154 set_add( &irc->set, "save_on_quit", "true", set_eval_bool, irc ); 154 155 set_add( &irc->set, "simulate_netsplit", "true", set_eval_bool, irc ); … … 199 200 if( irc->sendbuffer && !immed ) 200 201 { 201 /* We won't read from this socket anymore. Instead, we'll connect a timer 202 to it that should shut down the connection in a second, just in case 203 bitlbee_.._write doesn't do it first. */ 202 /* Set up a timeout event that should shut down the connection 203 in a second, just in case ..._write doesn't do it first. */ 204 204 205 205 b_event_remove( irc->r_watch_source_id ); 206 irc->r_watch_source_id = b_timeout_add( 1000, (b_event_handler) irc_free, irc ); 206 irc->r_watch_source_id = 0; 207 208 b_event_remove( irc->ping_source_id ); 209 irc->ping_source_id = b_timeout_add( 1000, (b_event_handler) irc_free, irc ); 207 210 } 208 211 else … … 274 277 if( irc->ping_source_id > 0 ) 275 278 b_event_remove( irc->ping_source_id ); 276 b_event_remove( irc->r_watch_source_id ); 279 if( irc->r_watch_source_id > 0 ) 280 b_event_remove( irc->r_watch_source_id ); 277 281 if( irc->w_watch_source_id > 0 ) 278 282 b_event_remove( irc->w_watch_source_id ); -
lib/arc.h
re46e077 rc4a1036 31 31 }; 32 32 33 #ifndef G_GNUC_MALLOC 34 #define G_GNUC_MALLOC 35 #endif 36 33 37 G_GNUC_MALLOC struct arc_state *arc_keymaker( unsigned char *key, int kl, int cycles ); 34 38 unsigned char arc_getbyte( struct arc_state *st ); -
lib/proxy.c
re46e077 rc4a1036 114 114 { 115 115 struct sockaddr_in *sin; 116 struct sockaddr_in me; 116 117 int fd = -1; 117 118 … … 127 128 128 129 sock_make_nonblocking(fd); 130 131 if( global.conf->iface_out ) 132 { 133 me.sin_family = AF_INET; 134 me.sin_port = 0; 135 me.sin_addr.s_addr = inet_addr( global.conf->iface_out ); 136 137 if( bind( fd, (struct sockaddr *) &me, sizeof( me ) ) != 0 ) 138 event_debug( "bind( %d, \"%s\" ) failure\n", fd, global.conf->iface_out ); 139 } 129 140 130 141 event_debug("proxy_connect_none( \"%s\", %d ) = %d\n", host, port, fd); -
protocols/jabber/jabber_util.c
re46e077 rc4a1036 246 246 }; 247 247 248 static void jabber_buddy_ask_yes( gpointer w, struct jabber_buddy_ask_data *bla ) 249 { 248 static void jabber_buddy_ask_yes( void *data ) 249 { 250 struct jabber_buddy_ask_data *bla = data; 251 250 252 presence_send_request( bla->ic, bla->handle, "subscribed" ); 251 253 … … 257 259 } 258 260 259 static void jabber_buddy_ask_no( gpointer w, struct jabber_buddy_ask_data *bla ) 260 { 261 static void jabber_buddy_ask_no( void *data ) 262 { 263 struct jabber_buddy_ask_data *bla = data; 264 261 265 presence_send_request( bla->ic, bla->handle, "subscribed" ); 262 266 -
protocols/msn/msn.h
re46e077 rc4a1036 29 29 #define GROUPCHAT_SWITCHBOARD_MESSAGE "\r\r\rME WANT TALK TO MANY PEOPLE\r\r\r" 30 30 31 #ifdef DEBUG 31 #ifdef DEBUG_MSN 32 32 #define debug( text... ) imcb_log( ic, text ); 33 33 #else -
protocols/msn/msn_util.c
re46e077 rc4a1036 90 90 }; 91 91 92 static void msn_buddy_ask_yes( gpointer w, struct msn_buddy_ask_data *bla ) 93 { 92 static void msn_buddy_ask_yes( void *data ) 93 { 94 struct msn_buddy_ask_data *bla = data; 95 94 96 msn_buddy_list_add( bla->ic, "AL", bla->handle, bla->realname ); 95 97 … … 102 104 } 103 105 104 static void msn_buddy_ask_no( gpointer w, struct msn_buddy_ask_data *bla ) 105 { 106 static void msn_buddy_ask_no( void *data ) 107 { 108 struct msn_buddy_ask_data *bla = data; 109 106 110 msn_buddy_list_add( bla->ic, "BL", bla->handle, bla->realname ); 107 111 -
protocols/msn/ns.c
re46e077 rc4a1036 178 178 179 179 debug( "Connecting to a new switchboard with key %s", cmd[5] ); 180 sb = msn_sb_create( ic, server, port, cmd[5], MSN_SB_NEW ); 180 181 if( ( sb = msn_sb_create( ic, server, port, cmd[5], MSN_SB_NEW ) ) == NULL ) 182 { 183 /* Although this isn't strictly fatal for the NS connection, it's 184 definitely something serious (we ran out of file descriptors?). */ 185 imcb_error( ic, "Could not create new switchboard" ); 186 imc_logout( ic, TRUE ); 187 return( 0 ); 188 } 181 189 182 190 if( md->msgq ) … … 468 476 debug( "Got a call from %s (session %d). Key = %s", cmd[5], session, cmd[4] ); 469 477 470 sb = msn_sb_create( ic, server, port, cmd[4], session ); 471 sb->who = g_strdup( cmd[5] ); 478 if( ( sb = msn_sb_create( ic, server, port, cmd[4], session ) ) == NULL ) 479 { 480 /* Although this isn't strictly fatal for the NS connection, it's 481 definitely something serious (we ran out of file descriptors?). */ 482 imcb_error( ic, "Could not create new switchboard" ); 483 imc_logout( ic, TRUE ); 484 return( 0 ); 485 } 486 else 487 { 488 sb->who = g_strdup( cmd[5] ); 489 } 472 490 } 473 491 else if( strcmp( cmd[0], "ADD" ) == 0 ) -
protocols/nogaim.c
re46e077 rc4a1036 343 343 /* dialogs.c */ 344 344 345 void imcb_ask( struct im_connection *ic, char *msg, void *data, void *doit, void *dont ) 345 void imcb_ask( struct im_connection *ic, char *msg, void *data, 346 query_callback doit, query_callback dont ) 346 347 { 347 348 query_add( ic->irc, ic, msg, doit, dont, data ); … … 495 496 }; 496 497 497 void show_got_added_no( gpointer w, struct show_got_added_data*data )498 { 499 g_free( data->handle );498 void show_got_added_no( void *data ) 499 { 500 g_free( ((struct show_got_added_data*)data)->handle ); 500 501 g_free( data ); 501 502 } 502 503 503 void show_got_added_yes( gpointer w, struct show_got_added_data *data ) 504 { 505 data->ic->acc->prpl->add_buddy( data->ic, data->handle, NULL ); 506 /* imcb_add_buddy( data->ic, NULL, data->handle, data->handle ); */ 507 508 return show_got_added_no( w, data ); 504 void show_got_added_yes( void *data ) 505 { 506 struct show_got_added_data *sga = data; 507 508 sga->ic->acc->prpl->add_buddy( sga->ic, sga->handle, NULL ); 509 /* imcb_add_buddy( sga->ic, NULL, sga->handle, sga->handle ); */ 510 511 return show_got_added_no( data ); 509 512 } 510 513 -
protocols/nogaim.h
re46e077 rc4a1036 42 42 #include "account.h" 43 43 #include "proxy.h" 44 #include "query.h" 44 45 #include "md5.h" 45 46 … … 280 281 * - 'doit' or 'dont' will be called depending of the answer of the user. 281 282 */ 282 G_MODULE_EXPORT void imcb_ask( struct im_connection *ic, char *msg, void *data, void *doit, void *dont );283 G_MODULE_EXPORT void imcb_ask( struct im_connection *ic, char *msg, void *data, query_callback doit, query_callback dont ); 283 284 G_MODULE_EXPORT void imcb_ask_add( struct im_connection *ic, char *handle, const char *realname ); 284 285 -
protocols/oscar/oscar.c
re46e077 rc4a1036 1084 1084 } 1085 1085 1086 void oscar_accept_chat( gpointer w, struct aim_chat_invitation * inv);1087 void oscar_reject_chat( gpointer w, struct aim_chat_invitation * inv);1086 void oscar_accept_chat(void *data); 1087 void oscar_reject_chat(void *data); 1088 1088 1089 1089 static int incomingim_chan2(aim_session_t *sess, aim_conn_t *conn, aim_userinfo_t *userinfo, struct aim_incomingim_ch2_args *args) { … … 1119 1119 } 1120 1120 1121 static void gaim_icq_authgrant(gpointer w, struct icq_auth *data) { 1121 static void gaim_icq_authgrant(void *data_) { 1122 struct icq_auth *data = data_; 1122 1123 char *uin, message; 1123 1124 struct oscar_data *od = (struct oscar_data *)data->ic->proto_data; … … 1134 1135 } 1135 1136 1136 static void gaim_icq_authdeny(gpointer w, struct icq_auth *data) { 1137 static void gaim_icq_authdeny(void *data_) { 1138 struct icq_auth *data = data_; 1137 1139 char *uin, *message; 1138 1140 struct oscar_data *od = (struct oscar_data *)data->ic->proto_data; … … 2588 2590 } 2589 2591 2590 void oscar_accept_chat( gpointer w, struct aim_chat_invitation * inv)2592 void oscar_accept_chat(void *data) 2591 2593 { 2594 struct aim_chat_invitation * inv = data; 2595 2592 2596 oscar_chat_join(inv->ic, inv->name, NULL, NULL); 2593 2597 g_free(inv->name); … … 2595 2599 } 2596 2600 2597 void oscar_reject_chat( gpointer w, struct aim_chat_invitation * inv)2601 void oscar_reject_chat(void *data) 2598 2602 { 2603 struct aim_chat_invitation * inv = data; 2604 2599 2605 g_free(inv->name); 2600 2606 g_free(inv); -
protocols/yahoo/yahoo.c
re46e077 rc4a1036 797 797 } 798 798 799 static void byahoo_accept_conf( gpointer w, struct byahoo_conf_invitation *inv ) 800 { 799 static void byahoo_accept_conf( void *data ) 800 { 801 struct byahoo_conf_invitation *inv = data; 802 801 803 yahoo_conference_logon( inv->yid, NULL, inv->members, inv->name ); 802 804 imcb_chat_add_buddy( inv->c, inv->ic->acc->user ); … … 805 807 } 806 808 807 static void byahoo_reject_conf( gpointer w, struct byahoo_conf_invitation *inv ) 808 { 809 static void byahoo_reject_conf( void *data ) 810 { 811 struct byahoo_conf_invitation *inv = data; 812 809 813 yahoo_conference_decline( inv->yid, NULL, inv->members, inv->name, "User rejected groupchat" ); 810 814 imcb_chat_free( inv->c ); -
query.c
re46e077 rc4a1036 30 30 static query_t *query_default( irc_t *irc ); 31 31 32 query_t *query_add( irc_t *irc, struct im_connection *ic, char *question, void *yes, void *no, void *data ) 32 query_t *query_add( irc_t *irc, struct im_connection *ic, char *question, 33 query_callback yes, query_callback no, void *data ) 33 34 { 34 35 query_t *q = g_new0( query_t, 1 ); … … 144 145 else 145 146 irc_usermsg( irc, "Accepted: %s", q->question ); 146 q->yes( NULL,q->data );147 q->yes( q->data ); 147 148 } 148 149 else … … 152 153 else 153 154 irc_usermsg( irc, "Rejected: %s", q->question ); 154 q->no( NULL,q->data );155 q->no( q->data ); 155 156 } 156 157 q->data = NULL; -
query.h
re46e077 rc4a1036 27 27 #define _QUERY_H 28 28 29 typedef void (*query_callback) ( void *data ); 30 29 31 typedef struct query 30 32 { 31 33 struct im_connection *ic; 32 34 char *question; 33 void (* yes) ( gpointer w, void *data ); 34 void (* no) ( gpointer w, void *data ); 35 query_callback yes, no; 35 36 void *data; 36 37 struct query *next; 37 38 } query_t; 38 39 39 query_t *query_add( irc_t *irc, struct im_connection *ic, char *question, void *yes, void *no, void *data ); 40 query_t *query_add( irc_t *irc, struct im_connection *ic, char *question, 41 query_callback yes, query_callback no, void *data ); 40 42 void query_del( irc_t *irc, query_t *q ); 41 43 void query_del_by_conn( irc_t *irc, struct im_connection *ic ); -
root_commands.c
re46e077 rc4a1036 204 204 } 205 205 206 void cmd_account_del_yes( gpointer w, void *data ) 207 { 208 account_t *a = data; 209 irc_t *irc = a->irc; 210 211 if( a->ic ) 212 { 213 irc_usermsg( irc, "Account is still logged in, can't delete" ); 214 } 215 else 216 { 217 account_del( irc, a ); 218 irc_usermsg( irc, "Account deleted" ); 219 } 220 } 221 222 void cmd_account_del_no( gpointer w, void *data ) 223 { 206 struct cmd_account_del_data 207 { 208 account_t *a; 209 irc_t *irc; 210 }; 211 212 void cmd_account_del_yes( void *data ) 213 { 214 struct cmd_account_del_data *cad = data; 215 account_t *a; 216 217 for( a = cad->irc->accounts; a && a != cad->a; a = a->next ); 218 219 if( a == NULL ) 220 { 221 irc_usermsg( cad->irc, "Account already deleted" ); 222 } 223 else if( a->ic ) 224 { 225 irc_usermsg( cad->irc, "Account is still logged in, can't delete" ); 226 } 227 else 228 { 229 account_del( cad->irc, a ); 230 irc_usermsg( cad->irc, "Account deleted" ); 231 } 232 g_free( data ); 233 } 234 235 void cmd_account_del_no( void *data ) 236 { 237 g_free( data ); 224 238 } 225 239 … … 278 292 else 279 293 { 294 struct cmd_account_del_data *cad; 280 295 char *msg; 296 297 cad = g_malloc( sizeof( struct cmd_account_del_data ) ); 298 cad->a = a; 299 cad->irc = irc; 281 300 282 301 msg = g_strdup_printf( "If you remove this account (%s(%s)), BitlBee will " … … 285 304 "set' command. Are you sure you want to delete this " 286 305 "account?", a->prpl->name, a->user ); 287 query_add( irc, NULL, msg, cmd_account_del_yes, cmd_account_del_no, a);306 query_add( irc, NULL, msg, cmd_account_del_yes, cmd_account_del_no, cad ); 288 307 g_free( msg ); 289 308 } … … 404 423 acc_handle = g_strdup( cmd[2] ); 405 424 425 if( !acc_handle ) 426 { 427 irc_usermsg( irc, "Not enough parameters given (need %d)", 3 ); 428 return; 429 } 430 406 431 if( ( tmp = strchr( acc_handle, '/' ) ) ) 407 432 { … … 584 609 g_free( irc->mynick ); 585 610 irc->mynick = g_strdup( cmd[2] ); 611 612 if( strcmp( cmd[0], "set_rename" ) != 0 ) 613 set_setstr( &irc->set, "root_nick", cmd[2] ); 586 614 } 587 615 else if( u->send_handler == buddy_send_handler ) … … 592 620 irc_usermsg( irc, "Nick successfully changed" ); 593 621 } 622 } 623 624 char *set_eval_root_nick( set_t *set, char *new_nick ) 625 { 626 irc_t *irc = set->data; 627 628 if( strcmp( irc->mynick, new_nick ) != 0 ) 629 { 630 char *cmd[] = { "set_rename", irc->mynick, new_nick, NULL }; 631 632 cmd_rename( irc, cmd ); 633 } 634 635 return strcmp( irc->mynick, new_nick ) == 0 ? new_nick : NULL; 594 636 } 595 637
Note: See TracChangeset
for help on using the changeset viewer.