diff -uBr bitlbee-0.92/bitlbee.c bitlbee-autoreply/bitlbee.c --- bitlbee-0.92/bitlbee.c 2005-02-23 10:48:31.000000000 -0500 +++ bitlbee-autoreply/bitlbee.c 2005-05-23 18:54:33.000000000 -0400 @@ -262,7 +262,7 @@ { fgetc( fp ); line = deobfucrypt( irc, s ); - root_command_string( irc, ru, line ); + root_command_string( irc, ru, line, 0 ); g_free( line ); } fclose( fp ); @@ -280,7 +280,7 @@ if( set_getint( irc, "auto_connect" ) ) { strcpy( s, "account on" ); /* Can't do this directly because r_c_s alters the string */ - root_command_string( irc, ru, s ); + root_command_string( irc, ru, s, 0 ); } return( 1 ); @@ -451,7 +451,7 @@ g_main_quit( global.loop ); } -int root_command_string( irc_t *irc, user_t *u, char *command ) +int root_command_string( irc_t *irc, user_t *u, char *command, int flags ) { char *cmd[IRC_MAX_ARGS]; char *s; diff -uBr bitlbee-0.92/bitlbee.h bitlbee-autoreply/bitlbee.h --- bitlbee-0.92/bitlbee.h 2005-02-23 17:26:59.000000000 -0500 +++ bitlbee-autoreply/bitlbee.h 2005-05-23 18:54:33.000000000 -0400 @@ -119,7 +119,7 @@ gboolean bitlbee_io_current_client_read( GIOChannel *source, GIOCondition condition, gpointer data ); gboolean bitlbee_io_current_client_write( GIOChannel *source, GIOCondition condition, gpointer data ); -int root_command_string( irc_t *irc, user_t *u, char *command ); +int root_command_string( irc_t *irc, user_t *u, char *command, int flags ); int root_command( irc_t *irc, char *command[] ); int bitlbee_load( irc_t *irc, char *password ); int bitlbee_save( irc_t *irc ); diff -uBr bitlbee-0.92/commands.c bitlbee-autoreply/commands.c --- bitlbee-0.92/commands.c 2005-02-08 16:48:35.000000000 -0500 +++ bitlbee-autoreply/commands.c 2005-05-23 18:54:33.000000000 -0400 @@ -128,7 +128,7 @@ if( checkie == -2 ) { setpassnc( irc, cmd[1] ); - root_command_string( irc, user_find( irc, irc->mynick ), "save" ); + root_command_string( irc, user_find( irc, irc->mynick ), "save", 0 ); irc->status = USTATUS_IDENTIFIED; } else diff -uBr bitlbee-0.92/irc.c bitlbee-autoreply/irc.c --- bitlbee-0.92/irc.c 2005-02-23 18:32:02.000000000 -0500 +++ bitlbee-autoreply/irc.c 2005-05-23 18:56:19.000000000 -0400 @@ -576,7 +576,7 @@ else irc_reply( irc, 461, "%s :Need more parameters", cmd[0] ); } - else if( g_strcasecmp( cmd[0], "PRIVMSG" ) == 0 ) + else if( g_strcasecmp( cmd[0], "PRIVMSG" ) == 0 || g_strcasecmp( cmd[0], "NOTICE" ) == 0 ) { if( !( cmd[1] && cmd[2] ) ) { @@ -620,7 +620,7 @@ { irc->is_private = 1; } - irc_send( irc, cmd[1], cmd[2] ); + irc_send( irc, cmd[1], cmd[2], (g_strcasecmp( cmd[0], "NOTICE") == 0) ? IM_FLAG_AWAY : 0 ); } } else if( g_strcasecmp( cmd[0], "QUIT" ) == 0 ) @@ -1289,7 +1289,7 @@ irc_reply( irc, 482, "%s :Invite impossible; User/Channel non-existent or incompatible", channel ); } -int irc_send( irc_t *irc, char *nick, char *s ) +int irc_send( irc_t *irc, char *nick, char *s, int flags ) { struct conversation *c = NULL; user_t *u = NULL; @@ -1377,7 +1377,7 @@ } if( u->send_handler ) - return( u->send_handler( irc, u, s ) ); + return( u->send_handler( irc, u, s, flags ) ); } else if( c && c->gc && c->gc->prpl ) { @@ -1392,7 +1392,7 @@ user_t *u = data; u->sendbuf[u->sendbuf_len-2] = 0; /* Cut off the last newline */ - serv_send_im( u->gc->irc, u, u->sendbuf ); + serv_send_im( u->gc->irc, u, u->sendbuf, 0 ); g_free( u->sendbuf ); u->sendbuf = NULL; @@ -1402,7 +1402,7 @@ return( FALSE ); } -int buddy_send_handler( irc_t *irc, user_t *u, char *msg ) +int buddy_send_handler( irc_t *irc, user_t *u, char *msg, int flags ) { if( !u || !u->gc ) return( 0 ); @@ -1432,7 +1432,7 @@ } else { - return( serv_send_im( irc, u, msg ) ); + return( serv_send_im( irc, u, msg, flags ) ); } } diff -uBr bitlbee-0.92/irc.h bitlbee-autoreply/irc.h --- bitlbee-0.92/irc.h 2005-02-08 15:58:30.000000000 -0500 +++ bitlbee-autoreply/irc.h 2005-05-23 18:54:33.000000000 -0400 @@ -137,11 +137,11 @@ void irc_whois( irc_t *irc, char *nick ); int irc_away( irc_t *irc, char *away ); -int irc_send( irc_t *irc, char *nick, char *s ); +int irc_send( irc_t *irc, char *nick, char *s, int flags ); int irc_privmsg( irc_t *irc, user_t *u, char *type, char *to, char *prefix, char *msg ); int irc_msgfrom( irc_t *irc, char *nick, char *msg ); int irc_noticefrom( irc_t *irc, char *nick, char *msg ); -int buddy_send_handler( irc_t *irc, user_t *u, char *msg ); +int buddy_send_handler( irc_t *irc, user_t *u, char *msg, int flags ); #endif diff -uBr bitlbee-0.92/protocols/nogaim.c bitlbee-autoreply/protocols/nogaim.c --- bitlbee-0.92/protocols/nogaim.c 2005-02-23 10:47:58.000000000 -0500 +++ bitlbee-autoreply/protocols/nogaim.c 2005-05-23 18:54:33.000000000 -0400 @@ -993,7 +993,7 @@ return( set_eval_bool( irc, set, value ) ); } -int serv_send_im( irc_t *irc, user_t *u, char *msg ) +int serv_send_im( irc_t *irc, user_t *u, char *msg, int flags ) { char buf[8192]; @@ -1001,7 +1001,7 @@ do_iconv( set_getstr( irc, "charset" ), "UTF-8", msg, buf, 0, 8192 ) != -1 ) msg = buf; - return( ((struct gaim_connection *)u->gc)->prpl->send_im( u->gc, u->handle, msg, strlen( msg ), 0 ) ); + return( ((struct gaim_connection *)u->gc)->prpl->send_im( u->gc, u->handle, msg, strlen( msg ), flags ) ); } int serv_send_chat( irc_t *irc, struct gaim_connection *gc, int id, char *msg ) diff -uBr bitlbee-0.92/protocols/nogaim.h bitlbee-autoreply/protocols/nogaim.h --- bitlbee-0.92/protocols/nogaim.h 2004-10-29 19:42:07.000000000 -0400 +++ bitlbee-autoreply/protocols/nogaim.h 2005-05-23 18:54:33.000000000 -0400 @@ -249,7 +249,7 @@ extern struct prpl *proto_prpl[16]; /* nogaim.c */ -int serv_send_im(irc_t *irc, user_t *u, char *msg); +int serv_send_im(irc_t *irc, user_t *u, char *msg, int flags); int serv_send_chat(irc_t *irc, struct gaim_connection *gc, int id, char *msg ); G_MODULE_EXPORT signed int do_iconv( char *from_cs, char *to_cs, char *src, char *dst, size_t size, size_t maxbuf ); diff -uBr bitlbee-0.92/user.h bitlbee-autoreply/user.h --- bitlbee-0.92/user.h 2004-10-29 19:58:00.000000000 -0400 +++ bitlbee-autoreply/user.h 2005-05-23 18:54:33.000000000 -0400 @@ -43,7 +43,7 @@ int sendbuf_len; guint sendbuf_timer; - int (*send_handler) ( irc_t *irc, struct __USER *u, char *msg ); + int (*send_handler) ( irc_t *irc, struct __USER *u, char *msg, int flags ); struct __USER *next; } user_t;