summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-02-26 15:27:01 +0000
committerSadie Powell <sadie@witchery.services>2024-02-26 15:34:17 +0000
commitc6cb4ba159a8916243d7ac5a5c4e8d13942baf99 (patch)
tree5183b6cb982dadb2b91987ff7b69486ea8d811df /src
parente341cac8d6565044f7390852afb40c5e388121df (diff)
Fix some coding style issues.
Diffstat (limited to 'src')
-rw-r--r--src/access.cpp4
-rw-r--r--src/bots.cpp6
-rw-r--r--src/channels.cpp8
-rw-r--r--src/command.cpp4
-rw-r--r--src/config.cpp8
-rw-r--r--src/extensible.cpp2
-rw-r--r--src/memos.cpp2
-rw-r--r--src/misc.cpp2
-rw-r--r--src/nickalias.cpp4
-rw-r--r--src/nickcore.cpp6
-rw-r--r--src/regchannel.cpp6
-rw-r--r--src/servers.cpp2
-rw-r--r--src/threadengine.cpp2
-rw-r--r--src/uplink.cpp2
-rw-r--r--src/users.cpp10
-rw-r--r--src/xline.cpp6
16 files changed, 37 insertions, 37 deletions
diff --git a/src/access.cpp b/src/access.cpp
index e430f7cb0..f5d4d784b 100644
--- a/src/access.cpp
+++ b/src/access.cpp
@@ -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;
diff --git a/src/bots.cpp b/src/bots.cpp
index 7417db6e7..ecccafe16 100644
--- a/src/bots.cpp
+++ b/src/bots.cpp
@@ -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)
{
diff --git a/src/channels.cpp b/src/channels.cpp
index 4b33eba8f..8a3248183 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -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);
diff --git a/src/command.cpp b/src/command.cpp
index dc24dac0b..c9372c40f 100644
--- a/src/command.cpp
+++ b/src/command.cpp
@@ -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;
diff --git a/src/config.cpp b/src/config.cpp
index bcba9de38..99720ef2e 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -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)
diff --git a/src/extensible.cpp b/src/extensible.cpp
index afcf61297..893781420 100644
--- a/src/extensible.cpp
+++ b/src/extensible.cpp
@@ -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)
diff --git a/src/memos.cpp b/src/memos.cpp
index f46c3b060..2e9f10db1 100644
--- a/src/memos.cpp
+++ b/src/memos.cpp
@@ -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;
diff --git a/src/misc.cpp b/src/misc.cpp
index 8ef034d6d..6d8c1ce9a 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -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)
diff --git a/src/nickalias.cpp b/src/nickalias.cpp
index 8445b8a5e..0b60a13f4 100644
--- a/src/nickalias.cpp
+++ b/src/nickalias.cpp
@@ -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;
diff --git a/src/nickcore.cpp b/src/nickcore.cpp
index f67cda426..b39bba4db 100644
--- a/src/nickcore.cpp
+++ b/src/nickcore.cpp
@@ -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())
diff --git a/src/regchannel.cpp b/src/regchannel.cpp
index 912a3e5b2..a3e04d864 100644
--- a/src/regchannel.cpp
+++ b/src/regchannel.cpp
@@ -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())
diff --git a/src/servers.cpp b/src/servers.cpp
index ef9276fa9..1435ee743 100644
--- a/src/servers.cpp
+++ b/src/servers.cpp
@@ -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())
{
diff --git a/src/threadengine.cpp b/src/threadengine.cpp
index a2af55e87..7e1e76693 100644
--- a/src/threadengine.cpp
+++ b/src/threadengine.cpp
@@ -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()));
diff --git a/src/uplink.cpp b/src/uplink.cpp
index a6343f7db..dece54ba8 100644
--- a/src/uplink.cpp
+++ b/src/uplink.cpp
@@ -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;
}
diff --git a/src/users.cpp b/src/users.cpp
index efe71f2a9..f2bf55e88 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -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)
{
diff --git a/src/xline.cpp b/src/xline.cpp
index 828446ed7..cbc26a36c 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -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())