From a93e3c822a697562c2e05906059922ed28f51ca5 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 9 Jul 2006 12:54:45 +0200 Subject: Fixed irc_names() (forgot to add @s for user/root in the new version). --- irc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/irc.c b/irc.c index 816b69d9..1a7579b8 100644 --- a/irc.c +++ b/irc.c @@ -651,6 +651,7 @@ void irc_names( irc_t *irc, char *channel ) user_t *u; char namelist[385] = ""; struct conversation *c = NULL; + char *ops = set_getstr( irc, "ops" ); /* RFCs say there is no error reply allowed on NAMES, so when the channel is invalid, just give an empty reply. */ @@ -667,6 +668,9 @@ void irc_names( irc_t *irc, char *channel ) if( u->gc && !u->away && set_getint( irc, "away_devoice" ) ) strcat( namelist, "+" ); + else if( ( strcmp( u->nick, irc->mynick ) == 0 && ( strcmp( ops, "root" ) == 0 || strcmp( ops, "both" ) == 0 ) ) || + ( strcmp( u->nick, irc->nick ) == 0 && ( strcmp( ops, "user" ) == 0 || strcmp( ops, "both" ) == 0 ) ) ) + strcat( namelist, "@" ); strcat( namelist, u->nick ); strcat( namelist, " " ); @@ -675,7 +679,6 @@ void irc_names( irc_t *irc, char *channel ) else if( ( c = conv_findchannel( channel ) ) ) { GList *l; - char *ops = set_getstr( irc, "ops" ); /* root and the user aren't in the channel userlist but should show up in /NAMES, so list them first: */ -- cgit v1.2.3