diff options
| author | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-10-02 16:03:16 +0000 |
|---|---|---|
| committer | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-10-02 16:03:16 +0000 |
| commit | e5051e4aa5cfc9e80ac965a6a82e4cab8d17387c (patch) | |
| tree | 0ccaead6e96584ebc2376604e5ca5c34c11b12b1 /src/protocol/inspircd11.c | |
| parent | b7ed70140d6e755b49cdd3c4b9d85ec6abf30cd7 (diff) | |
Merge commit 'cbx/anopeng-uid' into anopeng-uid
Conflicts:
include/extern.h
include/services.h
src/protocol/bahamut.c
src/protocol/inspircd11.c
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1320 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/protocol/inspircd11.c')
| -rw-r--r-- | src/protocol/inspircd11.c | 113 |
1 files changed, 63 insertions, 50 deletions
diff --git a/src/protocol/inspircd11.c b/src/protocol/inspircd11.c index 904cc2459..41f5023a7 100644 --- a/src/protocol/inspircd11.c +++ b/src/protocol/inspircd11.c @@ -505,19 +505,14 @@ void moduleAddIRCDMsgs(void) { /* *INDENT-ON* */ -void inspircd_cmd_svsadmin(const char *server, int set) -{ - /* Not Supported by this IRCD */ -} - void InspIRCdProto::SendAkillDel(const char *user, const char *host) { send_cmd(s_OperServ, "GLINE %s@%s", user, host); } -void InspIRCdProto::cmd_topic(const char *whosets, const char *chan, const char *whosetit, const char *topic, time_t when) +void InspIRCdProto::SendTopic(BotInfo *whosets, const char *chan, const char *whosetit, const char *topic, time_t when) { - send_cmd(whosets, "FTOPIC %s %lu %s :%s", chan, static_cast<unsigned long>(when), whosetit, topic); + send_cmd(whosets->nick, "FTOPIC %s %lu %s :%s", chan, static_cast<unsigned long>(when), whosetit, topic); } /* CHGHOST */ @@ -577,11 +572,6 @@ void InspIRCdProto::SendMode(const char *source, const char *dest, const char *b send_cmd(source ? source : s_OperServ, "FMODE %s %u %s", dest, static_cast<unsigned>(c ? c->creation_time : time(NULL)), buf); } -int anope_event_version(const char *source, int ac, const char **av) -{ - return MOD_CONT; -} - int anope_event_idle(const char *source, int ac, const char **av) { if (ac == 1) { @@ -603,6 +593,27 @@ int anope_event_ftopic(const char *source, int ac, const char **av) return MOD_CONT; } +int anope_event_mode(const char *source, int ac, const char **av) +{ + if (ac < 2) + return MOD_CONT; + + if (*av[0] == '#' || *av[0] == '&') { + do_cmode(source, ac, av); + } else { + /* InspIRCd lets opers change another + users modes, we have to kludge this + as it slightly breaks RFC1459 + */ + if (!strcasecmp(source, av[0])) { + do_umode(source, ac, av); + } else { + do_umode(av[0], ac, av); + } + } + return MOD_CONT; +} + int anope_event_opertype(const char *source, int ac, const char **av) { /* opertype is equivalent to mode +o because servers @@ -916,28 +927,6 @@ int anope_event_quit(const char *source, int ac, const char **av) } -int anope_event_mode(const char *source, int ac, const char **av) -{ - if (ac < 2) - return MOD_CONT; - - if (*av[0] == '#' || *av[0] == '&') { - do_cmode(source, ac, av); - } else { - /* InspIRCd lets opers change another - users modes, we have to kludge this - as it slightly breaks RFC1459 - */ - if (!strcasecmp(source, av[0])) { - do_umode(source, ac, av); - } else { - do_umode(av[0], ac, av); - } - } - return MOD_CONT; -} - - int anope_event_kill(const char *source, int ac, const char **av) { if (ac != 2) @@ -1330,22 +1319,6 @@ void InspIRCdProto::SendEOB() send_cmd(NULL, "ENDBURST"); } - -int anope_event_rehash(const char *source, int ac, const char **av) -{ - return MOD_CONT; -} - -int anope_event_credits(const char *source, int ac, const char **av) -{ - return MOD_CONT; -} - -int anope_event_admin(const char *source, int ac, const char **av) -{ - return MOD_CONT; -} - int InspIRCdProto::IsFloodModeParamValid(const char *value) { char *dp, *end; @@ -1353,6 +1326,46 @@ int InspIRCdProto::IsFloodModeParamValid(const char *value) else return 0; } +/* *INDENT-OFF* */ +void moduleAddIRCDMsgs(void) { + Message *m; + + updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+a","-a"); + + m = createMessage("436", anope_event_436); addCoreMessage(IRCD,m); + m = createMessage("AWAY", anope_event_away); addCoreMessage(IRCD,m); + m = createMessage("JOIN", anope_event_join); addCoreMessage(IRCD,m); + m = createMessage("KICK", anope_event_kick); addCoreMessage(IRCD,m); + m = createMessage("KILL", anope_event_kill); addCoreMessage(IRCD,m); + m = createMessage("MODE", anope_event_mode); addCoreMessage(IRCD,m); + m = createMessage("MOTD", anope_event_motd); addCoreMessage(IRCD,m); + m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m); + m = createMessage("CAPAB", anope_event_capab); addCoreMessage(IRCD,m); + m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m); + m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m); + m = createMessage("PRIVMSG", anope_event_privmsg); addCoreMessage(IRCD,m); + m = createMessage("QUIT", anope_event_quit); addCoreMessage(IRCD,m); + m = createMessage("SERVER", anope_event_server); addCoreMessage(IRCD,m); + m = createMessage("SQUIT", anope_event_squit); addCoreMessage(IRCD,m); + m = createMessage("RSQUIT", anope_event_rsquit); addCoreMessage(IRCD,m); + m = createMessage("TOPIC", anope_event_topic); addCoreMessage(IRCD,m); + m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m); + m = createMessage("SVSMODE", anope_event_mode) ;addCoreMessage(IRCD,m); + m = createMessage("FHOST", anope_event_chghost); addCoreMessage(IRCD,m); + m = createMessage("CHGIDENT", anope_event_chgident); addCoreMessage(IRCD,m); + m = createMessage("FNAME", anope_event_chgname); addCoreMessage(IRCD,m); + m = createMessage("SETHOST", anope_event_sethost); addCoreMessage(IRCD,m); + m = createMessage("SETIDENT", anope_event_setident); addCoreMessage(IRCD,m); + m = createMessage("SETNAME", anope_event_setname); addCoreMessage(IRCD,m); + m = createMessage("FJOIN", anope_event_fjoin); addCoreMessage(IRCD,m); + m = createMessage("FMODE", anope_event_fmode); addCoreMessage(IRCD,m); + m = createMessage("FTOPIC", anope_event_ftopic); addCoreMessage(IRCD,m); + m = createMessage("OPERTYPE", anope_event_opertype); addCoreMessage(IRCD,m); + m = createMessage("IDLE", anope_event_idle); addCoreMessage(IRCD,m); +} + +/* *INDENT-ON* */ + /** * Now tell anope how to use us. **/ |
