From 28dd48200686b58b2f01f2094dba3093297c5935 Mon Sep 17 00:00:00 2001 From: "rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Fri, 18 Mar 2005 19:03:45 +0000 Subject: BUILD : 1.7.8 (634) BUGS : 321 NOTES : Applied Trystans patch for shadow-ircd nick changing and vhosting - there are still issues with it tho. git-svn-id: svn://svn.anope.org/anope/trunk@634 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@482 5417fbe8-f217-4b02-8779-1006273d7864 --- src/shadowircd.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/shadowircd.c b/src/shadowircd.c index d9cd1c7d0..cb95db424 100644 --- a/src/shadowircd.c +++ b/src/shadowircd.c @@ -623,7 +623,7 @@ int anope_event_sjoin(char *source, int ac, char **av) int anope_event_nick(char *source, int ac, char **av) { Server *s; - User *user; + User *user, *u2; if (ac == 10) { s = findserver_uid(servlist, source); @@ -635,12 +635,33 @@ int anope_event_nick(char *source, int ac, char **av) anope_set_umode(user, 1, &av[3]); } } else { - do_nick(source, av[0], NULL, NULL, NULL, NULL, + u2 = find_byuid(source); + do_nick((u2 ? u2->nick : source), av[0], NULL, NULL, NULL, NULL, strtoul(av[1], NULL, 10), 0, 0, NULL, NULL); } return MOD_CONT; } + +int anope_event_chghost(char *source, int ac, char **av) +{ + User *u; + + if (ac != 2) + return MOD_CONT; + + u = find_byuid(av[0]); + if (!u) { + if (debug) { + alog("user: CHGHOST for nonexistent user %s", av[0]); + } + return MOD_CONT; + } + + change_user_host(u, av[1]); + return MOD_CONT; +} + int anope_event_topic(char *source, int ac, char **av) { User *u; @@ -777,10 +798,11 @@ void moduleAddIRCDMsgs(void) m = createMessage("ADMIN", anope_event_admin); addCoreMessage(IRCD,m); m = createMessage("ERROR", anope_event_error); addCoreMessage(IRCD,m); m = createMessage("421", anope_event_null); addCoreMessage(IRCD,m); - m = createMessage("ENCAP", anope_event_null); addCoreMessage(IRCD,m); + m = createMessage("ENCAP", anope_event_null); addCoreMessage(IRCD,m); m = createMessage("SID", anope_event_sid); addCoreMessage(IRCD,m); m = createMessage("EOB", anope_event_eos); addCoreMessage(IRCD,m); m = createMessage("TSSYNC", anope_event_null); addCoreMessage(IRCD,m); + m = createMessage("SVSCLOAK", anope_event_chghost); addCoreMessage(IRCD,m); } -- cgit