diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/commands.cpp | 9 | ||||
-rw-r--r-- | src/inspircd.cpp | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index 02c925598..3dd1004f1 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -2274,12 +2274,15 @@ void handle_link_packet(char* udp_msg, char* tcp_host, serverrec *serv) } if (!strcmp(command,"SVSJOIN")) { - snprintf(udp_msg,MAXBUF,"J %s %s",source,data); + snprintf(udp_msg,MAXBUF,"J %s",data); + NetSendToOne(tcp_host,udp_msg); + char* nick = strtok(data," "); + char* chan = strtok(NULL," "); log(DEBUG,"Rewrote SVSJOIN from services to: '%s'",udp_msg); - userrec* u = Find(source); + userrec* u = Find(nick); if (u) { - add_channel(u,data,"",true); + add_channel(u,chan,"",true); } token = udp_msg[0]; } diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 62eb28e96..5b9f54fd1 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -1437,7 +1437,7 @@ chanrec* add_channel(userrec *user, const char* cn, const char* key, bool overri { // use the stamdard J token with no privilages. char buffer[MAXBUF]; - snprintf(buffer,MAXBUF,"J %s :%s",user->nick,Ptr->name); + snprintf(buffer,MAXBUF,"J %s %s",user->nick,Ptr->name); NetSendToAll(buffer); } |