diff options
author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-10-09 22:33:23 +0000 |
---|---|---|
committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-10-09 22:33:23 +0000 |
commit | 5b65c9ce879a645c2507a46b82e46034b691e323 (patch) | |
tree | 3d8a8b1e4d9248b9adef040e74c99e93fb4dcafd /src | |
parent | f07f92e30da4a0849b98d0bbeff926ffa51ecf0a (diff) |
Fixed crash when juping servers on InspIRCd 1.2
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2543 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/protocol/inspircd12.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/protocol/inspircd12.c b/src/protocol/inspircd12.c index a116cd401..68a81bc09 100644 --- a/src/protocol/inspircd12.c +++ b/src/protocol/inspircd12.c @@ -980,10 +980,10 @@ void inspircd_cmd_pass(char *pass) } /* SERVER services-dev.chatspike.net password 0 :Description here */ -void inspircd_cmd_server(char *servname, int hop, char *descript) +void inspircd_cmd_server(char *servname, int hop, char *descript, char *sid) { send_cmd(NULL, "SERVER %s %s %d %s :%s", servname, currentpass, hop, - TS6SID, descript); + sid ? sid : TS6SID, descript); } /* PONG */ @@ -1336,7 +1336,7 @@ void inspircd_cmd_connect(int servernum) if (servernum == 3) { inspircd_cmd_pass(RemotePassword3); } - inspircd_cmd_server(ServerName, 0, ServerDesc); + inspircd_cmd_server(ServerName, 0, ServerDesc, TS6SID); me_server = new_server(NULL, ServerName, ServerDesc, SERVER_ISME, TS6SID); } @@ -2243,14 +2243,16 @@ int inspircd_flood_mode_check(char *value) void inspircd_cmd_jupe(char *jserver, char *who, char *reason) { char rbuf[256]; + char *sid; snprintf(rbuf, sizeof(rbuf), "Juped by %s%s%s", who, reason ? ": " : "", reason ? reason : ""); if (findserver(servlist, jserver)) inspircd_cmd_squit(jserver, rbuf); - inspircd_cmd_server(jserver, 1, rbuf); - new_server(me_server, jserver, rbuf, SERVER_JUPED, ts6_sid_retrieve()); + for (sid = ts6_sid_retrieve(); findserver_uid(servlist, sid); sid = ts6_sid_retrieve()); + inspircd_cmd_server(jserver, 1, rbuf, sid); + new_server(me_server, jserver, rbuf, SERVER_JUPED, sid); } /* GLOBOPS - to handle old WALLOPS */ |