diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-05-01 16:12:17 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-05-01 16:12:17 +0000 |
commit | 90cc4b0ee93696e6e6b3208cd2877ae6e786440d (patch) | |
tree | d0b0b48f8c97d72c879ad0297d46d9b4f383542f /src/inspircd.cpp | |
parent | f743a782e67b56c35b5b7be7ef357a2ca109c244 (diff) |
Provided modules with the ability to sync data on a netjoin
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@767 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index eb4199f28..6fc06f0e7 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -2947,6 +2947,15 @@ void DoSync(serverrec* serv, char* tcp_host) { snprintf(data,MAXBUF,"N %d %s %s %s %s +%s %s %s :%s",u->second->age,u->second->nick,u->second->host,u->second->dhost,u->second->ident,u->second->modes,u->second->ip,u->second->server,u->second->fullname); serv->SendPacket(data,tcp_host); + for (int i = 0; i <= MODCOUNT; i++) + { + string_list l = modules[i]->OnUserSync(u->second); + for (int j = 0; j < l.size(); j++) + { + strncpy(data,l[j].c_str(),MAXBUF); + serv->SendPacket(data,tcp_host); + } + } if (strcmp(chlist(u->second),"")) { snprintf(data,MAXBUF,"J %s %s",u->second->nick,chlist(u->second)); @@ -2958,6 +2967,15 @@ void DoSync(serverrec* serv, char* tcp_host) { snprintf(data,MAXBUF,"M %s +%s",c->second->name,chanmodes(c->second)); serv->SendPacket(data,tcp_host); + for (int i = 0; i <= MODCOUNT; i++) + { + string_list l = modules[i]->OnChannelSync(c->second); + for (int j = 0; j < l.size(); j++) + { + strncpy(data,l[j].c_str(),MAXBUF); + serv->SendPacket(data,tcp_host); + } + } if (strcmp(c->second->topic,"")) { snprintf(data,MAXBUF,"T %d %s %s :%s",c->second->topicset,c->second->setby,c->second->name,c->second->topic); |