Changeset 131c6b6
- Timestamp:
- 2008-08-30T22:26:45Z (16 years ago)
- Branches:
- master
- Children:
- e7bc722
- Parents:
- a9a7287
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
chat.c
ra9a7287 r131c6b6 86 86 } 87 87 88 struct chat *chat_get( irc_t *irc, char *id ) 89 { 90 struct chat *c, *ret = NULL; 91 int nr; 92 93 if( sscanf( id, "%d", &nr ) == 1 && nr < 1000 ) 94 { 95 for( c = irc->chatrooms; c; c = c->next ) 96 if( ( nr-- ) == 0 ) 97 return c; 98 99 return NULL; 100 } 101 102 for( c = irc->chatrooms; c; c = c->next ) 103 { 104 if( strstr( c->handle, id ) ) 105 { 106 if( !ret ) 107 ret = c; 108 else 109 return NULL; 110 } 111 else if( strstr( c->channel, id ) ) 112 { 113 if( !ret ) 114 ret = c; 115 else 116 return NULL; 117 } 118 } 119 120 return ret; 121 } 122 88 123 int chat_chancmp( char *a, char *b ) 89 124 { -
chat.h
ra9a7287 r131c6b6 38 38 struct chat *chat_byhandle( irc_t *irc, account_t *acc, char *handle ); 39 39 struct chat *chat_bychannel( irc_t *irc, char *channel ); 40 struct chat *chat_get( irc_t *irc, char *id ); 40 41 41 42 int chat_chancmp( char *a, char *b );
Note: See TracChangeset
for help on using the changeset viewer.