aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2006-04-25 19:57:23 +0200
committerWilmer van der Gaast <wilmer@gaast.net>2006-04-25 19:57:23 +0200
commit3edaed94d464210dd64e0d337a95287e3f12bb2d (patch)
tree6c55361d3b0a0a5447886326ae46d8ea48506187
parent85616c361bf152a10f774ad65068103d0724e42b (diff)
parent79c6f9f8fff2b4c4627353e8a8eeb591d99a2098 (diff)
Misc. things (mainly code cleanup, better quoting for root commands)
-rw-r--r--account.c3
-rw-r--r--irc.c8
-rw-r--r--protocols/nogaim.c31
-rw-r--r--protocols/nogaim.h8
-rw-r--r--protocols/oscar/oscar.c4
-rw-r--r--protocols/ssl_nss.c12
-rw-r--r--root_commands.c7
7 files changed, 24 insertions, 49 deletions
diff --git a/account.c b/account.c
index d2e1dc9e..168d18c0 100644
--- a/account.c
+++ b/account.c
@@ -166,7 +166,8 @@ void account_on( irc_t *irc, account_t *a )
void account_off( irc_t *irc, account_t *a )
{
- account_offline( a->gc );
+ a->gc->wants_to_die = TRUE;
+ signoff( a->gc );
a->gc = NULL;
if( a->reconnect )
{
diff --git a/irc.c b/irc.c
index 60188c3b..44fc9ad3 100644
--- a/irc.c
+++ b/irc.c
@@ -232,10 +232,12 @@ void irc_free(irc_t * irc)
irc_connection_list = g_slist_remove( irc_connection_list, irc );
for (account = irc->accounts; account; account = account->next) {
- if (account->gc)
- account_offline(account->gc);
- else if (account->reconnect)
+ if (account->gc) {
+ account->gc->wants_to_die = TRUE;
+ signoff(account->gc);
+ } else if (account->reconnect) {
cancel_auto_reconnect(account);
+ }
}
g_free(irc->sendbuffer);
diff --git a/protocols/nogaim.c b/protocols/nogaim.c
index fb9c7986..51d08e5a 100644
--- a/protocols/nogaim.c
+++ b/protocols/nogaim.c
@@ -359,17 +359,6 @@ void account_online( struct gaim_connection *gc )
/* Also necessary when we're not away, at least for some of the
protocols. */
proto_away( gc, u->away );
-
- if( strcmp( gc->prpl->name, "ICQ" ) == 0 )
- {
- for( u = gc->irc->users; u; u = u->next )
- if( u->gc == gc )
- break;
-
- if( u == NULL )
- serv_got_crap( gc, "\x02""***\x02"" BitlBee now supports ICQ server-side contact lists. "
- "See \x02""help import_buddies\x02"" for more information." );
- }
}
gboolean auto_reconnect( gpointer data )
@@ -388,12 +377,6 @@ void cancel_auto_reconnect( account_t *a )
a->reconnect = 0;
}
-void account_offline( struct gaim_connection *gc )
-{
- gc->wants_to_die = TRUE;
- signoff( gc );
-}
-
void signoff( struct gaim_connection *gc )
{
irc_t *irc = gc->irc;
@@ -961,20 +944,6 @@ static int remove_chat_buddy_silent( struct conversation *b, char *handle )
}
-/* prefs.c */
-
-/* Necessary? */
-void build_block_list()
-{
- return;
-}
-
-void build_allow_list()
-{
- return;
-}
-
-
/* Misc. BitlBee stuff which shouldn't really be here */
struct conversation *conv_findchannel( char *channel )
diff --git a/protocols/nogaim.h b/protocols/nogaim.h
index 4699f69f..4251fbaa 100644
--- a/protocols/nogaim.h
+++ b/protocols/nogaim.h
@@ -211,7 +211,6 @@ G_MODULE_EXPORT void hide_login_progress( struct gaim_connection *gc, char *msg
G_MODULE_EXPORT void hide_login_progress_error( struct gaim_connection *gc, char *msg );
G_MODULE_EXPORT void serv_got_crap( struct gaim_connection *gc, char *format, ... );
G_MODULE_EXPORT void account_online( struct gaim_connection *gc );
-G_MODULE_EXPORT void account_offline( struct gaim_connection *gc );
G_MODULE_EXPORT void signoff( struct gaim_connection *gc );
/* dialogs.c */
@@ -219,11 +218,8 @@ G_MODULE_EXPORT void do_error_dialog( struct gaim_connection *gc, char *msg, cha
G_MODULE_EXPORT void do_ask_dialog( struct gaim_connection *gc, char *msg, void *data, void *doit, void *dont );
/* list.c */
-G_MODULE_EXPORT int bud_list_cache_exists( struct gaim_connection *gc );
-G_MODULE_EXPORT void do_import( struct gaim_connection *gc, void *null );
G_MODULE_EXPORT void add_buddy( struct gaim_connection *gc, char *group, char *handle, char *realname );
G_MODULE_EXPORT struct buddy *find_buddy( struct gaim_connection *gc, char *handle );
-G_MODULE_EXPORT void do_export( struct gaim_connection *gc );
G_MODULE_EXPORT void signoff_blocked( struct gaim_connection *gc );
G_MODULE_EXPORT void serv_buddy_rename( struct gaim_connection *gc, char *handle, char *realname );
@@ -244,10 +240,6 @@ G_MODULE_EXPORT struct conversation *serv_got_joined_chat( struct gaim_connectio
G_MODULE_EXPORT void serv_got_chat_in( struct gaim_connection *gc, int id, char *who, int whisper, char *msg, time_t mtime );
G_MODULE_EXPORT void serv_got_chat_left( struct gaim_connection *gc, int id );
-/* prefs.c */
-G_MODULE_EXPORT void build_block_list();
-G_MODULE_EXPORT void build_allow_list();
-
struct conversation *conv_findchannel( char *channel );
#endif
diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c
index 3342fa42..53da1e27 100644
--- a/protocols/oscar/oscar.c
+++ b/protocols/oscar/oscar.c
@@ -2057,7 +2057,6 @@ static int gaim_ssi_parselist(aim_session_t *sess, aim_frame_t *fr, ...) {
char *name;
name = g_strdup(normalize(curitem->name));
gc->permit = g_slist_append(gc->permit, name);
- build_allow_list();
tmp++;
}
}
@@ -2071,7 +2070,6 @@ static int gaim_ssi_parselist(aim_session_t *sess, aim_frame_t *fr, ...) {
char *name;
name = g_strdup(normalize(curitem->name));
gc->deny = g_slist_append(gc->deny, name);
- build_block_list();
tmp++;
}
}
@@ -2277,7 +2275,7 @@ static int gaim_icqinfo(aim_session_t *sess, aim_frame_t *fr, ...)
struct tm tm;
tm.tm_mday = (int)info->birthday;
tm.tm_mon = (int)info->birthmonth-1;
- tm.tm_year = (int)info->birthyear-1900;
+ tm.tm_year = (int)info->birthyear%100;
strftime(date, sizeof(date), "%Y-%m-%d", &tm);
info_string_append(str, "\n", _("Birthday"), date);
}
diff --git a/protocols/ssl_nss.c b/protocols/ssl_nss.c
index dfd32622..00d32834 100644
--- a/protocols/ssl_nss.c
+++ b/protocols/ssl_nss.c
@@ -121,10 +121,10 @@ static void ssl_connected( gpointer data, gint source, GaimInputCondition cond )
if( source == -1 )
goto ssl_connected_failure;
-
-
-
+ /* Until we find out how to handle non-blocking I/O with NSS... */
+ sock_make_blocking( conn->fd );
+
conn->prfd = SSL_ImportFD(NULL, PR_ImportTCPSocket(source));
SSL_OptionSet(conn->prfd, SSL_SECURITY, PR_TRUE);
SSL_OptionSet(conn->prfd, SSL_HANDSHAKE_AS_CLIENT, PR_TRUE);
@@ -180,3 +180,9 @@ int ssl_getfd( void *conn )
{
return( ((struct scd*)conn)->fd );
}
+
+GaimInputCondition ssl_getdirection( void *conn )
+{
+ /* Just in case someone calls us, let's return the most likely case: */
+ return GAIM_INPUT_READ;
+}
diff --git a/root_commands.c b/root_commands.c
index 0b5f4da5..6d9868ac 100644
--- a/root_commands.c
+++ b/root_commands.c
@@ -57,6 +57,13 @@ void root_command_string( irc_t *irc, user_t *u, char *command, int flags )
s --;
}
}
+ else if( *s == '\\' && ( ( !q && s[1] ) || ( q && q == s[1] ) ) )
+ {
+ char *cpy;
+
+ for( cpy = s; *cpy; cpy ++ )
+ cpy[0] = cpy[1];
+ }
else if( *s == q )
{
q = *s = 0;
id='n155' href='#n155'>155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311