aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2006-07-09 12:54:45 +0200
committerWilmer van der Gaast <wilmer@gaast.net>2006-07-09 12:54:45 +0200
commita93e3c822a697562c2e05906059922ed28f51ca5 (patch)
tree6f8a2b2c5e09c26032433d4679ae4729e0dd63af
parentbf25fa3627c00f80bad624bb4549c46e4b084279 (diff)
Fixed irc_names() (forgot to add @s for user/root in the new version).
-rw-r--r--irc.c5
1 files changed, 4 insertions, 1 deletions
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: */