Changeset d995c9b
- Timestamp:
- 2008-08-31T14:54:39Z (16 years ago)
- Branches:
- master
- Children:
- 3611717
- Parents:
- 39f93f0
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
account.c
r39f93f0 rd995c9b 190 190 { 191 191 account_t *a, *l = NULL; 192 struct chat *c, *nc; 192 193 193 194 if( acc->ic ) … … 202 203 else 203 204 irc->accounts = a->next; 205 206 for( c = irc->chatrooms; c; c = nc ) 207 if( acc == c->acc ) 208 { 209 nc = c->next; 210 chat_del( irc, c ); 211 } 204 212 205 213 while( a->set ) -
chat.c
r39f93f0 rd995c9b 126 126 } 127 127 128 int chat_del( irc_t *irc, struct chat *chat ) 129 { 130 struct chat *c, *l = NULL; 131 132 for( c = irc->chatrooms; c; c = (l=c)->next ) 133 if( c == chat ) 134 break; 135 136 if( c == NULL ) 137 return 0; 138 else if( l == NULL ) 139 irc->chatrooms = c->next; 140 else 141 l->next = c->next; 142 143 while( c->set ) 144 set_del( &c->set, c->set->key ); 145 146 g_free( c->handle ); 147 g_free( c->channel ); 148 g_free( c ); 149 150 return 1; 151 } 152 128 153 int chat_chancmp( char *a, char *b ) 129 154 { -
chat.h
r39f93f0 rd995c9b 39 39 struct chat *chat_bychannel( irc_t *irc, char *channel ); 40 40 struct chat *chat_get( irc_t *irc, char *id ); 41 int chat_del( irc_t *irc, struct chat *chat ); 41 42 42 43 int chat_chancmp( char *a, char *b ); -
root_commands.c
r39f93f0 rd995c9b 1050 1050 { 1051 1051 cmd_set_real( irc, cmd + 1, cmd_chat_set_findhead ); 1052 } 1053 else if( g_strcasecmp( cmd[1], "del" ) == 0 ) 1054 { 1055 if( !cmd[2] ) 1056 { 1057 irc_usermsg( irc, "Not enough parameters given (need %d)", 2 ); 1058 return; 1059 } 1060 1061 if( ( c = chat_get( irc, cmd[2] ) ) ) 1062 { 1063 chat_del( irc, c ); 1064 } 1065 else 1066 { 1067 irc_usermsg( irc, "Could not remove chat." ); 1068 } 1052 1069 } 1053 1070 else if( g_strcasecmp( cmd[1], "with" ) == 0 )
Note: See TracChangeset
for help on using the changeset viewer.