aboutsummaryrefslogtreecommitdiffstats
path: root/src/users.cpp
diff options
context:
space:
mode:
authorGravatar brain2006-10-28 18:12:45 +0000
committerGravatar brain2006-10-28 18:12:45 +0000
commit034f74a23b3d6aff177682c916e18382621f495a (patch)
tree99840e8e12ee0da70c8e2acbb205a31d6e4cf3d9 /src/users.cpp
parentWhoops, wrong linfeed type on ADDLINE in netburst (diff)
downloadinspircd++-034f74a23b3d6aff177682c916e18382621f495a.tar.gz
inspircd++-034f74a23b3d6aff177682c916e18382621f495a.tar.bz2
inspircd++-034f74a23b3d6aff177682c916e18382621f495a.zip
Add support for OnWhoisLine, which allows modules to change or drop any line of whois before its sent to a user
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5570 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 4100e3452..90b6ee859 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -1887,14 +1887,15 @@ void userrec::SplitChanList(userrec* dest, const std::string &cl)
try
{
- prefix << ":" << ServerInstance->Config->ServerName << " 319 " << this->nick << " " << dest->nick << " :";
+ prefix << this->nick << " " << dest->nick << " :";
line = prefix.str();
+ int namelen = strlen(ServerInstance->Config->ServerName) + 6;
for (start = 0; (pos = cl.find(' ', start)) != std::string::npos; start = pos+1)
{
length = (pos == std::string::npos) ? cl.length() : pos;
- if (line.length() + length - start > 510)
+ if (line.length() + namelen + length - start > 510)
{
this->Write(line);
line = prefix.str();
@@ -1913,7 +1914,7 @@ void userrec::SplitChanList(userrec* dest, const std::string &cl)
if (line.length())
{
- this->Write(line);
+ ServerInstance->SendWhoisLine(this, 319, "%s", line.c_str());
}
}