diff options
Diffstat (limited to 'messages.c')
-rw-r--r-- | messages.c | 53 |
1 files changed, 51 insertions, 2 deletions
diff --git a/messages.c b/messages.c index 1a1da4d75..571bf6286 100644 --- a/messages.c +++ b/messages.c @@ -304,7 +304,7 @@ static int m_nick(char *source, int ac, char **av) set_umode(user, 1, &av[3]); #else #if defined(IRC_BAHAMUT) -#if defined(IRC_ULTIMATE3) +#if defined(IRC_ULTIMATE3) || defined(IRC_RAGE2) User *user = do_nick(source, av[0], av[4], av[5], av[6], av[9], strtoul(av[2], NULL, 10), strtoul(av[7], NULL, 0), @@ -382,6 +382,26 @@ static int m_client(char *source, int ac, char **av) /*************************************************************************/ +#ifdef IRC_RAGE2 + +static int m_snick(char *source, int ac, char **av) +{ + if (ac != 2) { + User *user = do_nick(source, av[0], av[3], av[4], av[8], av[10], + strtoul(av[1], NULL, 10), strtoul(av[7], NULL, + 0), + strtoul(av[5], NULL, 0), av[6]); + if (user) { + set_umode(user, 1, &av[9]); + } + } + return MOD_CONT; +} + +#endif + +/*************************************************************************/ + #ifdef IRC_BAHAMUT static int m_ns(char *source, int ac, char **av) @@ -663,6 +683,7 @@ static int m_server(char *source, int ac, char **av) } /*************************************************************************/ + #if defined(IRC_ULTIMATE3) static int m_sethost(char *source, int ac, char **av) @@ -687,6 +708,30 @@ static int m_sethost(char *source, int ac, char **av) /*************************************************************************/ +#ifdef IRC_RAGE2 + +static int m_vhost(char *source, int ac, char **av) +{ + User *u; + + if (ac != 2) + return MOD_CONT; + + u = finduser(av[0]); + if (!u) { + if (debug) + alog("user: VHOST for nonexistent user %s", av[0]); + return MOD_CONT; + } + + change_user_host(u, av[1]); + return MOD_CONT; +} + +#endif + +/*************************************************************************/ + #if defined(IRC_ULTIMATE) || defined(IRC_UNREAL) || defined(IRC_VIAGRA) static int m_chghost(char *source, int ac, char **av) @@ -806,7 +851,7 @@ static int m_setname(char *source, int ac, char **av) /*************************************************************************/ -#if defined(IRC_BAHAMUT) || defined(IRC_HYBRID) || defined(IRC_PTLINK) +#if defined(IRC_BAHAMUT) || defined(IRC_HYBRID) || defined(IRC_PTLINK) || defined(IRC_RAGE2) static int m_sjoin(char *source, int ac, char **av) { @@ -1181,6 +1226,10 @@ void moduleAddMsgs(void) { m = createMessage("CLIENT", m_client); addCoreMessage(IRCD,m); m = createMessage("SMODE", NULL); addCoreMessage(IRCD,m); #endif +#ifdef IRC_RAGE2 + m = createMessage("SNICK", m_snick); addCoreMessage(IRCD,m); + m = createMessage("VHOST", m_vhost); addCoreMessage(IRCD,m); +#endif } /* *INDENT-ON* */ |