diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/bots.h | 5 | ||||
-rw-r--r-- | include/extern.h | 18 | ||||
-rw-r--r-- | include/modules.h | 11 | ||||
-rw-r--r-- | include/operserv.h | 2 |
4 files changed, 18 insertions, 18 deletions
diff --git a/include/bots.h b/include/bots.h index b73b39879..8952005e7 100644 --- a/include/bots.h +++ b/include/bots.h @@ -11,8 +11,11 @@ #include "commands.h" class BotInfo; + typedef unordered_map_namespace::unordered_map<ci::string, BotInfo *, hash_compare_ci_string> botinfo_map; -extern CoreExport botinfo_map BotList; +typedef unordered_map_namespace::unordered_map<std::string, BotInfo *, hash_compare_std_string> botinfo_uid_map; +extern CoreExport botinfo_map BotListByNick; +extern CoreExport botinfo_uid_map BotListByUID; /** Flags settable on a bot */ diff --git a/include/extern.h b/include/extern.h index 1e88561e3..416e974e8 100644 --- a/include/extern.h +++ b/include/extern.h @@ -46,9 +46,8 @@ E BotInfo *OperServ; E void get_botserv_stats(long *nrec, long *memuse); E void bs_init(); -E void botserv(User *u, char *buf); -E void botmsgs(User *u, BotInfo *bi, char *buf); -E void botchanmsgs(User *u, ChannelInfo *ci, char *buf); +E void botserv(User *u, BotInfo *bi, const std::string &buf); +E void botchanmsgs(User *u, ChannelInfo *ci, const std::string &buf); E BotInfo *findbot(const char *nick); E BotInfo *findbot(const std::string &nick); E BotInfo *findbot(const ci::string &nick); @@ -115,7 +114,7 @@ E void get_chanserv_stats(long *nrec, long *memuse); E void reset_levels(ChannelInfo * ci); E void cs_init(); -E void chanserv(User * u, char *buf); +E void chanserv(User *u, const std::string &buf); E void expire_chans(); E void cs_remove_nick(const NickCore * nc); @@ -159,7 +158,7 @@ E int read_config(int reload); /* hostserv.c */ E void do_on_id(User *u); -E void hostserv(User *u, char *buf); +E void hostserv(User *u, const std::string &buf); E void HostServSyncVhosts(NickAlias *na); /**** encrypt.c ****/ @@ -254,7 +253,7 @@ E char *sstrdup(const char *s); /**** memoserv.c ****/ E void ms_init(); -E void memoserv(User * u, char *buf); +E void memoserv(User * u, const std::string &buf); E void rsend_notify(User *u, Memo *m, const char *chan); E void check_memos(User * u); E MemoInfo *getmemoinfo(const char *name, int *ischan, int *isforbid); @@ -267,7 +266,7 @@ E int m_nickcoll(const char *user); E int m_away(const char *source, const char *msg); E int m_kill(const std::string &nick, const char *msg); E int m_motd(const char *source); -E int m_privmsg(const char *source, const std::string &receiver, const char *msg); +E int m_privmsg(const std::string &source, const std::string &receiver, const std::string &message); E int m_stats(const char *source, int ac, const char **av); E int m_whois(const char *source, const char *who); E int m_time(const char *source, int ac, const char **av); @@ -358,7 +357,7 @@ E void change_core_display(NickCore * nc, const char *newdisplay); E int do_setmodes(User * u); E void ns_init(); -E void nickserv(User * u, char *buf); +E void nickserv(User * u, const std::string &buf); E int validate_user(User * u); E void expire_nicks(); E void expire_requests(); @@ -433,9 +432,6 @@ E void get_user_stats(long *nusers, long *memuse); E User *finduser(const char *nick); E User *finduser(const std::string &nick); E User *finduser(const ci::string &nick); -E User *find_byuid(const char *uid); -E User *find_byuid(const ci::string &uid); -E User *find_byuid(const std::string &uid); E Server *findserver_uid(Server * s, const char *name); E char *TS6SID; diff --git a/include/modules.h b/include/modules.h index 963e07a4c..0acd041f9 100644 --- a/include/modules.h +++ b/include/modules.h @@ -419,13 +419,14 @@ class CoreExport Module virtual void OnUserNickChange(User *u, const std::string &oldnick) { } /** Called immediatly when a user tries to run a command - * @param bi The bot the command is being run from * @param u The user - * @param cmd The command + * @param bi The bot the command is being run from + * @param command The command + * @param message The parameters used for the command * @param c The command class (if it exists) * @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it */ - virtual EventReturn OnPreCommandRun(BotInfo *bi, User *u, const ci::string &cmd, Command *c) { return EVENT_CONTINUE; } + virtual EventReturn OnPreCommandRun(User *u, BotInfo *bi, const ci::string &command, const ci::string &message, Command *c) { return EVENT_CONTINUE; } /** Called before a command is due to be executed. * @param u The user executing the command @@ -473,7 +474,7 @@ class CoreExport Module * @param ci The channel it's being used in * @param params The params */ - virtual void OnBotFantasy(char *command, User *u, ChannelInfo *ci, char *params) { } + virtual void OnBotFantasy(const std::string &command, User *u, ChannelInfo *ci, const std::string ¶ms) { } /** Called on fantasy command without access * @param command The command @@ -481,7 +482,7 @@ class CoreExport Module * @param ci The channel it's being used in * @param params The params */ - virtual void OnBotNoFantasyAccess(const char *command, User *u, ChannelInfo *ci, const char *params) { } + virtual void OnBotNoFantasyAccess(const std::string &command, User *u, ChannelInfo *ci, const std::string ¶ms) { } /** Called after a bot joins a channel * @param ci The channael diff --git a/include/operserv.h b/include/operserv.h index ff2149372..c9848779b 100644 --- a/include/operserv.h +++ b/include/operserv.h @@ -30,7 +30,7 @@ extern CoreExport bool CheckDefCon(int level, DefconLevel Level); extern CoreExport void AddDefCon(int level, DefconLevel Level); extern CoreExport void DelDefCon(int level, DefconLevel Level); -extern CoreExport void operserv(User *u, char *buf); +extern CoreExport void operserv(User *u, const std::string &message); extern CoreExport void os_init(); extern CoreExport void oper_global(char *nick, const char *fmt, ...); |