diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-09 00:49:40 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-09 00:49:40 +0000 |
commit | cf2d41558a0affc13f18bc2ec3a9c81d2a7b82ee (patch) | |
tree | c40e05d7d783f2aea439f815771a32dfc22f3df0 /src | |
parent | 4d920e51882c4f61f0714b7785e0ca4463f549e1 (diff) |
Tidy up (optimize, improve) chanrec::WriteChannelWithServ
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6269 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index 21af27177..1320ebd3d 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -641,11 +641,15 @@ void chanrec::WriteChannelWithServ(const char* ServName, const char* text, ...) void chanrec::WriteChannelWithServ(const char* ServName, const std::string &text) { CUList *ulist = this->GetUsers(); + char tb[MAXBUF]; + + snprintf(tb,MAXBUF,":%s %s",ServName ? ServName : ServerInstance->Config->ServerName, text.c_str()); + std::string out = tb; for (CUList::iterator i = ulist->begin(); i != ulist->end(); i++) { if (IS_LOCAL(i->second)) - i->second->WriteServ(text); + i->second->Write(out); } } |