summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-23 13:47:58 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-23 13:47:58 +0000
commit552e5574610dddacbe4292df277bb151ca4b6193 (patch)
tree83b2c35515ce30bb621252b487262486b8c1a658
parenta43e28eaf6a2adf77db912866479c37c9623b946 (diff)
Fixed minor join bug
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@708 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/commands.cpp9
-rw-r--r--src/inspircd.cpp2
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);
}