summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-19 09:40:41 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-19 09:40:41 +0000
commitb308d00aaa5ac508b7ad5c1d1279d1b0c463582a (patch)
treec23b3f85fcfa8ca0a3b32185802c429ab911db83 /src/inspircd.cpp
parentd25c8309ce2a6b8458b57df57b75f75cf1b85ba8 (diff)
/WHO and routing fixes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@670 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index aecc2cc46..1398ec90c 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -2750,25 +2750,28 @@ void handle_who(char **parameters, int pcnt, userrec *user)
else
{
userrec* u = Find(parameters[0]);
- WriteServ(user->fd,"352 %s %s %s %s %s %s Hr@ :0 %s",user->nick, u->nick, u->ident, u->dhost, u->server, u->nick, u->fullname);
+ if (u)
+ {
+ WriteServ(user->fd,"352 %s %s %s %s %s %s Hr@ :0 %s",user->nick, u->nick, u->ident, u->dhost, u->server, u->nick, u->fullname);
+ }
+ WriteServ(user->fd,"315 %s %s :End of /WHO list.",user->nick, parameters[0]);
}
}
if (pcnt == 2)
{
if ((!strcmp(parameters[0],"0")) || (!strcmp(parameters[0],"*")) && (!strcmp(parameters[1],"o")))
{
- Ptr = user->chans[0].channel;
for (user_hash::const_iterator i = clientlist.begin(); i != clientlist.end(); i++)
{
if ((common_channels(user,i->second)) && (isnick(i->second->nick)))
{
if (strchr(i->second->modes,'o'))
{
- WriteServ(user->fd,"352 %s %s %s %s %s %s Hr@ :0 %s",user->nick, Ptr->name, i->second->ident, i->second->dhost, i->second->server, i->second->nick, i->second->fullname);
+ WriteServ(user->fd,"352 %s %s %s %s %s %s Hr@ :0 %s",user->nick, user->nick, i->second->ident, i->second->dhost, i->second->server, i->second->nick, i->second->fullname);
}
}
}
- WriteServ(user->fd,"315 %s %s :End of /WHO list.",user->nick, Ptr->name);
+ WriteServ(user->fd,"315 %s %s :End of /WHO list.",user->nick, user->nick);
return;
}
}