aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-04-21 01:03:01 +0200
committerWilmer van der Gaast <wilmer@gaast.net>2010-04-21 01:03:01 +0200
commit9d4352c51300548b4a053dab85517f0dd0cb386c (patch)
treee8c4a89096870304e01cac975bc591da951f8fe2
parente7edbb75b23e200a8b6a8e766ede7af319a75dc9 (diff)
Restored a few more root commands.
-rw-r--r--dcc.c2
-rw-r--r--protocols/ft.h1
-rw-r--r--root_commands.c14
3 files changed, 9 insertions, 8 deletions
diff --git a/dcc.c b/dcc.c
index f17f52aa..470acccc 100644
--- a/dcc.c
+++ b/dcc.c
@@ -77,7 +77,7 @@ dcc_file_transfer_t *dcc_alloc_transfer( const char *file_name, size_t file_size
file->file_size = file_size;
file->file_name = g_strdup( file_name );
file->local_id = local_transfer_id++;
- df->ic = ic;
+ file->ic = df->ic = ic;
df->ft = file;
return df;
diff --git a/protocols/ft.h b/protocols/ft.h
index c1ee2b49..159f16f2 100644
--- a/protocols/ft.h
+++ b/protocols/ft.h
@@ -106,6 +106,7 @@ typedef struct file_transfer {
* IM-protocol specific data associated with this file transfer.
*/
gpointer data;
+ struct im_connection *ic;
/*
* Private data.
diff --git a/root_commands.c b/root_commands.c
index 3dbf8bcd..7f835cd8 100644
--- a/root_commands.c
+++ b/root_commands.c
@@ -963,7 +963,6 @@ static void cmd_blist( irc_t *irc, char **cmd )
irc_usermsg( irc, "%d buddies (%d available, %d away, %d offline)", n_online + n_away + n_offline, n_online, n_away, n_offline );
}
-#if 0
static void cmd_qlist( irc_t *irc, char **cmd )
{
query_t *q = irc->queries;
@@ -984,6 +983,7 @@ static void cmd_qlist( irc_t *irc, char **cmd )
irc_usermsg( irc, "%d, BitlBee: %s", num, q->question );
}
+#if 0
static set_t **cmd_chat_set_findhead( irc_t *irc, char *id )
{
struct chat *c;
@@ -1095,6 +1095,7 @@ static void cmd_chat( irc_t *irc, char **cmd )
irc_usermsg( irc, "Unknown command: %s %s. Please use \x02help commands\x02 to get a list of available commands.", "chat", cmd[1] );
}
}
+#endif
static void cmd_transfer( irc_t *irc, char **cmd )
{
@@ -1144,20 +1145,19 @@ static void cmd_transfer( irc_t *irc, char **cmd )
if( file->status == FT_STATUS_LISTENING )
{
irc_usermsg( irc, "Rejecting file transfer for %s", file->file_name );
- imcb_file_canceled( file, "Denied by user" );
+ imcb_file_canceled( file->ic, file, "Denied by user" );
}
break;
case CANCEL:
if( file->local_id == fid )
{
irc_usermsg( irc, "Canceling file transfer for %s", file->file_name );
- imcb_file_canceled( file, "Canceled by user" );
+ imcb_file_canceled( file->ic, file, "Canceled by user" );
}
break;
}
}
}
-#endif
/* IMPORTANT: Keep this list sorted! The short command logic needs that. */
const command_t commands[] = {
@@ -1165,23 +1165,23 @@ const command_t commands[] = {
{ "add", 2, cmd_add, 0 },
{ "blist", 0, cmd_blist, 0 },
{ "drop", 1, cmd_drop, 0 },
+ { "ft", 0, cmd_transfer, 0 },
{ "help", 0, cmd_help, 0 },
{ "identify", 1, cmd_identify, 0 },
{ "info", 1, cmd_info, 0 },
{ "no", 0, cmd_yesno, 0 },
+ { "qlist", 0, cmd_qlist, 0 },
{ "register", 1, cmd_register, 0 },
{ "remove", 1, cmd_remove, 0 },
{ "rename", 2, cmd_rename, 0 },
{ "save", 0, cmd_save, 0 },
{ "set", 0, cmd_set, 0 },
+ { "transfer", 0, cmd_transfer, 0 },
{ "yes", 0, cmd_yesno, 0 },
#if 0
{ "allow", 1, cmd_allow, 0 },
{ "block", 1, cmd_block, 0 },
{ "chat", 1, cmd_chat, 0 },
- { "ft", 0, cmd_transfer, 0 },
- { "qlist", 0, cmd_qlist, 0 },
- { "transfer", 0, cmd_transfer, 0 },
#endif
{ NULL }
};