diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-04-01 22:29:45 -0400 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-04-01 22:29:45 -0400 |
commit | fb117aee274bccfb6528288599ef81fe72191e12 (patch) | |
tree | 5f31493f33c12528dce1424057c94bba64633dbc | |
parent | e63507a356ac94085bcd00048b81d3ce2f27f287 (diff) |
Cleaned lots of compiler warnings so I can get some signal again.
-rw-r--r-- | bitlbee.h | 2 | ||||
-rw-r--r-- | irc.c | 1 | ||||
-rw-r--r-- | irc_channel.c | 5 | ||||
-rw-r--r-- | irc_commands.c | 2 | ||||
-rw-r--r-- | irc_user.c | 5 | ||||
-rw-r--r-- | protocols/account.c | 1 | ||||
-rw-r--r-- | protocols/bee.h | 2 | ||||
-rw-r--r-- | protocols/bee_user.c | 4 | ||||
-rw-r--r-- | protocols/nogaim.c | 11 |
9 files changed, 22 insertions, 11 deletions
@@ -158,7 +158,7 @@ int bitlbee_inetd_init( void ); gboolean bitlbee_io_current_client_read( gpointer data, gint source, b_input_condition cond ); gboolean bitlbee_io_current_client_write( gpointer data, gint source, b_input_condition cond ); -//void root_command_string( irc_t *irc, user_t *u, char *command, int flags ); +void root_command_string( irc_t *irc, char *command ); void root_command( irc_t *irc, char *command[] ); gboolean bitlbee_shutdown( gpointer data, gint fd, b_input_condition cond ); @@ -24,6 +24,7 @@ */ #include "bitlbee.h" +#include "ipc.h" GSList *irc_connection_list; diff --git a/irc_channel.c b/irc_channel.c index 3afdddee..db3ecd34 100644 --- a/irc_channel.c +++ b/irc_channel.c @@ -138,10 +138,13 @@ gboolean irc_channel_name_ok( const char *name ) /* Channel-type dependent functions, for control channels: */ static gboolean control_channel_privmsg( irc_channel_t *ic, const char *msg ) { + char cmd[strlen(msg)+1]; + g_free( ic->irc->last_root_cmd ); ic->irc->last_root_cmd = g_strdup( ic->name ); - root_command_string( ic->irc, msg ); + strcpy( cmd, msg ); + root_command_string( ic->irc, cmd ); return TRUE; } diff --git a/irc_commands.c b/irc_commands.c index 03d05417..57268d07 100644 --- a/irc_commands.c +++ b/irc_commands.c @@ -38,7 +38,7 @@ static void irc_cmd_pass( irc_t *irc, char **cmd ) command last. (Possibly it won't send it at all if it turns out we don't require it, which will break this feature.) Try to identify using the given password. */ - /*return root_command( irc, send_cmd );*/ + return root_command( irc, send_cmd ); } /* Handling in pre-logged-in state, first see if this server is password-protected: */ @@ -120,10 +120,13 @@ gint irc_user_cmp( gconstpointer a_, gconstpointer b_ ) /* User-type dependent functions, for root/NickServ: */ static gboolean root_privmsg( irc_user_t *iu, const char *msg ) { + char cmd[strlen(msg)+1]; + g_free( iu->irc->last_root_cmd ); iu->irc->last_root_cmd = g_strdup( iu->nick ); - root_command_string( iu->irc, msg ); + strcpy( cmd, msg ); + root_command_string( iu->irc, cmd ); return TRUE; } diff --git a/protocols/account.c b/protocols/account.c index a3c2e0d7..0bacea74 100644 --- a/protocols/account.c +++ b/protocols/account.c @@ -216,7 +216,6 @@ account_t *account_get( bee_t *bee, char *id ) void account_del( bee_t *bee, account_t *acc ) { account_t *a, *l = NULL; - struct chat *c, *nc; if( acc->ic ) /* Caller should have checked, accounts still in use can't be deleted. */ diff --git a/protocols/bee.h b/protocols/bee.h index be14234b..023c1644 100644 --- a/protocols/bee.h +++ b/protocols/bee.h @@ -90,6 +90,6 @@ int bee_user_msg( bee_t *bee, bee_user_t *bu, const char *msg, int flags ); G_MODULE_EXPORT void imcb_buddy_status( struct im_connection *ic, const char *handle, int flags, const char *state, const char *message ); /* Not implemented yet! */ G_MODULE_EXPORT void imcb_buddy_times( struct im_connection *ic, const char *handle, time_t login, time_t idle ); /* Call when a handle says something. 'flags' and 'sent_at may be just 0. */ -G_MODULE_EXPORT void imcb_buddy_msg( struct im_connection *ic, const char *handle, char *msg, uint32_t flags, time_t sent_at ); +G_MODULE_EXPORT void imcb_buddy_msg( struct im_connection *ic, const char *handle, char *msg, guint32 flags, time_t sent_at ); #endif /* __BEE_H__ */ diff --git a/protocols/bee_user.c b/protocols/bee_user.c index 32022dd8..2c11ca1d 100644 --- a/protocols/bee_user.c +++ b/protocols/bee_user.c @@ -91,8 +91,10 @@ int bee_user_msg( bee_t *bee, bee_user_t *bu, const char *msg, int flags ) buf = escape_html( msg ); msg = buf; } + else + buf = g_strdup( msg ); - st = bu->ic->acc->prpl->buddy_msg( bu->ic, bu->handle, msg, flags ); + st = bu->ic->acc->prpl->buddy_msg( bu->ic, bu->handle, buf, flags ); g_free( buf ); return st; diff --git a/protocols/nogaim.c b/protocols/nogaim.c index 741bdb76..141ae9a3 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -37,8 +37,6 @@ #include "nogaim.h" #include "chat.h" -static int remove_chat_buddy_silent( struct groupchat *b, const char *handle ); - GSList *connections; #ifdef WITH_PLUGINS @@ -474,6 +472,7 @@ struct imcb_ask_cb_data char *handle; }; +#if 0 static void imcb_ask_auth_cb_no( void *data ) { struct imcb_ask_cb_data *cbd = data; @@ -493,6 +492,7 @@ static void imcb_ask_auth_cb_yes( void *data ) g_free( cbd->handle ); g_free( cbd ); } +#endif void imcb_ask_auth( struct im_connection *ic, const char *handle, const char *realname ) { @@ -515,6 +515,7 @@ void imcb_ask_auth( struct im_connection *ic, const char *handle, const char *re } +#if 0 static void imcb_ask_add_cb_no( void *data ) { g_free( ((struct imcb_ask_cb_data*)data)->handle ); @@ -529,6 +530,7 @@ static void imcb_ask_add_cb_yes( void *data ) return imcb_ask_add_cb_no( data ); } +#endif void imcb_ask_add( struct im_connection *ic, const char *handle, const char *realname ) { @@ -596,6 +598,7 @@ struct groupchat *imcb_chat_new( struct im_connection *ic, const char *handle ) return c; #endif + return NULL; } void imcb_chat_free( struct groupchat *c ) @@ -782,9 +785,9 @@ void imcb_chat_remove_buddy( struct groupchat *b, const char *handle, const char #endif } +#if 0 static int remove_chat_buddy_silent( struct groupchat *b, const char *handle ) { -#if 0 GList *i; /* Find the handle in the room userlist and shoot it */ @@ -800,10 +803,10 @@ static int remove_chat_buddy_silent( struct groupchat *b, const char *handle ) i = i->next; } -#endif return 0; } +#endif /* Misc. BitlBee stuff which shouldn't really be here */ |