Changeset 280c56a for irc_user.c
- Timestamp:
- 2010-03-27T17:36:47Z (15 years ago)
- Branches:
- master
- Children:
- 74f1cde
- Parents:
- 2f53ada
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
irc_user.c
r2f53ada r280c56a 51 51 irc_user_t *iu; 52 52 53 if( !( iu = irc_user_ find( irc, nick ) ) )53 if( !( iu = irc_user_by_name( irc, nick ) ) ) 54 54 return 0; 55 55 … … 68 68 } 69 69 70 irc_user_t *irc_user_ find( irc_t *irc, const char *nick )70 irc_user_t *irc_user_by_name( irc_t *irc, const char *nick ) 71 71 { 72 72 char key[strlen(nick)+1]; … … 81 81 int irc_user_rename( irc_t *irc, const char *old, const char *new ) 82 82 { 83 irc_user_t *iu = irc_user_ find( irc, old );83 irc_user_t *iu = irc_user_by_name( irc, old ); 84 84 char key[strlen(new)+1]; 85 85 86 86 strcpy( key, new ); 87 if( iu == NULL || !nick_lc( key ) || irc_user_ find( irc, new ) )87 if( iu == NULL || !nick_lc( key ) || irc_user_by_name( irc, new ) ) 88 88 return 0; 89 89 … … 113 113 return strcmp( a->key, b->key ); 114 114 } 115 116 /* User-type dependent functions, for root/NickServ: */ 117 static gboolean root_privmsg( irc_user_t *iu, const char *msg ) 118 { 119 root_command_string( iu->irc, msg ); 120 121 return TRUE; 122 } 123 124 const struct irc_user_funcs irc_user_root_funcs = { 125 root_privmsg, 126 }; 127 128 /* Echo to yourself: */ 129 static gboolean self_privmsg( irc_user_t *iu, const char *msg ) 130 { 131 irc_send_msg( iu, "PRIVMSG", iu->nick, msg ); 132 133 return TRUE; 134 } 135 136 const struct irc_user_funcs irc_user_self_funcs = { 137 self_privmsg, 138 };
Note: See TracChangeset
for help on using the changeset viewer.