From 8975b52cc3087db9504de7ad6e707234cb158a36 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 17 Jan 2011 15:46:53 -0500 Subject: Added ns_ajoin --- include/config.h | 2 ++ include/extensible.h | 8 ++++---- include/extern.h | 2 +- include/language.h | 9 +++++++++ 4 files changed, 16 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/config.h b/include/config.h index aef620b3c..4a5fc0d97 100644 --- a/include/config.h +++ b/include/config.h @@ -627,6 +627,8 @@ class CoreExport ServerConfig bool NSModeOnID; /* Add the users hostnask their access list when they register */ bool NSAddAccessOnReg; + /* Maximum number of channels on AJoin */ + unsigned AJoinMax; /* Default flags for newly registered channels */ Flags CSDefFlags; diff --git a/include/extensible.h b/include/extensible.h index 62413f131..2d7fb5509 100644 --- a/include/extensible.h +++ b/include/extensible.h @@ -28,7 +28,7 @@ template class ExtensibleItemRegular : public ExtensibleItemBase public: ExtensibleItemRegular(T item) : Item(item) { } virtual ~ExtensibleItemRegular() { } - T GetItem() const { return Item; } + T &GetItem() { return Item; } }; /** Class used to represent an extensible item that holds a pointer @@ -41,7 +41,7 @@ template class ExtensibleItemPointer : public ExtensibleItemBase public: ExtensibleItemPointer(T *item) : Item(item) { } virtual ~ExtensibleItemPointer() { delete Item; } - T *GetItem() const { return Item; } + T *GetItem() { return Item; } }; /** Class used to represent an extensible item that holds a pointer to an arrray @@ -54,7 +54,7 @@ template class ExtensibleItemPointerArray : public ExtensibleItemBas public: ExtensibleItemPointerArray(T *item) : Item(item) { } virtual ~ExtensibleItemPointerArray() { delete [] Item; } - T *GetItem() const { return Item; } + T *GetItem() { return Item; } }; class CoreExport Extensible : public Base @@ -108,7 +108,7 @@ class CoreExport Extensible : public Base */ void Extend(const Anope::string &key) { - this->Extend(key, new ExtensibleItemRegular(NULL)); + this->Extend(key, new ExtensibleItemPointer(NULL)); } /** Shrink an Extensible class. diff --git a/include/extern.h b/include/extern.h index b2e33dd83..025525186 100644 --- a/include/extern.h +++ b/include/extern.h @@ -343,7 +343,7 @@ E User *do_nick(const Anope::string &source, const Anope::string &nick, const An E void do_umode(const Anope::string &, const Anope::string &user, const Anope::string &modes); E void do_kill(User *user, const Anope::string &reason); -E bool is_excepted(ChannelInfo *ci, User *user); +E bool matches_list(Channel *c, User *user, ChannelModeName mode); E bool is_excepted_mask(ChannelInfo *ci, const Anope::string &mask); E Anope::string create_mask(User *u); diff --git a/include/language.h b/include/language.h index c61a870d9..a0d728772 100644 --- a/include/language.h +++ b/include/language.h @@ -179,6 +179,13 @@ enum LanguageString NICK_ACCESS_LIST_X, NICK_ACCESS_LIST_EMPTY, NICK_ACCESS_LIST_X_EMPTY, + NICK_AJOIN_SYNTAX, + NICK_AJOIN_LIST_EMPTY, + NICK_AJOIN_LIST_HEAD, + NICK_AJOIN_LIST_FULL, + NICK_AJOIN_ADDED, + NICK_AJOIN_NOTFOUND, + NICK_AJOIN_DELETED, NICK_STATUS_REPLY, NICK_INFO_SYNTAX, NICK_INFO_REALNAME, @@ -1176,6 +1183,7 @@ enum LanguageString NICK_HELP_CMD_FORBID, NICK_HELP_CMD_SUSPEND, NICK_HELP_CMD_UNSUSPEND, + NICK_HELP_CMD_AJOIN, NICK_HELP, NICK_HELP_FOOTER, NICK_HELP_EXPIRES, @@ -1246,6 +1254,7 @@ enum LanguageString NICK_HELP_CONFIRM, NICK_HELP_CONFIRM_OPER, NICK_HELP_RESEND, + NICK_HELP_AJOIN, NICK_SERVADMIN_HELP, NICK_SERVADMIN_HELP_LOGOUT, NICK_SERVADMIN_HELP_DROP, -- cgit