diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2005-11-09 00:06:46 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2005-11-09 00:06:46 +0100 |
commit | 68b50b5f367de68ca334bb83bf200a3406990410 (patch) | |
tree | fa9edd433bd9e5b0592d684444d47a3218281339 | |
parent | 2095c5749a1024e15a1151db73acd9cf93c9b0cd (diff) | |
parent | 9c62a7cd418e836664aeee7035a39278687f3a50 (diff) |
QUIT now works before logging in too
-rw-r--r-- | irc.c | 14 | ||||
-rw-r--r-- | protocols/oscar/aim_internal.h | 1 | ||||
-rw-r--r-- | protocols/oscar/faimconfig.h | 0 | ||||
-rw-r--r-- | protocols/oscar/snac.c | 4 |
4 files changed, 10 insertions, 9 deletions
@@ -161,7 +161,7 @@ void irc_free(irc_t * irc) g_source_remove( irc->r_watch_source_id ); if( irc->w_watch_source_id > 0 ) g_source_remove( irc->w_watch_source_id ); - g_io_channel_close( irc->io_channel ); + g_io_channel_unref( irc->io_channel ); irc_connection_list = g_slist_remove( irc_connection_list, irc ); @@ -462,6 +462,12 @@ int irc_exec( irc_t *irc, char **cmd ) } return( 1 ); } + else if( g_strcasecmp( cmd[0], "QUIT" ) == 0 ) + { + irc_write( irc, "ERROR :%s%s", cmd[1]?"Quit: ":"", cmd[1]?cmd[1]:"Client Quit" ); + g_io_channel_close( irc->io_channel ); + return( 0 ); + } if( !irc->user || !irc->nick ) { @@ -636,12 +642,6 @@ int irc_exec( irc_t *irc, char **cmd ) 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 ) - { - irc_write( irc, "ERROR :%s%s", cmd[1]?"Quit: ":"", cmd[1]?cmd[1]:"Client Quit" ); - g_io_channel_close( irc->io_channel ); - return( 0 ); - } else if( g_strcasecmp( cmd[0], "WHO" ) == 0 ) { irc_who( irc, cmd[1] ); diff --git a/protocols/oscar/aim_internal.h b/protocols/oscar/aim_internal.h index 2e36c961..29c16b9f 100644 --- a/protocols/oscar/aim_internal.h +++ b/protocols/oscar/aim_internal.h @@ -106,7 +106,6 @@ typedef struct aim_snac_s { } aim_snac_t; void aim_initsnachash(aim_session_t *sess); -aim_snacid_t aim_newsnac(aim_session_t *, aim_snac_t *newsnac); aim_snacid_t aim_cachesnac(aim_session_t *sess, const guint16 family, const guint16 type, const guint16 flags, const void *data, const int datalen); aim_snac_t *aim_remsnac(aim_session_t *, aim_snacid_t id); void aim_cleansnacs(aim_session_t *, int maxage); diff --git a/protocols/oscar/faimconfig.h b/protocols/oscar/faimconfig.h deleted file mode 100644 index e69de29b..00000000 --- a/protocols/oscar/faimconfig.h +++ /dev/null diff --git a/protocols/oscar/snac.c b/protocols/oscar/snac.c index e2bac179..8a75b2a0 100644 --- a/protocols/oscar/snac.c +++ b/protocols/oscar/snac.c @@ -14,6 +14,8 @@ #include <aim.h> +static aim_snacid_t aim_newsnac(aim_session_t *sess, aim_snac_t *newsnac); + /* * Called from aim_session_init() to initialize the hash. */ @@ -50,7 +52,7 @@ aim_snacid_t aim_cachesnac(aim_session_t *sess, const guint16 family, const guin * Clones the passed snac structure and caches it in the * list/hash. */ -aim_snacid_t aim_newsnac(aim_session_t *sess, aim_snac_t *newsnac) +static aim_snacid_t aim_newsnac(aim_session_t *sess, aim_snac_t *newsnac) { aim_snac_t *snac; int index; |