diff options
| author | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-09-30 18:45:11 +0000 |
|---|---|---|
| committer | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-09-30 18:45:11 +0000 |
| commit | 5587d9a543020f88ac05785921b719d87db98911 (patch) | |
| tree | c3ec59a4aa6b76af00d2f4e46529e2bf05fcffe4 /include | |
| parent | 914e0359e0225f84698990117b45f8218a788983 (diff) | |
Added cmd_privmsg() function to IRCDProtoNew class.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1225 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include')
| -rw-r--r-- | include/extern.h | 1 | ||||
| -rw-r--r-- | include/services.h | 42 |
2 files changed, 24 insertions, 19 deletions
diff --git a/include/extern.h b/include/extern.h index afcc65c18..95cd9e382 100644 --- a/include/extern.h +++ b/include/extern.h @@ -613,7 +613,6 @@ E void pmodule_cmd_375(void (*func) (const char *source)); E void pmodule_cmd_376(void (*func) (const char *source)); E void pmodule_cmd_notice(void (*func) (const char *source, const char *dest, const char *buf)); E void pmodule_cmd_notice2(void (*func) (const char *source, const char *dest, const char *msg)); -E void pmodule_cmd_privmsg(void (*func) (const char *source, const char *dest, const char *buf)); E void pmodule_cmd_serv_notice(void (*func) (const char *source, const char *dest, const char *msg)); E void pmodule_cmd_serv_privmsg(void (*func) (const char *source, const char *dest, const char *msg)); E void pmodule_cmd_bot_chan_mode(void (*func) (const char *nick, const char *chan)); diff --git a/include/services.h b/include/services.h index 5a87b3607..c868c6d5a 100644 --- a/include/services.h +++ b/include/services.h @@ -1061,7 +1061,6 @@ typedef struct ircd_proto_ { void (*ircd_cmd_376)(const char *source); void (*ircd_cmd_notice)(const char *source, const char *dest, const char *buf); void (*ircd_cmd_notice2)(const char *source, const char *dest, const char *msg); - void (*ircd_cmd_privmsg)(const char *source, const char *dest, const char *buf); void (*ircd_cmd_serv_notice)(const char *source, const char *dest, const char *msg); void (*ircd_cmd_serv_privmsg)(const char *source, const char *dest, const char *msg); void (*ircd_cmd_bot_chan_mode)(const char *nick, const char *chan); @@ -1116,23 +1115,6 @@ typedef struct ircd_proto_ { int (*ircd_flood_mode_check)(const char *value); } IRCDProto; -class IRCDProtoNew { - public: - virtual void cmd_svsnoop(const char *, int) { } - virtual void cmd_remove_akill(const char *, const char *) = 0; - virtual void cmd_topic(const char *whosets, const char *chan, const char *whosetit, const char *topic, time_t when) = 0; - virtual void cmd_vhost_off(User *) { } - virtual void cmd_akill(const char *, const char *, const char *, time_t, time_t, const char *) = 0; - virtual void cmd_svskill(const char *source, const char *user, const char *buf) = 0; - virtual void cmd_svsmode(User *u, int ac, const char **av) = 0; - virtual void cmd_nick(const char *, const char *, const char *) = 0; - virtual void cmd_guest_nick(const char *, const char *, const char *, const char *, const char *) { } - virtual void cmd_mode(const char *source, const char *dest, const char *buf) = 0; - virtual void cmd_bot_nick(const char *, const char *, const char *, const char *, const char *) = 0; - virtual void cmd_kick(const char *source, const char *chan, const char *user, const char *buf) = 0; - virtual void cmd_notice_ops(const char *, const char *dest, const char *buf) = 0; -}; - typedef struct ircd_modes_ { int user_invis; int user_oper; @@ -1305,8 +1287,32 @@ struct capabinfo_ { /*************************************************************************/ +class IRCDProtoNew; + #include "extern.h" +class IRCDProtoNew { + public: + virtual void cmd_svsnoop(const char *, int) { } + virtual void cmd_remove_akill(const char *, const char *) = 0; + virtual void cmd_topic(const char *whosets, const char *chan, const char *whosetit, const char *topic, time_t when) = 0; + virtual void cmd_vhost_off(User *) { } + virtual void cmd_akill(const char *, const char *, const char *, time_t, time_t, const char *) = 0; + virtual void cmd_svskill(const char *source, const char *user, const char *buf) = 0; + virtual void cmd_svsmode(User *u, int ac, const char **av) = 0; + virtual void cmd_nick(const char *, const char *, const char *) = 0; + virtual void cmd_guest_nick(const char *, const char *, const char *, const char *, const char *) { } + virtual void cmd_mode(const char *source, const char *dest, const char *buf) = 0; + virtual void cmd_bot_nick(const char *, const char *, const char *, const char *, const char *) = 0; + virtual void cmd_kick(const char *source, const char *chan, const char *user, const char *buf) = 0; + virtual void cmd_notice_ops(const char *, const char *dest, const char *buf) = 0; + virtual void cmd_privmsg(const char *source, const char *dest, const char *buf) + { + if (!buf || !dest) return; + send_cmd(source, "PRIVMSG %s :%s", dest, buf); + } +}; + /*************************************************************************/ #endif /* SERVICES_H */ |
