summaryrefslogtreecommitdiff
path: root/src/commands.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-05 12:42:20 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-05 12:42:20 +0000
commitf938b078f8e283f52a4be36da584ee001030a247 (patch)
tree38bde4cfb369dcc9edc16a5008997e278d766ee5 /src/commands.cpp
parent31900d8083615e8d3af2317410360fdaa75eba56 (diff)
Fixes to:
+s and +p channels wouldn't be synched correctly +s and +p never show in whois even when you're a member of them +s and +p never show in list even if you're a member of them git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1308 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands.cpp')
-rw-r--r--src/commands.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index 6cda474ac..97ce3420c 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -862,9 +862,10 @@ void handle_whois(char **parameters, int pcnt, userrec *user)
{
WriteServ(user->fd,"378 %s %s :is connecting from *@%s",user->nick, dest->nick, dest->host);
}
- if (strcmp(chlist(dest),""))
+ char* cl = chlist(dest,user);
+ if (strcmp(cl,""))
{
- WriteServ(user->fd,"319 %s %s :%s",user->nick, dest->nick, chlist(dest));
+ WriteServ(user->fd,"319 %s %s :%s",user->nick, dest->nick, cl);
}
WriteServ(user->fd,"312 %s %s %s :%s",user->nick, dest->nick, dest->server, GetServerDescription(dest->server).c_str());
if (strcmp(dest->awaymsg,""))
@@ -1087,7 +1088,8 @@ void handle_list(char **parameters, int pcnt, userrec *user)
WriteServ(user->fd,"321 %s Channel :Users Name",user->nick);
for (chan_hash::const_iterator i = chanlist.begin(); i != chanlist.end(); i++)
{
- if ((!i->second->c_private) && (!i->second->secret))
+ // if the channel is not private/secret, OR the user is on the channel anyway
+ if (((!i->second->c_private) && (!i->second->secret)) || (has_channel(user,i->second)))
{
WriteServ(user->fd,"322 %s %s %d :[+%s] %s",user->nick,i->second->name,usercount_i(i->second),chanmodes(i->second),i->second->topic);
}