summaryrefslogtreecommitdiff
path: root/src/modules.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-07 16:33:24 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-07 16:33:24 +0000
commitbd4c18aa1554e4fec0913b3c5f742080cbf0eab4 (patch)
tree3f76c99a25742ac77b86d252228e0728b352f11f /src/modules.cpp
parent78cd2581e957e05246029b76c2da4ca1261d7d3f (diff)
Added servernotice back to the user, informing them
Added support for NULL as first parameter to Server::SendTo git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@418 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index b938ebcca..d2263e352 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -207,7 +207,16 @@ void Server::SendFrom(int Socket, userrec* User, std::string s)
void Server::SendTo(userrec* Source, userrec* Dest, std::string s)
{
- WriteTo(Source,Dest,"%s",s.c_str());
+ if (!Source)
+ {
+ // if source is NULL, then the message originates from the local server
+ Write(Dest->fd,":%s %s",this->GetServerName().c_str(),s.c_str());
+ }
+ else
+ {
+ // otherwise it comes from the user specified
+ WriteTo(Source,Dest,"%s",s.c_str());
+ }
}
void Server::SendChannel(userrec* User, chanrec* Channel, std::string s,bool IncludeSender)