diff options
| author | 2006-10-28 18:12:45 +0000 | |
|---|---|---|
| committer | 2006-10-28 18:12:45 +0000 | |
| commit | 034f74a23b3d6aff177682c916e18382621f495a (patch) | |
| tree | 99840e8e12ee0da70c8e2acbb205a31d6e4cf3d9 /src/users.cpp | |
| parent | Whoops, wrong linfeed type on ADDLINE in netburst (diff) | |
| download | inspircd++-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.cpp | 7 |
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()); } } |
