mirror of
https://github.com/anope/anope.git
synced 2026-07-04 04:03:12 +02:00
Fix some coding style issues.
This commit is contained in:
+2
-2
@@ -98,7 +98,7 @@ public:
|
||||
NickCore *GetAccount() const;
|
||||
|
||||
void Serialize(Serialize::Data &data) const override;
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &);
|
||||
|
||||
static const unsigned int MAX_DEPTH = 4;
|
||||
|
||||
@@ -107,7 +107,7 @@ public:
|
||||
* @param nc The account
|
||||
* @param next Next channel to check if any
|
||||
*/
|
||||
virtual bool Matches(const User *u, const NickCore *nc, ChannelInfo* &next) const;
|
||||
virtual bool Matches(const User *u, const NickCore *nc, ChannelInfo *&next) const;
|
||||
|
||||
/** Check if this access entry has the given privilege.
|
||||
* @param name The privilege name
|
||||
|
||||
+3
-3
@@ -56,7 +56,7 @@ public:
|
||||
~NickAlias();
|
||||
|
||||
void Serialize(Serialize::Data &data) const override;
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &);
|
||||
|
||||
/** Set a vhost for the user
|
||||
* @param ident The ident
|
||||
@@ -153,7 +153,7 @@ public:
|
||||
~NickCore();
|
||||
|
||||
void Serialize(Serialize::Data &data) const override;
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &);
|
||||
|
||||
/** Changes the display for this account
|
||||
* @param na The new display, must be grouped to this account.
|
||||
@@ -224,7 +224,7 @@ public:
|
||||
* @param nick The account name to find
|
||||
* @return The account, if it exists
|
||||
*/
|
||||
static NickCore* Find(const Anope::string &nick);
|
||||
static NickCore *Find(const Anope::string &nick);
|
||||
|
||||
void AddChannelReference(ChannelInfo *ci);
|
||||
void RemoveChannelReference(ChannelInfo *ci);
|
||||
|
||||
+9
-9
@@ -140,8 +140,8 @@ namespace Anope
|
||||
*/
|
||||
inline void push_back(char c) { return this->_string.push_back(c); }
|
||||
|
||||
inline string& append(const string &s) { this->_string.append(s.str()); return *this; }
|
||||
inline string& append(const char *s, size_t n) { this->_string.append(s, n); return *this; }
|
||||
inline string &append(const string &s) { this->_string.append(s.str()); return *this; }
|
||||
inline string &append(const char *s, size_t n) { this->_string.append(s, n); return *this; }
|
||||
|
||||
/**
|
||||
* Resizes the string content to n characters.
|
||||
@@ -159,21 +159,21 @@ namespace Anope
|
||||
* Trim leading and trailing white spaces from the string.
|
||||
*/
|
||||
|
||||
inline string& ltrim(const Anope::string &what = " \t\r\n")
|
||||
inline string <rim(const Anope::string &what = " \t\r\n")
|
||||
{
|
||||
while (!this->_string.empty() && what.find(this->_string[0]) != Anope::string::npos)
|
||||
this->_string.erase(this->_string.begin());
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline string& rtrim(const Anope::string &what = " \t\r\n")
|
||||
inline string &rtrim(const Anope::string &what = " \t\r\n")
|
||||
{
|
||||
while (!this->_string.empty() && what.find(this->_string[this->_string.length() - 1]) != Anope::string::npos)
|
||||
this->_string.erase(this->_string.length() - 1);
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline string& trim(const Anope::string &what = " \t\r\n")
|
||||
inline string &trim(const Anope::string &what = " \t\r\n")
|
||||
{
|
||||
this->ltrim(what);
|
||||
this->rtrim(what);
|
||||
@@ -210,9 +210,9 @@ namespace Anope
|
||||
inline size_type find_last_not_of(const string &_str, size_type pos = npos) const { return this->_string.find_last_not_of(_str._string, pos); }
|
||||
inline size_type find_last_not_of_ci(const string &_str, size_type pos = npos) const { return ci::string(this->_string.c_str()).find_last_not_of(ci::string(_str._string.c_str()), pos); }
|
||||
|
||||
inline int compare(size_t pos, size_t len, const string& str) const { return ci::string(this->_string.c_str()).compare(pos, len, ci::string(str.c_str())); }
|
||||
inline int compare(size_t pos, size_t len, const string& str, size_t subpos, size_type sublen = npos) const { return ci::string(this->_string.c_str()).compare(pos, len, ci::string(str.c_str()), subpos, sublen); }
|
||||
inline int compare(size_t pos, size_t len, const char* s, size_type n = npos) const { return ci::string(this->_string.c_str()).compare(pos, len, s, n); }
|
||||
inline int compare(size_t pos, size_t len, const string &str) const { return ci::string(this->_string.c_str()).compare(pos, len, ci::string(str.c_str())); }
|
||||
inline int compare(size_t pos, size_t len, const string &str, size_t subpos, size_type sublen = npos) const { return ci::string(this->_string.c_str()).compare(pos, len, ci::string(str.c_str()), subpos, sublen); }
|
||||
inline int compare(size_t pos, size_t len, const char *s, size_type n = npos) const { return ci::string(this->_string.c_str()).compare(pos, len, s, n); }
|
||||
|
||||
/**
|
||||
* Determine if string consists of only numbers.
|
||||
@@ -600,7 +600,7 @@ public:
|
||||
/** Gets every token from this stream
|
||||
* @param token Tokens are pushed back here
|
||||
*/
|
||||
template<typename T> void GetTokens(T& token)
|
||||
template<typename T> void GetTokens(T &token)
|
||||
{
|
||||
token.clear();
|
||||
Anope::string t;
|
||||
|
||||
+2
-2
@@ -103,14 +103,14 @@ public:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline T* operator->()
|
||||
inline T *operator->()
|
||||
{
|
||||
if (operator bool())
|
||||
return this->ref;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline T* operator*()
|
||||
inline T *operator*()
|
||||
{
|
||||
if (operator bool())
|
||||
return this->ref;
|
||||
|
||||
+3
-3
@@ -56,7 +56,7 @@ public:
|
||||
virtual ~BotInfo();
|
||||
|
||||
void Serialize(Serialize::Data &data) const;
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &);
|
||||
|
||||
void GenerateUID();
|
||||
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
* @param permission Permission required to execute the command, if any
|
||||
* @return The commandinfo for the newly created command
|
||||
*/
|
||||
CommandInfo& SetCommand(const Anope::string &cname, const Anope::string &sname, const Anope::string &permission = "");
|
||||
CommandInfo &SetCommand(const Anope::string &cname, const Anope::string &sname, const Anope::string &permission = "");
|
||||
|
||||
/** Get command info for a command
|
||||
* @param cname The command name
|
||||
@@ -131,5 +131,5 @@ public:
|
||||
* @param nick_only True to only look by nick, and not by UID
|
||||
* @return The bot, if it exists
|
||||
*/
|
||||
static BotInfo* Find(const Anope::string &nick, bool nick_only = false);
|
||||
static BotInfo *Find(const Anope::string &nick, bool nick_only = false);
|
||||
};
|
||||
|
||||
+2
-2
@@ -110,7 +110,7 @@ public:
|
||||
* @param status The status to give the user, if any
|
||||
* @return The UserContainer for the user
|
||||
*/
|
||||
ChanUserContainer* JoinUser(User *u, const ChannelStatus *status);
|
||||
ChanUserContainer *JoinUser(User *u, const ChannelStatus *status);
|
||||
|
||||
/** Remove a user internally from the channel
|
||||
* @param u The user
|
||||
@@ -302,7 +302,7 @@ public:
|
||||
* @param name The channel to find
|
||||
* @return The channel, if found
|
||||
*/
|
||||
static Channel* Find(const Anope::string &name);
|
||||
static Channel *Find(const Anope::string &name);
|
||||
|
||||
/** Finds or creates a channel
|
||||
* @param name The channel name
|
||||
|
||||
+2
-2
@@ -44,7 +44,7 @@ struct CoreExport CommandReply
|
||||
{
|
||||
virtual ~CommandReply() = default;
|
||||
virtual void SendMessage(BotInfo *source, const Anope::string &msg) = 0;
|
||||
virtual void SendMessage(CommandSource& source, const Anope::string &msg);
|
||||
virtual void SendMessage(CommandSource &source, const Anope::string &msg);
|
||||
};
|
||||
|
||||
/* The source for a command */
|
||||
@@ -182,5 +182,5 @@ public:
|
||||
* @param name If found, is set to the command name, eg REGISTER
|
||||
* @return true if the given command service exists
|
||||
*/
|
||||
static bool FindCommandFromService(const Anope::string &command_service, BotInfo* &bi, Anope::string &name);
|
||||
static bool FindCommandFromService(const Anope::string &command_service, BotInfo *&bi, Anope::string &name);
|
||||
};
|
||||
|
||||
+3
-3
@@ -42,8 +42,8 @@ namespace Configuration
|
||||
Block(const Anope::string &);
|
||||
const Anope::string &GetName() const;
|
||||
int CountBlock(const Anope::string &name) const;
|
||||
const Block* GetBlock(const Anope::string &name, int num = 0) const;
|
||||
Block* GetMutableBlock(const Anope::string &name, int num = 0);
|
||||
const Block *GetBlock(const Anope::string &name, int num = 0) const;
|
||||
Block *GetMutableBlock(const Anope::string &name, int num = 0);
|
||||
|
||||
template<typename T> T Get(const Anope::string &tag, const Anope::string &def = "") const
|
||||
{
|
||||
@@ -61,7 +61,7 @@ namespace Configuration
|
||||
const item_map &GetItems() const;
|
||||
};
|
||||
|
||||
template<> CoreExport const Anope::string Block::Get(const Anope::string &tag, const Anope::string& def) const;
|
||||
template<> CoreExport const Anope::string Block::Get(const Anope::string &tag, const Anope::string &def) const;
|
||||
template<> CoreExport time_t Block::Get(const Anope::string &tag, const Anope::string &def) const;
|
||||
template<> CoreExport bool Block::Get(const Anope::string &tag, const Anope::string &def) const;
|
||||
} // namespace Internal
|
||||
|
||||
+20
-20
@@ -41,12 +41,12 @@ public:
|
||||
|
||||
void UnsetExtensibles();
|
||||
|
||||
template<typename T> T* GetExt(const Anope::string &name) const;
|
||||
template<typename T> T *GetExt(const Anope::string &name) const;
|
||||
bool HasExt(const Anope::string &name) const;
|
||||
|
||||
template<typename T> T* Extend(const Anope::string &name, const T &what);
|
||||
template<typename T> T* Extend(const Anope::string &name);
|
||||
template<typename T> T* Require(const Anope::string &name);
|
||||
template<typename T> T *Extend(const Anope::string &name, const T &what);
|
||||
template<typename T> T *Extend(const Anope::string &name);
|
||||
template<typename T> T *Require(const Anope::string &name);
|
||||
template<typename T> void Shrink(const Anope::string &name);
|
||||
|
||||
static void ExtensibleSerialize(const Extensible *, const Serializable *, Serialize::Data &data);
|
||||
@@ -77,17 +77,17 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
T* Set(Extensible *obj, const T &value)
|
||||
T *Set(Extensible *obj, const T &value)
|
||||
{
|
||||
T* t = Set(obj);
|
||||
T *t = Set(obj);
|
||||
if (t)
|
||||
*t = value;
|
||||
return t;
|
||||
}
|
||||
|
||||
T* Set(Extensible *obj)
|
||||
T *Set(Extensible *obj)
|
||||
{
|
||||
T* t = Create(obj);
|
||||
T *t = Create(obj);
|
||||
Unset(obj);
|
||||
items[obj] = t;
|
||||
obj->extension_items.insert(this);
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
delete value;
|
||||
}
|
||||
|
||||
T* Get(const Extensible *obj) const
|
||||
T *Get(const Extensible *obj) const
|
||||
{
|
||||
std::map<Extensible *, void *>::const_iterator it = items.find(const_cast<Extensible *>(obj));
|
||||
if (it != items.end())
|
||||
@@ -115,9 +115,9 @@ public:
|
||||
return items.find(const_cast<Extensible *>(obj)) != items.end();
|
||||
}
|
||||
|
||||
T* Require(Extensible *obj)
|
||||
T *Require(Extensible *obj)
|
||||
{
|
||||
T* t = Get(obj);
|
||||
T *t = Get(obj);
|
||||
if (t)
|
||||
return t;
|
||||
|
||||
@@ -130,7 +130,7 @@ class ExtensibleItem
|
||||
: public BaseExtensibleItem<T>
|
||||
{
|
||||
protected:
|
||||
T* Create(Extensible *obj) override
|
||||
T *Create(Extensible *obj) override
|
||||
{
|
||||
return new T(obj);
|
||||
}
|
||||
@@ -143,7 +143,7 @@ class PrimitiveExtensibleItem
|
||||
: public BaseExtensibleItem<T>
|
||||
{
|
||||
protected:
|
||||
T* Create(Extensible *obj) override
|
||||
T *Create(Extensible *obj) override
|
||||
{
|
||||
return new T();
|
||||
}
|
||||
@@ -155,7 +155,7 @@ template<>
|
||||
class PrimitiveExtensibleItem<bool> : public BaseExtensibleItem<bool>
|
||||
{
|
||||
protected:
|
||||
bool* Create(Extensible *) override
|
||||
bool *Create(Extensible *) override
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
|
||||
void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const override
|
||||
{
|
||||
T* t = this->Get(e);
|
||||
T *t = this->Get(e);
|
||||
data[this->name] << *t;
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ struct ExtensibleRef final
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
T* Extensible::GetExt(const Anope::string &name) const
|
||||
T *Extensible::GetExt(const Anope::string &name) const
|
||||
{
|
||||
ExtensibleRef<T> ref(name);
|
||||
if (ref)
|
||||
@@ -227,16 +227,16 @@ T* Extensible::GetExt(const Anope::string &name) const
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T* Extensible::Extend(const Anope::string &name, const T &what)
|
||||
T *Extensible::Extend(const Anope::string &name, const T &what)
|
||||
{
|
||||
T* t = Extend<T>(name);
|
||||
T *t = Extend<T>(name);
|
||||
if (t)
|
||||
*t = what;
|
||||
return t;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T* Extensible::Extend(const Anope::string &name)
|
||||
T *Extensible::Extend(const Anope::string &name)
|
||||
{
|
||||
ExtensibleRef<T> ref(name);
|
||||
if (ref)
|
||||
@@ -247,7 +247,7 @@ T* Extensible::Extend(const Anope::string &name)
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T* Extensible::Require(const Anope::string &name)
|
||||
T *Extensible::Require(const Anope::string &name)
|
||||
{
|
||||
if (HasExt(name))
|
||||
return GetExt<T>(name);
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ public:
|
||||
~Memo();
|
||||
|
||||
void Serialize(Serialize::Data &data) const override;
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &);
|
||||
|
||||
Anope::string owner;
|
||||
/* When it was sent */
|
||||
|
||||
@@ -46,13 +46,13 @@ struct BadWords
|
||||
* @param type The type (SINGLE START END)
|
||||
* @return The badword
|
||||
*/
|
||||
virtual BadWord* AddBadWord(const Anope::string &word, BadWordType type) = 0;
|
||||
virtual BadWord *AddBadWord(const Anope::string &word, BadWordType type) = 0;
|
||||
|
||||
/** Get a badword structure by index
|
||||
* @param index The index
|
||||
* @return The badword
|
||||
*/
|
||||
virtual BadWord* GetBadWord(unsigned index) const = 0;
|
||||
virtual BadWord *GetBadWord(unsigned index) const = 0;
|
||||
|
||||
/** Get how many badwords are on this channel
|
||||
* @return The number of badwords in the vector
|
||||
|
||||
@@ -33,5 +33,5 @@ public:
|
||||
delete (*this)->at(i - 1);
|
||||
}
|
||||
|
||||
virtual EntryMsg* Create() = 0;
|
||||
virtual EntryMsg *Create() = 0;
|
||||
};
|
||||
|
||||
@@ -27,9 +27,9 @@ struct HTTPReply final
|
||||
std::vector<cookie> cookies;
|
||||
|
||||
HTTPReply() = default;
|
||||
HTTPReply& operator=(const HTTPReply &) = default;
|
||||
HTTPReply &operator=(const HTTPReply &) = default;
|
||||
|
||||
HTTPReply(const HTTPReply& other) : error(other.error), length(other.length)
|
||||
HTTPReply(const HTTPReply &other) : error(other.error), length(other.length)
|
||||
{
|
||||
content_type = other.content_type;
|
||||
headers = other.headers;
|
||||
@@ -169,7 +169,7 @@ public:
|
||||
|
||||
virtual bool RegisterPage(HTTPPage *page) = 0;
|
||||
virtual void UnregisterPage(HTTPPage *page) = 0;
|
||||
virtual HTTPPage* FindPage(const Anope::string &name) = 0;
|
||||
virtual HTTPPage *FindPage(const Anope::string &name) = 0;
|
||||
};
|
||||
|
||||
namespace HTTPUtils
|
||||
@@ -180,7 +180,7 @@ namespace HTTPUtils
|
||||
|
||||
for (unsigned i = 0; i < url.length(); ++i)
|
||||
{
|
||||
const char& c = url[i];
|
||||
const char &c = url[i];
|
||||
|
||||
if (c == '%' && i + 2 < url.length())
|
||||
{
|
||||
|
||||
@@ -78,5 +78,5 @@ class CertService
|
||||
public:
|
||||
CertService(Module *c) : Service(c, "CertService", "certs") { }
|
||||
|
||||
virtual NickCore* FindAccountFromCert(const Anope::string &cert) = 0;
|
||||
virtual NickCore *FindAccountFromCert(const Anope::string &cert) = 0;
|
||||
};
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
|
||||
virtual void RemoveForbid(ForbidData *d) = 0;
|
||||
|
||||
virtual ForbidData* CreateForbid() = 0;
|
||||
virtual ForbidData *CreateForbid() = 0;
|
||||
|
||||
virtual ForbidData *FindForbid(const Anope::string &mask, ForbidType type) = 0;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ struct Exception final
|
||||
|
||||
Exception() : Serializable("Exception") { }
|
||||
void Serialize(Serialize::Data &data) const override;
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data);
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data);
|
||||
};
|
||||
|
||||
class SessionService
|
||||
@@ -70,7 +70,7 @@ void Exception::Serialize(Serialize::Data &data) const
|
||||
data["expires"] << this->expires;
|
||||
}
|
||||
|
||||
Serializable* Exception::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
Serializable *Exception::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
if (!session_service)
|
||||
return NULL;
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace SASL
|
||||
|
||||
virtual Anope::string GetAgent() = 0;
|
||||
|
||||
virtual Session* GetSession(const Anope::string &uid) = 0;
|
||||
virtual Session *GetSession(const Anope::string &uid) = 0;
|
||||
|
||||
virtual void SendMessage(SASL::Session *session, const Anope::string &type, const Anope::string &data) = 0;
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace SASL
|
||||
public:
|
||||
Mechanism(Module *o, const Anope::string &sname) : Service(o, "SASL::Mechanism", sname) { }
|
||||
|
||||
virtual Session* CreateSession(const Anope::string &uid) { return new Session(this, uid); }
|
||||
virtual Session *CreateSession(const Anope::string &uid) { return new Session(this, uid); }
|
||||
|
||||
virtual void ProcessMessage(Session *session, const Message &) = 0;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace SQL
|
||||
Clear();
|
||||
}
|
||||
|
||||
std::iostream& operator[](const Anope::string &key) override
|
||||
std::iostream &operator[](const Anope::string &key) override
|
||||
{
|
||||
std::stringstream *&ss = data[key];
|
||||
if (!ss)
|
||||
@@ -107,7 +107,7 @@ namespace SQL
|
||||
Query() { }
|
||||
Query(const Anope::string &q) : query(q) { }
|
||||
|
||||
Query& operator=(const Anope::string &q)
|
||||
Query &operator=(const Anope::string &q)
|
||||
{
|
||||
this->query = q;
|
||||
this->parameters.clear();
|
||||
@@ -124,7 +124,7 @@ namespace SQL
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
template<typename T> void SetValue(const Anope::string &key, const T& value, bool escape = true)
|
||||
template<typename T> void SetValue(const Anope::string &key, const T &value, bool escape = true)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ public:
|
||||
Anope::string name;
|
||||
Anope::string id;
|
||||
std::deque<Anope::string> data;
|
||||
HTTPReply& r;
|
||||
HTTPReply &r;
|
||||
|
||||
XMLRPCRequest(HTTPReply &_r) : r(_r) { }
|
||||
inline void reply(const Anope::string &dname, const Anope::string &ddata) { this->replies.emplace(dname, ddata); }
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
AutoKick();
|
||||
~AutoKick();
|
||||
void Serialize(Serialize::Data &data) const override;
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &);
|
||||
};
|
||||
|
||||
/* It matters that Base is here before Extensible (it is inherited by Serializable)
|
||||
@@ -95,10 +95,10 @@ public:
|
||||
ChannelInfo(const ChannelInfo &ci);
|
||||
|
||||
~ChannelInfo();
|
||||
ChannelInfo& operator=(const ChannelInfo &) = default;
|
||||
ChannelInfo &operator=(const ChannelInfo &) = default;
|
||||
|
||||
void Serialize(Serialize::Data &data) const override;
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &);
|
||||
|
||||
/** Change the founder of the channel
|
||||
* @params nc The new founder
|
||||
@@ -169,7 +169,7 @@ public:
|
||||
* @param t The time the akick was added, defaults to now
|
||||
* @param lu The time the akick was last used, defaults to never
|
||||
*/
|
||||
AutoKick* AddAkick(const Anope::string &user, NickCore *akicknc, const Anope::string &reason, time_t t = Anope::CurTime, time_t lu = 0);
|
||||
AutoKick *AddAkick(const Anope::string &user, NickCore *akicknc, const Anope::string &reason, time_t t = Anope::CurTime, time_t lu = 0);
|
||||
|
||||
/** Add an akick entry to the channel by reason
|
||||
* @param user The user who added the akick
|
||||
@@ -178,13 +178,13 @@ public:
|
||||
* @param t The time the akick was added, defaults to now
|
||||
* @param lu The time the akick was last used, defaults to never
|
||||
*/
|
||||
AutoKick* AddAkick(const Anope::string &user, const Anope::string &mask, const Anope::string &reason, time_t t = Anope::CurTime, time_t lu = 0);
|
||||
AutoKick *AddAkick(const Anope::string &user, const Anope::string &mask, const Anope::string &reason, time_t t = Anope::CurTime, time_t lu = 0);
|
||||
|
||||
/** Get an entry from the channel akick list
|
||||
* @param index The index in the akick vector
|
||||
* @return The akick structure, or NULL if not found
|
||||
*/
|
||||
AutoKick* GetAkick(unsigned index) const;
|
||||
AutoKick *GetAkick(unsigned index) const;
|
||||
|
||||
/** Get the size of the akick vector for this channel
|
||||
* @return The akick vector size
|
||||
@@ -238,7 +238,7 @@ public:
|
||||
* @param name channel name to lookup
|
||||
* @return the ChannelInfo associated with the channel
|
||||
*/
|
||||
static ChannelInfo* Find(const Anope::string &name);
|
||||
static ChannelInfo *Find(const Anope::string &name);
|
||||
|
||||
void AddChannelReference(const Anope::string &what);
|
||||
void RemoveChannelReference(const Anope::string &what);
|
||||
|
||||
+10
-10
@@ -29,7 +29,7 @@ namespace Serialize
|
||||
|
||||
virtual ~Data() = default;
|
||||
|
||||
virtual std::iostream& operator[](const Anope::string &key) = 0;
|
||||
virtual std::iostream &operator[](const Anope::string &key) = 0;
|
||||
virtual std::set<Anope::string> KeySet() const { throw CoreException("Not supported"); }
|
||||
virtual size_t Hash() const { throw CoreException("Not supported"); }
|
||||
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
/** Get the type of serializable object this is
|
||||
* @return The serializable object type
|
||||
*/
|
||||
Serialize::Type* GetSerializableType() const { return this->s_type; }
|
||||
Serialize::Type *GetSerializableType() const { return this->s_type; }
|
||||
|
||||
virtual void Serialize(Serialize::Data &data) const = 0;
|
||||
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
class CoreExport Serialize::Type final
|
||||
: public Base
|
||||
{
|
||||
typedef Serializable* (*unserialize_func)(Serializable *obj, Serialize::Data &);
|
||||
typedef Serializable *(*unserialize_func)(Serializable *obj, Serialize::Data &);
|
||||
|
||||
static std::vector<Anope::string> TypeOrder;
|
||||
static std::map<Anope::string, Serialize::Type *> Types;
|
||||
@@ -168,7 +168,7 @@ public:
|
||||
*/
|
||||
void UpdateTimestamp();
|
||||
|
||||
Module* GetOwner() const { return this->owner; }
|
||||
Module *GetOwner() const { return this->owner; }
|
||||
|
||||
static Serialize::Type *Find(const Anope::string &name);
|
||||
|
||||
@@ -201,23 +201,23 @@ class Serialize::Checker
|
||||
public:
|
||||
Checker(const Anope::string &n) : name(n) { }
|
||||
|
||||
inline const T* operator->() const
|
||||
inline const T *operator->() const
|
||||
{
|
||||
this->Check();
|
||||
return &this->obj;
|
||||
}
|
||||
inline T* operator->()
|
||||
inline T *operator->()
|
||||
{
|
||||
this->Check();
|
||||
return &this->obj;
|
||||
}
|
||||
|
||||
inline const T& operator*() const
|
||||
inline const T &operator*() const
|
||||
{
|
||||
this->Check();
|
||||
return this->obj;
|
||||
}
|
||||
inline T& operator*()
|
||||
inline T &operator*()
|
||||
{
|
||||
this->Check();
|
||||
return this->obj;
|
||||
@@ -305,7 +305,7 @@ public:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline T* operator*() const
|
||||
inline T *operator*() const
|
||||
{
|
||||
if (!this->invalid)
|
||||
{
|
||||
@@ -318,7 +318,7 @@ public:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline T* operator->() const
|
||||
inline T *operator->() const
|
||||
{
|
||||
if (!this->invalid)
|
||||
{
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ namespace Servers
|
||||
* the only server whose uplink *is* Me that is not a juped server.
|
||||
* @return Our uplink, or NULL if not uplinked to anything
|
||||
*/
|
||||
extern CoreExport Server* GetUplink();
|
||||
extern CoreExport Server *GetUplink();
|
||||
|
||||
/* Server maps by name and id */
|
||||
extern CoreExport Anope::map<Server *> ByName;
|
||||
|
||||
+3
-3
@@ -116,7 +116,7 @@ protected:
|
||||
virtual ~User();
|
||||
|
||||
public:
|
||||
static User* OnIntroduce(const Anope::string &snick, const Anope::string &sident, const Anope::string &shost, const Anope::string &svhost, const Anope::string &sip, Server *sserver, const Anope::string &srealname, time_t ts, const Anope::string &smodes, const Anope::string &suid, NickCore *nc);
|
||||
static User *OnIntroduce(const Anope::string &snick, const Anope::string &sident, const Anope::string &shost, const Anope::string &svhost, const Anope::string &sip, Server *sserver, const Anope::string &srealname, time_t ts, const Anope::string &smodes, const Anope::string &suid, NickCore *nc);
|
||||
|
||||
/** Update the nickname of a user record accordingly, should be
|
||||
* called from ircd protocol.
|
||||
@@ -193,7 +193,7 @@ public:
|
||||
*/
|
||||
void SendMessage(BotInfo *source, const char *fmt, ...) ATTR_FORMAT(3, 4);
|
||||
void SendMessage(BotInfo *source, const Anope::string &msg) override;
|
||||
void SendMessage(CommandSource& source, const Anope::string &msg) override;
|
||||
void SendMessage(CommandSource &source, const Anope::string &msg) override;
|
||||
|
||||
/** Identify the user to a nick.
|
||||
* updates last_seen, logs the user in,
|
||||
@@ -377,7 +377,7 @@ public:
|
||||
* @param nick_only set to true to only look up by nick, not UID
|
||||
* @return the user, if they exist
|
||||
*/
|
||||
static User* Find(const Anope::string &name, bool nick_only = false);
|
||||
static User *Find(const Anope::string &name, bool nick_only = false);
|
||||
|
||||
/** Quits all users who are pending to be quit
|
||||
*/
|
||||
|
||||
+3
-3
@@ -45,7 +45,7 @@ public:
|
||||
bool IsRegex() const;
|
||||
|
||||
void Serialize(Serialize::Data &data) const override;
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data);
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data);
|
||||
};
|
||||
|
||||
/* Managers XLines. There is one XLineManager per type of XLine. */
|
||||
@@ -125,7 +125,7 @@ public:
|
||||
* @param index The index
|
||||
* @return The XLine, or NULL if the index is out of bounds
|
||||
*/
|
||||
XLine* GetEntry(unsigned index);
|
||||
XLine *GetEntry(unsigned index);
|
||||
|
||||
/** Clear the XLine vector
|
||||
* Note: This does not remove the XLines from the IRCd
|
||||
@@ -145,7 +145,7 @@ public:
|
||||
* @param mask The mask
|
||||
* @return The XLine the user matches, or NULL
|
||||
*/
|
||||
XLine* HasEntry(const Anope::string &mask);
|
||||
XLine *HasEntry(const Anope::string &mask);
|
||||
|
||||
/** Check a user against all of the xlines in this XLineManager
|
||||
* @param u The user
|
||||
|
||||
@@ -26,7 +26,7 @@ struct BadWordImpl final
|
||||
data.SetType("type", Serialize::Data::DT_INT); data["type"] << this->type;
|
||||
}
|
||||
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &);
|
||||
};
|
||||
|
||||
struct BadWordsImpl final
|
||||
@@ -40,7 +40,7 @@ struct BadWordsImpl final
|
||||
|
||||
~BadWordsImpl() override;
|
||||
|
||||
BadWord* AddBadWord(const Anope::string &word, BadWordType type) override
|
||||
BadWord *AddBadWord(const Anope::string &word, BadWordType type) override
|
||||
{
|
||||
auto *bw = new BadWordImpl();
|
||||
bw->chan = ci->name;
|
||||
@@ -54,7 +54,7 @@ struct BadWordsImpl final
|
||||
return bw;
|
||||
}
|
||||
|
||||
BadWord* GetBadWord(unsigned index) const override
|
||||
BadWord *GetBadWord(unsigned index) const override
|
||||
{
|
||||
if (this->badwords->empty() || index >= this->badwords->size())
|
||||
return NULL;
|
||||
@@ -117,7 +117,7 @@ BadWordImpl::~BadWordImpl()
|
||||
}
|
||||
}
|
||||
|
||||
Serializable* BadWordImpl::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
Serializable *BadWordImpl::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
Anope::string sci, sword;
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ public:
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override = 0;
|
||||
|
||||
protected:
|
||||
bool CheckArguments(CommandSource &source, const std::vector<Anope::string> ¶ms, ChannelInfo* &ci)
|
||||
bool CheckArguments(CommandSource &source, const std::vector<Anope::string> ¶ms, ChannelInfo *&ci)
|
||||
{
|
||||
const Anope::string &chan = params[0];
|
||||
const Anope::string &option = params[1];
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
return new AccessChanAccess(this);
|
||||
}
|
||||
};
|
||||
AccessAccessProvider* AccessAccessProvider::me;
|
||||
AccessAccessProvider *AccessAccessProvider::me;
|
||||
|
||||
class CommandCSAccess final
|
||||
: public Command
|
||||
|
||||
@@ -38,7 +38,7 @@ struct EntryMsgImpl final
|
||||
data.SetType("when", Serialize::Data::DT_INT); data["when"] << this->when;
|
||||
}
|
||||
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data);
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data);
|
||||
};
|
||||
|
||||
struct EntryMessageListImpl final
|
||||
@@ -46,7 +46,7 @@ struct EntryMessageListImpl final
|
||||
{
|
||||
EntryMessageListImpl(Extensible *) { }
|
||||
|
||||
EntryMsg* Create() override
|
||||
EntryMsg *Create() override
|
||||
{
|
||||
return new EntryMsgImpl();
|
||||
}
|
||||
@@ -68,7 +68,7 @@ EntryMsgImpl::~EntryMsgImpl()
|
||||
}
|
||||
|
||||
|
||||
Serializable* EntryMsgImpl::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
Serializable *EntryMsgImpl::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
Anope::string sci, screator, smessage;
|
||||
time_t swhen;
|
||||
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
return new FlagsChanAccess(this);
|
||||
}
|
||||
};
|
||||
FlagsAccessProvider* FlagsAccessProvider::ap;
|
||||
FlagsAccessProvider *FlagsAccessProvider::ap;
|
||||
|
||||
class CommandCSFlags final
|
||||
: public Command
|
||||
|
||||
@@ -47,7 +47,7 @@ struct LogSettingImpl final
|
||||
data.SetType("created", Serialize::Data::DT_INT); data["created"] << created;
|
||||
}
|
||||
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
Anope::string sci;
|
||||
data["ci"] >> sci;
|
||||
|
||||
@@ -32,7 +32,7 @@ struct ModeLockImpl final
|
||||
}
|
||||
|
||||
void Serialize(Serialize::Data &data) const override;
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data);
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data);
|
||||
};
|
||||
|
||||
struct ModeLocksImpl final
|
||||
@@ -213,7 +213,7 @@ void ModeLockImpl::Serialize(Serialize::Data &data) const
|
||||
data.SetType("created", Serialize::Data::DT_INT); data["created"] << this->created;
|
||||
}
|
||||
|
||||
Serializable* ModeLockImpl::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
Serializable *ModeLockImpl::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
Anope::string sci;
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ struct SeenInfo final
|
||||
data.SetType("last", Serialize::Data::DT_INT); data["last"] << last;
|
||||
}
|
||||
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
Anope::string snick;
|
||||
|
||||
@@ -66,7 +66,7 @@ struct SeenInfo final
|
||||
s = anope_dynamic_static_cast<SeenInfo *>(obj);
|
||||
else
|
||||
{
|
||||
SeenInfo* &info = database[snick];
|
||||
SeenInfo *&info = database[snick];
|
||||
if (!info)
|
||||
info = new SeenInfo();
|
||||
s = info;
|
||||
@@ -445,7 +445,7 @@ private:
|
||||
if (simple || !u->server->IsSynced())
|
||||
return;
|
||||
|
||||
SeenInfo* &info = database[nick];
|
||||
SeenInfo *&info = database[nick];
|
||||
if (!info)
|
||||
info = new SeenInfo();
|
||||
info->nick = nick;
|
||||
|
||||
@@ -21,7 +21,7 @@ static Anope::map<ExtensibleItem<CSMiscData> *> items;
|
||||
|
||||
static ExtensibleItem<CSMiscData> *GetItem(const Anope::string &name)
|
||||
{
|
||||
ExtensibleItem<CSMiscData>* &it = items[name];
|
||||
ExtensibleItem<CSMiscData> *&it = items[name];
|
||||
if (!it)
|
||||
try
|
||||
{
|
||||
@@ -51,7 +51,7 @@ struct CSMiscData final
|
||||
sdata["data"] << this->data;
|
||||
}
|
||||
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
Anope::string sci, sname, sdata;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ struct CSSuspendInfo final
|
||||
data["expires"] << expires;
|
||||
}
|
||||
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
Anope::string schan;
|
||||
data["chan"] >> schan;
|
||||
|
||||
@@ -22,7 +22,7 @@ public:
|
||||
Anope::string last;
|
||||
std::fstream *fs = nullptr;
|
||||
|
||||
std::iostream& operator[](const Anope::string &key) override
|
||||
std::iostream &operator[](const Anope::string &key) override
|
||||
{
|
||||
if (key != last)
|
||||
{
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
std::stringstream ss;
|
||||
bool read = false;
|
||||
|
||||
std::iostream& operator[](const Anope::string &key) override
|
||||
std::iostream &operator[](const Anope::string &key) override
|
||||
{
|
||||
if (!read)
|
||||
{
|
||||
|
||||
@@ -26,9 +26,9 @@ public:
|
||||
delete stream;
|
||||
}
|
||||
|
||||
std::iostream& operator[](const Anope::string &key) override
|
||||
std::iostream &operator[](const Anope::string &key) override
|
||||
{
|
||||
std::stringstream* &stream = data[key];
|
||||
std::stringstream *&stream = data[key];
|
||||
if (!stream)
|
||||
stream = new std::stringstream();
|
||||
return *stream;
|
||||
@@ -318,7 +318,7 @@ void ObjectLoader::OnResult(const Reply &r)
|
||||
data[key->bulk] << value->bulk;
|
||||
}
|
||||
|
||||
Serializable* &obj = st->objects[this->id];
|
||||
Serializable *&obj = st->objects[this->id];
|
||||
obj = st->Unserialize(obj, data);
|
||||
if (obj)
|
||||
{
|
||||
@@ -337,7 +337,7 @@ void IDInterface::OnResult(const Reply &r)
|
||||
return;
|
||||
}
|
||||
|
||||
Serializable* &obj = o->GetSerializableType()->objects[r.i];
|
||||
Serializable *&obj = o->GetSerializableType()->objects[r.i];
|
||||
if (obj)
|
||||
/* This shouldn't be possible */
|
||||
obj->id = 0;
|
||||
@@ -537,7 +537,7 @@ void SubscriptionListener::OnResult(const Reply &r)
|
||||
}
|
||||
else if (op == "del")
|
||||
{
|
||||
Serializable* &s = s_type->objects[obj_id];
|
||||
Serializable *&s = s_type->objects[obj_id];
|
||||
if (s == NULL)
|
||||
return;
|
||||
|
||||
@@ -587,7 +587,7 @@ void ModifiedObject::OnResult(const Reply &r)
|
||||
return;
|
||||
}
|
||||
|
||||
Serializable* &obj = st->objects[this->id];
|
||||
Serializable *&obj = st->objects[this->id];
|
||||
|
||||
/* Transaction start */
|
||||
me->redis->StartTransaction();
|
||||
|
||||
@@ -30,14 +30,14 @@ class EBCRYPT final
|
||||
return salt;
|
||||
}
|
||||
|
||||
Anope::string Generate(const Anope::string& data, const Anope::string& salt)
|
||||
Anope::string Generate(const Anope::string &data, const Anope::string &salt)
|
||||
{
|
||||
char hash[64];
|
||||
_crypt_blowfish_rn(data.c_str(), salt.c_str(), hash, sizeof(hash));
|
||||
return hash;
|
||||
}
|
||||
|
||||
bool Compare(const Anope::string& string, const Anope::string& hash)
|
||||
bool Compare(const Anope::string &string, const Anope::string &hash)
|
||||
{
|
||||
Anope::string ret = Generate(string, hash);
|
||||
if (ret.empty())
|
||||
|
||||
@@ -220,7 +220,7 @@ public:
|
||||
private:
|
||||
#ifdef _WIN32
|
||||
// Windows LDAP does not implement this so we need to do it.
|
||||
int ldap_initialize(LDAP** ldap, const char* url)
|
||||
int ldap_initialize(LDAP **ldap, const char *url)
|
||||
{
|
||||
URL_COMPONENTS urlComponents;
|
||||
memset(&urlComponents, 0, sizeof(urlComponents));
|
||||
@@ -508,7 +508,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
LDAP* GetConnection()
|
||||
LDAP *GetConnection()
|
||||
{
|
||||
return con;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ class SSLSocketIO final
|
||||
{
|
||||
public:
|
||||
gnutls_session_t sess = nullptr;
|
||||
GnuTLS::X509CertCredentials* mycreds;
|
||||
GnuTLS::X509CertCredentials *mycreds;
|
||||
|
||||
/** Constructor
|
||||
*/
|
||||
@@ -181,7 +181,7 @@ namespace GnuTLS
|
||||
throw ConfigException("Error loading private key: " + Anope::string(gnutls_strerror(ret)));
|
||||
}
|
||||
|
||||
gnutls_x509_privkey_t& get() { return key.key; }
|
||||
gnutls_x509_privkey_t &get() { return key.key; }
|
||||
};
|
||||
|
||||
class X509CertList final
|
||||
@@ -219,7 +219,7 @@ namespace GnuTLS
|
||||
gnutls_x509_crt_deinit(*i);
|
||||
}
|
||||
|
||||
gnutls_x509_crt_t* raw() { return &certs[0]; }
|
||||
gnutls_x509_crt_t *raw() { return &certs[0]; }
|
||||
unsigned int size() const { return certs.size(); }
|
||||
};
|
||||
|
||||
@@ -236,7 +236,7 @@ namespace GnuTLS
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int cert_callback(gnutls_session_t sess, const gnutls_datum_t* req_ca_rdn, int nreqs, const gnutls_pk_algorithm_t* sign_algos, int sign_algos_length, gnutls_retr2_st* st);
|
||||
static int cert_callback(gnutls_session_t sess, const gnutls_datum_t *req_ca_rdn, int nreqs, const gnutls_pk_algorithm_t *sign_algos, int sign_algos_length, gnutls_retr2_st *st);
|
||||
|
||||
public:
|
||||
X509CertList certs;
|
||||
@@ -628,7 +628,7 @@ SSLSocketIO::SSLSocketIO() : mycreds(me->cred)
|
||||
mycreds->incrref();
|
||||
}
|
||||
|
||||
int GnuTLS::X509CertCredentials::cert_callback(gnutls_session_t sess, const gnutls_datum_t* req_ca_rdn, int nreqs, const gnutls_pk_algorithm_t* sign_algos, int sign_algos_length, gnutls_retr2_st* st)
|
||||
int GnuTLS::X509CertCredentials::cert_callback(gnutls_session_t sess, const gnutls_datum_t *req_ca_rdn, int nreqs, const gnutls_pk_algorithm_t *sign_algos, int sign_algos_length, gnutls_retr2_st *st)
|
||||
{
|
||||
st->cert_type = GNUTLS_CRT_X509;
|
||||
st->key_type = GNUTLS_PRIVKEY_X509;
|
||||
|
||||
@@ -38,7 +38,7 @@ struct HostRequest final
|
||||
data.SetType("time", Serialize::Data::DT_INT); data["time"] << this->time;
|
||||
}
|
||||
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
Anope::string snick;
|
||||
data["nick"] >> snick;
|
||||
|
||||
+2
-2
@@ -313,7 +313,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
ClientSocket* OnAccept(int fd, const sockaddrs &addr) override
|
||||
ClientSocket *OnAccept(int fd, const sockaddrs &addr) override
|
||||
{
|
||||
auto *c = new MyHTTPClient(this, fd, addr);
|
||||
this->clients.emplace_back(c);
|
||||
@@ -330,7 +330,7 @@ public:
|
||||
this->pages.erase(page->GetURL());
|
||||
}
|
||||
|
||||
HTTPPage* FindPage(const Anope::string &pname) override
|
||||
HTTPPage *FindPage(const Anope::string &pname) override
|
||||
{
|
||||
if (this->pages.count(pname) == 0)
|
||||
return NULL;
|
||||
|
||||
@@ -50,7 +50,7 @@ struct AJoinEntry final
|
||||
sd["key"] << this->key;
|
||||
}
|
||||
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &sd)
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &sd)
|
||||
{
|
||||
Anope::string sowner;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ struct CertServiceImpl final
|
||||
{
|
||||
CertServiceImpl(Module *o) : CertService(o) { }
|
||||
|
||||
NickCore* FindAccountFromCert(const Anope::string &cert) override
|
||||
NickCore *FindAccountFromCert(const Anope::string &cert) override
|
||||
{
|
||||
Anope::hash_map<NickCore *>::iterator it = certmap.find(cert);
|
||||
if (it != certmap.end())
|
||||
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
Anope::string nick;
|
||||
if (params.empty())
|
||||
{
|
||||
NickCore* core = source.GetAccount();
|
||||
NickCore *core = source.GetAccount();
|
||||
if (core)
|
||||
nick = core->display;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ static Anope::map<ExtensibleItem<NSMiscData> *> items;
|
||||
|
||||
static ExtensibleItem<NSMiscData> *GetItem(const Anope::string &name)
|
||||
{
|
||||
ExtensibleItem<NSMiscData>* &it = items[name];
|
||||
ExtensibleItem<NSMiscData> *&it = items[name];
|
||||
if (!it)
|
||||
try
|
||||
{
|
||||
@@ -51,7 +51,7 @@ struct NSMiscData final
|
||||
sdata["data"] << this->data;
|
||||
}
|
||||
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
Anope::string snc, sname, sdata;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ struct NSSuspendInfo final
|
||||
data["expires"] << expires;
|
||||
}
|
||||
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
Anope::string snick;
|
||||
data["nick"] >> snick;
|
||||
|
||||
@@ -45,7 +45,7 @@ struct DNSZone final
|
||||
data["server" + stringify(count++)] << server;
|
||||
}
|
||||
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
DNSZone *zone;
|
||||
Anope::string zone_name;
|
||||
@@ -154,7 +154,7 @@ public:
|
||||
data["zone" + stringify(count++)] << zone;
|
||||
}
|
||||
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
DNSServer *req;
|
||||
Anope::string server_name;
|
||||
@@ -856,7 +856,7 @@ public:
|
||||
if (req.questions.empty())
|
||||
return;
|
||||
/* Currently we reply to any QR for A/AAAA */
|
||||
const DNS::Question& q = req.questions[0];
|
||||
const DNS::Question &q = req.questions[0];
|
||||
if (q.type != DNS::QUERY_A && q.type != DNS::QUERY_AAAA && q.type != DNS::QUERY_AXFR && q.type != DNS::QUERY_ANY)
|
||||
return;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ struct ForbidDataImpl final
|
||||
{
|
||||
ForbidDataImpl() : Serializable("ForbidData") { }
|
||||
void Serialize(Serialize::Data &data) const override;
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data);
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data);
|
||||
};
|
||||
|
||||
void ForbidDataImpl::Serialize(Serialize::Data &data) const
|
||||
@@ -33,7 +33,7 @@ void ForbidDataImpl::Serialize(Serialize::Data &data) const
|
||||
data["type"] << this->type;
|
||||
}
|
||||
|
||||
Serializable* ForbidDataImpl::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
Serializable *ForbidDataImpl::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
if (!forbid_service)
|
||||
return NULL;
|
||||
|
||||
@@ -19,7 +19,7 @@ struct IgnoreDataImpl final
|
||||
IgnoreDataImpl() : Serializable("IgnoreData") { }
|
||||
~IgnoreDataImpl() override;
|
||||
void Serialize(Serialize::Data &data) const override;
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data);
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data);
|
||||
};
|
||||
|
||||
IgnoreDataImpl::~IgnoreDataImpl()
|
||||
@@ -36,7 +36,7 @@ void IgnoreDataImpl::Serialize(Serialize::Data &data) const
|
||||
data["time"] << this->time;
|
||||
}
|
||||
|
||||
Serializable* IgnoreDataImpl::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
Serializable *IgnoreDataImpl::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
if (!ignore_service)
|
||||
return NULL;
|
||||
|
||||
@@ -75,7 +75,7 @@ struct MyNewsItem final
|
||||
data["time"] << this->time;
|
||||
}
|
||||
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
if (!news_service)
|
||||
return NULL;
|
||||
|
||||
@@ -23,7 +23,7 @@ struct MyOper final
|
||||
data["type"] << this->ot->GetName();
|
||||
}
|
||||
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
Anope::string stype, sname;
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
return this->Sessions.find(c);
|
||||
}
|
||||
|
||||
Session* &FindOrCreateSession(const cidr &ip)
|
||||
Session *&FindOrCreateSession(const cidr &ip)
|
||||
{
|
||||
return this->Sessions[ip];
|
||||
}
|
||||
@@ -632,7 +632,7 @@ public:
|
||||
if (!u_ip.valid())
|
||||
return;
|
||||
|
||||
Session* &session = this->ss.FindOrCreateSession(u_ip);
|
||||
Session *&session = this->ss.FindOrCreateSession(u_ip);
|
||||
|
||||
if (session)
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ struct Stats final
|
||||
data["maxusertime"] << MaxUserTime;
|
||||
}
|
||||
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
data["maxusercnt"] >> MaxUserCount;
|
||||
data["maxusertime"] >> MaxUserTime;
|
||||
@@ -160,7 +160,7 @@ private:
|
||||
return;
|
||||
}
|
||||
|
||||
template<typename T> void GetHashStats(const T& map, size_t& entries, size_t& buckets, size_t& max_chain)
|
||||
template<typename T> void GetHashStats(const T &map, size_t &entries, size_t &buckets, size_t &max_chain)
|
||||
{
|
||||
entries = map.size(), buckets = map.bucket_count(), max_chain = 0;
|
||||
for (size_t i = 0; i < buckets; ++i)
|
||||
|
||||
@@ -59,7 +59,7 @@ class CommandOSSXLineBase
|
||||
: public Command
|
||||
{
|
||||
private:
|
||||
virtual XLineManager* xlm() = 0;
|
||||
virtual XLineManager *xlm() = 0;
|
||||
|
||||
virtual void OnAdd(CommandSource &source, const std::vector<Anope::string> ¶ms) = 0;
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
IRCDProto::SendModeInternal(source, chan, modes, values);
|
||||
}
|
||||
|
||||
void SendModeInternal(const MessageSource &source, User* u, const Anope::string &modes, const std::vector<Anope::string> &values) override
|
||||
void SendModeInternal(const MessageSource &source, User *u, const Anope::string &modes, const std::vector<Anope::string> &values) override
|
||||
{
|
||||
auto params = values;
|
||||
params.insert(params.begin(), { u->nick, stringify(u->timestamp), modes });
|
||||
|
||||
@@ -200,7 +200,7 @@ public:
|
||||
Uplink::Send("EOB");
|
||||
}
|
||||
|
||||
void SendModeInternal(const MessageSource &source, User* u, const Anope::string &modes, const std::vector<Anope::string> &values) override
|
||||
void SendModeInternal(const MessageSource &source, User *u, const Anope::string &modes, const std::vector<Anope::string> &values) override
|
||||
{
|
||||
auto params = values;
|
||||
params.insert(params.begin(), { u->GetUID(), stringify(u->timestamp), modes });
|
||||
|
||||
@@ -918,7 +918,7 @@ struct IRCDMessageCapab final
|
||||
Anope::string type;
|
||||
};
|
||||
|
||||
static bool ParseMode(const Anope::string& token, ModeInfo& mode)
|
||||
static bool ParseMode(const Anope::string &token, ModeInfo &mode)
|
||||
{
|
||||
// list:ban=b param-set:limit=l param:key=k prefix:30000:op=@o simple:noextmsg=n
|
||||
// A C A C A C A B C A C
|
||||
@@ -1549,7 +1549,7 @@ public:
|
||||
if (params[1].equals_cs("modules") && !params[2].empty())
|
||||
{
|
||||
// only interested when it comes from our uplink
|
||||
Server* server = source.GetServer();
|
||||
Server *server = source.GetServer();
|
||||
if (!server || server->GetUplink() != Me)
|
||||
return;
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
Uplink::Send("UID", u->nick, 1, u->timestamp, "+" + u->GetModes(), u->GetIdent(), u->host, "255.255.255.255", u->GetUID(), 0, u->host, u->realname);
|
||||
}
|
||||
|
||||
void SendModeInternal(const MessageSource &source, User* u, const Anope::string &modes, const std::vector<Anope::string> &values) override
|
||||
void SendModeInternal(const MessageSource &source, User *u, const Anope::string &modes, const std::vector<Anope::string> &values) override
|
||||
{
|
||||
auto params = values;
|
||||
params.insert(params.begin(), { "*", "SVSMODE", u->GetUID(), stringify(u->timestamp), modes });
|
||||
|
||||
@@ -24,7 +24,7 @@ public:
|
||||
{
|
||||
regex.assign(expr.str(), type | std::regex::optimize);
|
||||
}
|
||||
catch (const std::regex_error& error)
|
||||
catch (const std::regex_error &error)
|
||||
{
|
||||
throw RegexException("Error in regex " + expr + ": " + error.what());
|
||||
}
|
||||
|
||||
+3
-3
@@ -93,7 +93,7 @@ public:
|
||||
throw ModuleException("No CertFP");
|
||||
}
|
||||
|
||||
Session* CreateSession(const Anope::string &uid) override
|
||||
Session *CreateSession(const Anope::string &uid) override
|
||||
{
|
||||
return new Session(this, uid);
|
||||
}
|
||||
@@ -206,7 +206,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
Session* session = GetSession(m.source);
|
||||
Session *session = GetSession(m.source);
|
||||
|
||||
if (m.type == "S")
|
||||
{
|
||||
@@ -267,7 +267,7 @@ public:
|
||||
return agent;
|
||||
}
|
||||
|
||||
Session* GetSession(const Anope::string &uid) override
|
||||
Session *GetSession(const Anope::string &uid) override
|
||||
{
|
||||
std::map<Anope::string, Session *>::iterator it = sessions.find(uid);
|
||||
if (it != sessions.end())
|
||||
|
||||
@@ -17,7 +17,7 @@ public:
|
||||
struct Replacements final
|
||||
: std::multimap<Anope::string, Anope::string>
|
||||
{
|
||||
Anope::string& operator[](const Anope::string &key)
|
||||
Anope::string &operator[](const Anope::string &key)
|
||||
{
|
||||
return emplace(key, "")->second;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class XMLRPCIdentifyRequest final
|
||||
Reference<XMLRPCServiceInterface> xinterface;
|
||||
|
||||
public:
|
||||
XMLRPCIdentifyRequest(Module *m, XMLRPCRequest& req, HTTPClient *c, XMLRPCServiceInterface* iface, const Anope::string &acc, const Anope::string &pass) : IdentifyRequest(m, acc, pass), request(req), repl(request.r), client(c), xinterface(iface) { }
|
||||
XMLRPCIdentifyRequest(Module *m, XMLRPCRequest &req, HTTPClient *c, XMLRPCServiceInterface *iface, const Anope::string &acc, const Anope::string &pass) : IdentifyRequest(m, acc, pass), request(req), repl(request.r), client(c), xinterface(iface) { }
|
||||
|
||||
void OnSuccess() override
|
||||
{
|
||||
|
||||
+2
-2
@@ -170,7 +170,7 @@ void ChanAccess::Serialize(Serialize::Data &data) const
|
||||
data["data"] << this->AccessSerialize();
|
||||
}
|
||||
|
||||
Serializable* ChanAccess::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
Serializable *ChanAccess::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
Anope::string provider, chan;
|
||||
|
||||
@@ -205,7 +205,7 @@ Serializable* ChanAccess::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
return access;
|
||||
}
|
||||
|
||||
bool ChanAccess::Matches(const User *u, const NickCore *acc, ChannelInfo* &next) const
|
||||
bool ChanAccess::Matches(const User *u, const NickCore *acc, ChannelInfo *&next) const
|
||||
{
|
||||
next = NULL;
|
||||
|
||||
|
||||
+3
-3
@@ -85,7 +85,7 @@ void BotInfo::Serialize(Serialize::Data &data) const
|
||||
Extensible::ExtensibleSerialize(this, this, data);
|
||||
}
|
||||
|
||||
Serializable* BotInfo::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
Serializable *BotInfo::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
Anope::string nick, user, host, realname, flags;
|
||||
|
||||
@@ -237,7 +237,7 @@ void BotInfo::OnMessage(User *u, const Anope::string &message, const Anope::map<
|
||||
Command::Run(source, message);
|
||||
}
|
||||
|
||||
CommandInfo& BotInfo::SetCommand(const Anope::string &cname, const Anope::string &sname, const Anope::string &permission)
|
||||
CommandInfo &BotInfo::SetCommand(const Anope::string &cname, const Anope::string &sname, const Anope::string &permission)
|
||||
{
|
||||
CommandInfo ci;
|
||||
ci.name = sname;
|
||||
@@ -254,7 +254,7 @@ CommandInfo *BotInfo::GetCommand(const Anope::string &cname)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
BotInfo* BotInfo::Find(const Anope::string &nick, bool nick_only)
|
||||
BotInfo *BotInfo::Find(const Anope::string &nick, bool nick_only)
|
||||
{
|
||||
if (!nick_only && IRCD != NULL && IRCD->RequiresID)
|
||||
{
|
||||
|
||||
+4
-4
@@ -137,7 +137,7 @@ bool Channel::CheckDelete()
|
||||
return MOD_RESULT != EVENT_STOP && this->users.empty();
|
||||
}
|
||||
|
||||
ChanUserContainer* Channel::JoinUser(User *user, const ChannelStatus *status)
|
||||
ChanUserContainer *Channel::JoinUser(User *user, const ChannelStatus *status)
|
||||
{
|
||||
if (user->server && user->server->IsSynced())
|
||||
Log(user, this, "join");
|
||||
@@ -934,7 +934,7 @@ bool Channel::CheckKick(User *user)
|
||||
return true;
|
||||
}
|
||||
|
||||
BotInfo* Channel::WhoSends() const
|
||||
BotInfo *Channel::WhoSends() const
|
||||
{
|
||||
if (ci)
|
||||
return ci->WhoSends();
|
||||
@@ -949,7 +949,7 @@ BotInfo* Channel::WhoSends() const
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Channel* Channel::Find(const Anope::string &name)
|
||||
Channel *Channel::Find(const Anope::string &name)
|
||||
{
|
||||
channel_map::const_iterator it = ChannelList.find(name);
|
||||
|
||||
@@ -960,7 +960,7 @@ Channel* Channel::Find(const Anope::string &name)
|
||||
|
||||
Channel *Channel::FindOrCreate(const Anope::string &name, bool &created, time_t ts)
|
||||
{
|
||||
Channel* &chan = ChannelList[name];
|
||||
Channel *&chan = ChannelList[name];
|
||||
created = chan == NULL;
|
||||
if (!chan)
|
||||
chan = new Channel(name, ts);
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@
|
||||
#include "regchannel.h"
|
||||
#include "channels.h"
|
||||
|
||||
void CommandReply::SendMessage(CommandSource& source, const Anope::string &msg)
|
||||
void CommandReply::SendMessage(CommandSource &source, const Anope::string &msg)
|
||||
{
|
||||
SendMessage(source.service, msg);
|
||||
}
|
||||
@@ -294,7 +294,7 @@ void Command::Run(CommandSource &source, const Anope::string &cmdname, const Com
|
||||
FOREACH_MOD(OnPostCommand, (source, this, params));
|
||||
}
|
||||
|
||||
bool Command::FindCommandFromService(const Anope::string &command_service, BotInfo* &bot, Anope::string &name)
|
||||
bool Command::FindCommandFromService(const Anope::string &command_service, BotInfo *&bot, Anope::string &name)
|
||||
{
|
||||
bot = NULL;
|
||||
|
||||
|
||||
+4
-4
@@ -40,7 +40,7 @@ int Block::CountBlock(const Anope::string &bname) const
|
||||
return blocks.count(bname);
|
||||
}
|
||||
|
||||
const Block* Block::GetBlock(const Anope::string &bname, int num) const
|
||||
const Block *Block::GetBlock(const Anope::string &bname, int num) const
|
||||
{
|
||||
std::pair<block_map::const_iterator, block_map::const_iterator> it = blocks.equal_range(bname);
|
||||
|
||||
@@ -50,7 +50,7 @@ const Block* Block::GetBlock(const Anope::string &bname, int num) const
|
||||
return &EmptyBlock;
|
||||
}
|
||||
|
||||
Block* Block::GetMutableBlock(const Anope::string &bname, int num)
|
||||
Block *Block::GetMutableBlock(const Anope::string &bname, int num)
|
||||
{
|
||||
std::pair<block_map::iterator, block_map::iterator> it = blocks.equal_range(bname);
|
||||
|
||||
@@ -71,7 +71,7 @@ const Block::item_map &Block::GetItems() const
|
||||
return items;
|
||||
}
|
||||
|
||||
template<> const Anope::string Block::Get(const Anope::string &tag, const Anope::string& def) const
|
||||
template<> const Anope::string Block::Get(const Anope::string &tag, const Anope::string &def) const
|
||||
{
|
||||
Anope::map<Anope::string>::const_iterator it = items.find(tag);
|
||||
if (it != items.end())
|
||||
@@ -635,7 +635,7 @@ Block *Conf::GetModule(const Anope::string &mname)
|
||||
if (it != modules.end())
|
||||
return it->second;
|
||||
|
||||
Block* &block = modules[mname];
|
||||
Block *&block = modules[mname];
|
||||
|
||||
/* Search for the block */
|
||||
for (std::pair<block_map::iterator, block_map::iterator> iters = blocks.equal_range("module"); iters.first != iters.second; ++iters.first)
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ void Extensible::ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize
|
||||
}
|
||||
|
||||
template<>
|
||||
bool* Extensible::Extend(const Anope::string &name, const bool &what)
|
||||
bool *Extensible::Extend(const Anope::string &name, const bool &what)
|
||||
{
|
||||
ExtensibleRef<bool> ref(name);
|
||||
if (ref)
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ void Memo::Serialize(Serialize::Data &data) const
|
||||
data["receipt"] << this->receipt;
|
||||
}
|
||||
|
||||
Serializable* Memo::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
Serializable *Memo::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
Anope::string owner;
|
||||
|
||||
|
||||
+1
-1
@@ -228,7 +228,7 @@ void InfoFormatter::Process(std::vector<Anope::string> &buffer)
|
||||
}
|
||||
}
|
||||
|
||||
Anope::string& InfoFormatter::operator[](const Anope::string &key)
|
||||
Anope::string &InfoFormatter::operator[](const Anope::string &key)
|
||||
{
|
||||
Anope::string tkey = Language::Translate(this->nc, key.c_str());
|
||||
if (tkey.length() > this->longest)
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@
|
||||
|
||||
Serialize::Checker<nickalias_map> NickAliasList("NickAlias");
|
||||
|
||||
NickAlias::NickAlias(const Anope::string &nickname, NickCore* nickcore) : Serializable("NickAlias")
|
||||
NickAlias::NickAlias(const Anope::string &nickname, NickCore *nickcore) : Serializable("NickAlias")
|
||||
{
|
||||
if (nickname.empty())
|
||||
throw CoreException("Empty nick passed to NickAlias constructor");
|
||||
@@ -153,7 +153,7 @@ void NickAlias::Serialize(Serialize::Data &data) const
|
||||
Extensible::ExtensibleSerialize(this, this, data);
|
||||
}
|
||||
|
||||
Serializable* NickAlias::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
Serializable *NickAlias::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
Anope::string snc, snick;
|
||||
|
||||
|
||||
+3
-3
@@ -86,7 +86,7 @@ void NickCore::Serialize(Serialize::Data &data) const
|
||||
Extensible::ExtensibleSerialize(this, this, data);
|
||||
}
|
||||
|
||||
Serializable* NickCore::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
Serializable *NickCore::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
NickCore *nc;
|
||||
|
||||
@@ -257,7 +257,7 @@ void NickCore::AddChannelReference(ChannelInfo *ci)
|
||||
|
||||
void NickCore::RemoveChannelReference(ChannelInfo *ci)
|
||||
{
|
||||
int& i = (*this->chanaccess)[ci];
|
||||
int &i = (*this->chanaccess)[ci];
|
||||
if (--i <= 0)
|
||||
this->chanaccess->erase(ci);
|
||||
}
|
||||
@@ -269,7 +269,7 @@ void NickCore::GetChannelReferences(std::deque<ChannelInfo *> &queue)
|
||||
queue.push_back(ci);
|
||||
}
|
||||
|
||||
NickCore* NickCore::Find(const Anope::string &nick)
|
||||
NickCore *NickCore::Find(const Anope::string &nick)
|
||||
{
|
||||
nickcore_map::const_iterator it = NickCoreList->find(nick);
|
||||
if (it != NickCoreList->end())
|
||||
|
||||
+3
-3
@@ -51,7 +51,7 @@ void AutoKick::Serialize(Serialize::Data &data) const
|
||||
data.SetType("last_used", Serialize::Data::DT_INT); data["last_used"] << this->last_used;
|
||||
}
|
||||
|
||||
Serializable* AutoKick::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
Serializable *AutoKick::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
Anope::string sci, snc;
|
||||
|
||||
@@ -208,7 +208,7 @@ void ChannelInfo::Serialize(Serialize::Data &data) const
|
||||
Extensible::ExtensibleSerialize(this, this, data);
|
||||
}
|
||||
|
||||
Serializable* ChannelInfo::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
Serializable *ChannelInfo::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
Anope::string sname, sfounder, ssuccessor, slevels, sbi;
|
||||
|
||||
@@ -644,7 +644,7 @@ Anope::string ChannelInfo::GetIdealBan(User *u) const
|
||||
}
|
||||
}
|
||||
|
||||
ChannelInfo* ChannelInfo::Find(const Anope::string &name)
|
||||
ChannelInfo *ChannelInfo::Find(const Anope::string &name)
|
||||
{
|
||||
registered_channel_map::const_iterator it = RegisteredChannelList->find(name);
|
||||
if (it != RegisteredChannelList->end())
|
||||
|
||||
+1
-1
@@ -346,7 +346,7 @@ Server *Server::Find(const Anope::string &name, bool name_only)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Server* Servers::GetUplink()
|
||||
Server *Servers::GetUplink()
|
||||
{
|
||||
for (auto *link : Me->GetLinks())
|
||||
{
|
||||
|
||||
@@ -46,7 +46,7 @@ void Thread::Start()
|
||||
if (!this->handle)
|
||||
this->handle = std::make_unique<std::thread>(entry_point, this);
|
||||
}
|
||||
catch (const std::system_error& err)
|
||||
catch (const std::system_error &err)
|
||||
{
|
||||
this->flags[SF_DEAD] = true;
|
||||
throw CoreException("Unable to create thread: " + std::string(err.what()));
|
||||
|
||||
+1
-1
@@ -105,7 +105,7 @@ UplinkSocket::~UplinkSocket()
|
||||
{
|
||||
/* Don't use quitmsg here, it may contain information you don't want people to see */
|
||||
IRCD->SendQuit(u, "Shutting down");
|
||||
BotInfo* bi = BotInfo::Find(u->GetUID());
|
||||
BotInfo *bi = BotInfo::Find(u->GetUID());
|
||||
if (bi != NULL)
|
||||
bi->introduced = false;
|
||||
}
|
||||
|
||||
+5
-5
@@ -111,7 +111,7 @@ static void Collide(User *u, const Anope::string &id, const Anope::string &type)
|
||||
CollideKill(u, type);
|
||||
}
|
||||
|
||||
User* User::OnIntroduce(const Anope::string &snick, const Anope::string &sident, const Anope::string &shost, const Anope::string &svhost, const Anope::string &sip, Server *sserver, const Anope::string &srealname, time_t ts, const Anope::string &smodes, const Anope::string &suid, NickCore *nc)
|
||||
User *User::OnIntroduce(const Anope::string &snick, const Anope::string &sident, const Anope::string &shost, const Anope::string &svhost, const Anope::string &sip, Server *sserver, const Anope::string &srealname, time_t ts, const Anope::string &smodes, const Anope::string &suid, NickCore *nc)
|
||||
{
|
||||
// How IRCds handle collisions varies a lot, for safety well just always kill both sides
|
||||
// With properly set qlines, this can almost never happen anyway
|
||||
@@ -160,7 +160,7 @@ void User::ChangeNick(const Anope::string &newnick, time_t ts)
|
||||
|
||||
this->nick = newnick;
|
||||
|
||||
User* &other = UserListByNick[this->nick];
|
||||
User *&other = UserListByNick[this->nick];
|
||||
if (other)
|
||||
{
|
||||
CollideKill(this, "Nick collision");
|
||||
@@ -334,7 +334,7 @@ void User::SendMessage(BotInfo *source, const char *fmt, ...)
|
||||
|
||||
namespace
|
||||
{
|
||||
void SendMessageInternal(BotInfo *source, User* target, const Anope::string &msg, const Anope::map<Anope::string> &tags)
|
||||
void SendMessageInternal(BotInfo *source, User *target, const Anope::string &msg, const Anope::map<Anope::string> &tags)
|
||||
{
|
||||
const char *translated_message = Language::Translate(target, msg.c_str());
|
||||
|
||||
@@ -354,7 +354,7 @@ void User::SendMessage(BotInfo *source, const Anope::string &msg)
|
||||
SendMessageInternal(source, this, msg, {});
|
||||
}
|
||||
|
||||
void User::SendMessage(CommandSource& source, const Anope::string &msg)
|
||||
void User::SendMessage(CommandSource &source, const Anope::string &msg)
|
||||
{
|
||||
Anope::map<Anope::string> tags;
|
||||
if (!source.msgid.empty())
|
||||
@@ -861,7 +861,7 @@ bool User::ShouldPrivmsg() const
|
||||
return Config->UsePrivmsg && ((!nc && Config->DefPrivmsg) || (nc && nc->HasExt("MSG")));
|
||||
}
|
||||
|
||||
User* User::Find(const Anope::string &name, bool nick_only)
|
||||
User *User::Find(const Anope::string &name, bool nick_only)
|
||||
{
|
||||
if (!nick_only && IRCD && IRCD->RequiresID)
|
||||
{
|
||||
|
||||
+3
-3
@@ -163,7 +163,7 @@ void XLine::Serialize(Serialize::Data &data) const
|
||||
data["manager"] << this->manager->name;
|
||||
}
|
||||
|
||||
Serializable* XLine::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
Serializable *XLine::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
Anope::string smanager;
|
||||
|
||||
@@ -344,7 +344,7 @@ bool XLineManager::DelXLine(XLine *x)
|
||||
return false;
|
||||
}
|
||||
|
||||
XLine* XLineManager::GetEntry(unsigned index)
|
||||
XLine *XLineManager::GetEntry(unsigned index)
|
||||
{
|
||||
if (index >= this->xlines->size())
|
||||
return NULL;
|
||||
@@ -414,7 +414,7 @@ bool XLineManager::CanAdd(CommandSource &source, const Anope::string &mask, time
|
||||
return true;
|
||||
}
|
||||
|
||||
XLine* XLineManager::HasEntry(const Anope::string &mask)
|
||||
XLine *XLineManager::HasEntry(const Anope::string &mask)
|
||||
{
|
||||
std::multimap<Anope::string, XLine *, ci::less>::iterator it = XLinesByUID->find(mask);
|
||||
if (it != XLinesByUID->end())
|
||||
|
||||
Reference in New Issue
Block a user