From 034f74a23b3d6aff177682c916e18382621f495a Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 28 Oct 2006 18:12:45 +0000 Subject: 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 --- src/users.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/users.cpp') 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()); } } -- cgit v1.3.1-10-gc9f91