summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-15 20:59:05 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-15 20:59:05 +0000
commitb57c7f4e466f72fdd2ac3deca42caa1ea7748338 (patch)
tree3cbfe66354be62ddd22d7614e9d6116f465e807b /src/modules
parent694e307c09334c21aaf1a6c3f0b7b6d95440dd3e (diff)
In the grand tradition of huge fucking commits:
- chanrec -> Channel - userrec -> User Enjoy. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8204 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_filter_pcre.cpp6
-rw-r--r--src/modules/extra/m_httpclienttest.cpp4
-rw-r--r--src/modules/extra/m_mysql.cpp2
-rw-r--r--src/modules/extra/m_pgsql.cpp2
-rw-r--r--src/modules/extra/m_sqlauth.cpp18
-rw-r--r--src/modules/extra/m_sqlite3.cpp2
-rw-r--r--src/modules/extra/m_sqllog.cpp14
-rw-r--r--src/modules/extra/m_sqloper.cpp14
-rw-r--r--src/modules/extra/m_sqlutils.cpp12
-rw-r--r--src/modules/extra/m_sqlutils.h12
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp18
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp18
-rw-r--r--src/modules/extra/m_ssl_oper_cert.cpp8
-rw-r--r--src/modules/extra/m_sslinfo.cpp4
-rw-r--r--src/modules/extra/m_ziplink.cpp2
-rw-r--r--src/modules/m_alias.cpp8
-rw-r--r--src/modules/m_alltime.cpp2
-rw-r--r--src/modules/m_antibear.cpp4
-rw-r--r--src/modules/m_antibottler.cpp2
-rw-r--r--src/modules/m_auditorium.cpp14
-rw-r--r--src/modules/m_banexception.cpp8
-rw-r--r--src/modules/m_banredirect.cpp14
-rw-r--r--src/modules/m_blockamsg.cpp8
-rw-r--r--src/modules/m_blockcaps.cpp10
-rw-r--r--src/modules/m_blockcolor.cpp8
-rw-r--r--src/modules/m_botmode.cpp4
-rw-r--r--src/modules/m_cban.cpp6
-rw-r--r--src/modules/m_censor.cpp16
-rw-r--r--src/modules/m_cgiirc.cpp24
-rw-r--r--src/modules/m_chancreate.cpp2
-rw-r--r--src/modules/m_chanfilter.cpp22
-rw-r--r--src/modules/m_chanprotect.cpp54
-rw-r--r--src/modules/m_check.cpp6
-rw-r--r--src/modules/m_chghost.cpp6
-rw-r--r--src/modules/m_chgident.cpp4
-rw-r--r--src/modules/m_chgname.cpp4
-rw-r--r--src/modules/m_cloaking.cpp4
-rw-r--r--src/modules/m_clones.cpp2
-rw-r--r--src/modules/m_close.cpp6
-rw-r--r--src/modules/m_commonchans.cpp8
-rw-r--r--src/modules/m_conn_join.cpp6
-rw-r--r--src/modules/m_conn_umodes.cpp4
-rw-r--r--src/modules/m_conn_waitpong.cpp14
-rw-r--r--src/modules/m_connflood.cpp8
-rw-r--r--src/modules/m_customtitle.cpp14
-rw-r--r--src/modules/m_cycle.cpp8
-rw-r--r--src/modules/m_dccallow.cpp34
-rw-r--r--src/modules/m_deaf.cpp16
-rw-r--r--src/modules/m_denychans.cpp4
-rw-r--r--src/modules/m_devoice.cpp4
-rw-r--r--src/modules/m_dnsbl.cpp12
-rw-r--r--src/modules/m_filter.cpp6
-rw-r--r--src/modules/m_filter.h36
-rw-r--r--src/modules/m_foobar.cpp8
-rw-r--r--src/modules/m_globalload.cpp6
-rw-r--r--src/modules/m_globops.cpp2
-rw-r--r--src/modules/m_helpop.cpp8
-rw-r--r--src/modules/m_hidechans.cpp4
-rw-r--r--src/modules/m_hideoper.cpp4
-rw-r--r--src/modules/m_hostchange.cpp4
-rw-r--r--src/modules/m_httpd_stats.cpp12
-rw-r--r--src/modules/m_ident.cpp16
-rw-r--r--src/modules/m_invisible.cpp22
-rw-r--r--src/modules/m_inviteexception.cpp8
-rw-r--r--src/modules/m_joinflood.cpp12
-rw-r--r--src/modules/m_jumpserver.cpp12
-rw-r--r--src/modules/m_kicknorejoin.cpp18
-rw-r--r--src/modules/m_knock.cpp6
-rw-r--r--src/modules/m_lockserv.cpp12
-rw-r--r--src/modules/m_messageflood.cpp32
-rw-r--r--src/modules/m_namesx.cpp6
-rw-r--r--src/modules/m_nickflood.cpp12
-rw-r--r--src/modules/m_nicklock.cpp16
-rw-r--r--src/modules/m_noctcp.cpp8
-rw-r--r--src/modules/m_noinvite.cpp4
-rw-r--r--src/modules/m_nokicks.cpp4
-rw-r--r--src/modules/m_nonicks.cpp6
-rw-r--r--src/modules/m_nonotice.cpp6
-rw-r--r--src/modules/m_oper_hash.cpp6
-rw-r--r--src/modules/m_operchans.cpp4
-rw-r--r--src/modules/m_operflood.cpp2
-rw-r--r--src/modules/m_operjoin.cpp6
-rw-r--r--src/modules/m_operlevels.cpp4
-rw-r--r--src/modules/m_operlog.cpp2
-rw-r--r--src/modules/m_opermodes.cpp4
-rw-r--r--src/modules/m_opermotd.cpp8
-rw-r--r--src/modules/m_override.cpp12
-rw-r--r--src/modules/m_randquote.cpp4
-rw-r--r--src/modules/m_redirect.cpp14
-rw-r--r--src/modules/m_regonlycreate.cpp2
-rw-r--r--src/modules/m_remove.cpp12
-rw-r--r--src/modules/m_restrictbanned.cpp12
-rw-r--r--src/modules/m_restrictchans.cpp4
-rw-r--r--src/modules/m_restrictmsg.cpp6
-rw-r--r--src/modules/m_safelist.cpp14
-rw-r--r--src/modules/m_sajoin.cpp8
-rw-r--r--src/modules/m_samode.cpp2
-rw-r--r--src/modules/m_sanick.cpp4
-rw-r--r--src/modules/m_sapart.cpp8
-rw-r--r--src/modules/m_saquit.cpp6
-rw-r--r--src/modules/m_securelist.cpp4
-rw-r--r--src/modules/m_seenicks.cpp2
-rw-r--r--src/modules/m_services.cpp24
-rw-r--r--src/modules/m_services_account.cpp28
-rw-r--r--src/modules/m_servprotect.cpp8
-rw-r--r--src/modules/m_sethost.cpp4
-rw-r--r--src/modules/m_setident.cpp2
-rw-r--r--src/modules/m_setidle.cpp2
-rw-r--r--src/modules/m_setname.cpp2
-rw-r--r--src/modules/m_showwhois.cpp4
-rw-r--r--src/modules/m_silence.cpp12
-rw-r--r--src/modules/m_silence_ext.cpp22
-rw-r--r--src/modules/m_spanningtree/main.cpp96
-rw-r--r--src/modules/m_spanningtree/main.h92
-rw-r--r--src/modules/m_spanningtree/override_admin.cpp2
-rw-r--r--src/modules/m_spanningtree/override_map.cpp4
-rw-r--r--src/modules/m_spanningtree/override_modules.cpp2
-rw-r--r--src/modules/m_spanningtree/override_motd.cpp2
-rw-r--r--src/modules/m_spanningtree/override_squit.cpp2
-rw-r--r--src/modules/m_spanningtree/override_stats.cpp4
-rw-r--r--src/modules/m_spanningtree/override_time.cpp2
-rw-r--r--src/modules/m_spanningtree/override_whois.cpp4
-rw-r--r--src/modules/m_spanningtree/postcommand.cpp2
-rw-r--r--src/modules/m_spanningtree/precommand.cpp2
-rw-r--r--src/modules/m_spanningtree/rconnect.cpp2
-rw-r--r--src/modules/m_spanningtree/rconnect.h2
-rw-r--r--src/modules/m_spanningtree/rsquit.cpp4
-rw-r--r--src/modules/m_spanningtree/rsquit.h4
-rw-r--r--src/modules/m_spanningtree/treeserver.cpp10
-rw-r--r--src/modules/m_spanningtree/treesocket.h4
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp34
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp82
-rw-r--r--src/modules/m_spanningtree/utils.cpp8
-rw-r--r--src/modules/m_spanningtree/utils.h2
-rw-r--r--src/modules/m_spy.cpp8
-rw-r--r--src/modules/m_ssl_dummy.cpp6
-rw-r--r--src/modules/m_sslmodes.cpp4
-rw-r--r--src/modules/m_stripcolor.cpp12
-rw-r--r--src/modules/m_svshold.cpp6
-rw-r--r--src/modules/m_swhois.cpp20
-rw-r--r--src/modules/m_taxonomy.cpp6
-rw-r--r--src/modules/m_testcommand.cpp2
-rw-r--r--src/modules/m_timedbans.cpp8
-rw-r--r--src/modules/m_tline.cpp2
-rw-r--r--src/modules/m_uhnames.cpp6
-rw-r--r--src/modules/m_uninvite.cpp6
-rw-r--r--src/modules/m_userip.cpp4
-rw-r--r--src/modules/m_vhost.cpp2
-rw-r--r--src/modules/m_watch.cpp40
-rw-r--r--src/modules/m_xmlsocket.cpp6
150 files changed, 779 insertions, 779 deletions
diff --git a/src/modules/extra/m_filter_pcre.cpp b/src/modules/extra/m_filter_pcre.cpp
index 6fe79a981..43a767a1c 100644
--- a/src/modules/extra/m_filter_pcre.cpp
+++ b/src/modules/extra/m_filter_pcre.cpp
@@ -61,7 +61,7 @@ class ModuleFilterPCRE : public FilterBase
{
}
- virtual FilterResult* FilterMatch(userrec* user, const std::string &text, int flags)
+ virtual FilterResult* FilterMatch(User* user, const std::string &text, int flags)
{
for (std::vector<PCREFilter>::iterator index = filters.begin(); index != filters.end(); index++)
{
@@ -131,7 +131,7 @@ class ModuleFilterPCRE : public FilterBase
}
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
ConfigReader MyConf(ServerInstance);
@@ -164,7 +164,7 @@ class ModuleFilterPCRE : public FilterBase
}
}
- virtual int OnStats(char symbol, userrec* user, string_list &results)
+ virtual int OnStats(char symbol, User* user, string_list &results)
{
if (symbol == 's')
{
diff --git a/src/modules/extra/m_httpclienttest.cpp b/src/modules/extra/m_httpclienttest.cpp
index 41a0b162e..e27f4dcf7 100644
--- a/src/modules/extra/m_httpclienttest.cpp
+++ b/src/modules/extra/m_httpclienttest.cpp
@@ -43,7 +43,7 @@ public:
return Version(1,0,0,1,VF_VENDOR,API_VERSION);
}
- virtual void OnUserJoin(userrec* user, chanrec* channel, bool &silent)
+ virtual void OnUserJoin(User* user, Channel* channel, bool &silent)
{
// method called when a user joins a channel
@@ -71,7 +71,7 @@ public:
return NULL;
}
- virtual void OnUserPart(userrec* user, chanrec* channel, const std::string &partmessage, bool &silent)
+ virtual void OnUserPart(User* user, Channel* channel, const std::string &partmessage, bool &silent)
{
}
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp
index a78e8c61b..53d852f72 100644
--- a/src/modules/extra/m_mysql.cpp
+++ b/src/modules/extra/m_mysql.cpp
@@ -796,7 +796,7 @@ class ModuleSQL : public Module
return NULL;
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
rehashing = true;
}
diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp
index 0bc7dfd1c..afa32d3d8 100644
--- a/src/modules/extra/m_pgsql.cpp
+++ b/src/modules/extra/m_pgsql.cpp
@@ -755,7 +755,7 @@ class ModulePgSQL : public Module
List[I_OnUnloadModule] = List[I_OnRequest] = List[I_OnRehash] = List[I_OnUserRegister] = List[I_OnCheckReady] = List[I_OnUserDisconnect] = 1;
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
ReadConf();
}
diff --git a/src/modules/extra/m_sqlauth.cpp b/src/modules/extra/m_sqlauth.cpp
index 01d5733af..8eb451f47 100644
--- a/src/modules/extra/m_sqlauth.cpp
+++ b/src/modules/extra/m_sqlauth.cpp
@@ -65,7 +65,7 @@ public:
List[I_OnUserDisconnect] = List[I_OnCheckReady] = List[I_OnRequest] = List[I_OnRehash] = List[I_OnUserRegister] = 1;
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
ConfigReader Conf(ServerInstance);
@@ -86,7 +86,7 @@ public:
}
}
- virtual int OnUserRegister(userrec* user)
+ virtual int OnUserRegister(User* user)
{
if ((!allowpattern.empty()) && (ServerInstance->MatchText(user->nick,allowpattern)))
{
@@ -96,20 +96,20 @@ public:
if (!CheckCredentials(user))
{
- userrec::QuitUser(ServerInstance,user,killreason);
+ User::QuitUser(ServerInstance,user,killreason);
return 1;
}
return 0;
}
- bool CheckCredentials(userrec* user)
+ bool CheckCredentials(User* user)
{
SQLrequest req = SQLreq(this, SQLprovider, databaseid, "SELECT ? FROM ? WHERE ? = '?' AND ? = ?'?')", userfield, usertable, userfield, user->nick, passfield, encryption, user->password);
if(req.Send())
{
/* When we get the query response from the service provider we will be given an ID to play with,
- * just an ID number which is unique to this query. We need a way of associating that ID with a userrec
+ * just an ID number which is unique to this query. We need a way of associating that ID with a User
* so we insert it into a map mapping the IDs to users.
* Thankfully m_sqlutils provides this, it will associate a ID with a user or channel, and if the user quits it removes the
* association. This means that if the user quits during a query we will just get a failed lookup from m_sqlutils - telling
@@ -133,7 +133,7 @@ public:
{
SQLresult* res = static_cast<SQLresult*>(request);
- userrec* user = GetAssocUser(this, SQLutils, res->id).S().user;
+ User* user = GetAssocUser(this, SQLutils, res->id).S().user;
UnAssociate(this, SQLutils, res->id).S();
if(user)
@@ -165,20 +165,20 @@ public:
if (!user->GetExt("sqlauthed"))
{
- userrec::QuitUser(ServerInstance,user,killreason);
+ User::QuitUser(ServerInstance,user,killreason);
}
return SQLSUCCESS;
}
return NULL;
}
- virtual void OnUserDisconnect(userrec* user)
+ virtual void OnUserDisconnect(User* user)
{
user->Shrink("sqlauthed");
user->Shrink("sqlauth_failed");
}
- virtual bool OnCheckReady(userrec* user)
+ virtual bool OnCheckReady(User* user)
{
return user->GetExt("sqlauthed");
}
diff --git a/src/modules/extra/m_sqlite3.cpp b/src/modules/extra/m_sqlite3.cpp
index f37e52324..9795e9f8b 100644
--- a/src/modules/extra/m_sqlite3.cpp
+++ b/src/modules/extra/m_sqlite3.cpp
@@ -610,7 +610,7 @@ class ModuleSQLite3 : public Module
}
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
ReadConf();
}
diff --git a/src/modules/extra/m_sqllog.cpp b/src/modules/extra/m_sqllog.cpp
index fc929b94f..6194e502d 100644
--- a/src/modules/extra/m_sqllog.cpp
+++ b/src/modules/extra/m_sqllog.cpp
@@ -220,7 +220,7 @@ class ModuleSQLLog : public Module
dbid = Conf.ReadValue("sqllog","dbid",0); // database id of a database configured in sql module
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
ReadConfig();
}
@@ -263,23 +263,23 @@ class ModuleSQLLog : public Module
}
}
- virtual void OnOper(userrec* user, const std::string &opertype)
+ virtual void OnOper(User* user, const std::string &opertype)
{
AddLogEntry(LT_OPER,user->nick,user->host,user->server);
}
- virtual void OnGlobalOper(userrec* user)
+ virtual void OnGlobalOper(User* user)
{
AddLogEntry(LT_OPER,user->nick,user->host,user->server);
}
- virtual int OnKill(userrec* source, userrec* dest, const std::string &reason)
+ virtual int OnKill(User* source, User* dest, const std::string &reason)
{
AddLogEntry(LT_KILL,dest->nick,dest->host,source->nick);
return 0;
}
- virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated, const std::string &original_line)
+ virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line)
{
if ((command == "GLINE" || command == "KLINE" || command == "ELINE" || command == "ZLINE") && validated)
{
@@ -288,12 +288,12 @@ class ModuleSQLLog : public Module
return 0;
}
- virtual void OnUserConnect(userrec* user)
+ virtual void OnUserConnect(User* user)
{
AddLogEntry(LT_CONNECT,user->nick,user->host,user->server);
}
- virtual void OnUserQuit(userrec* user, const std::string &reason, const std::string &oper_message)
+ virtual void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message)
{
AddLogEntry(LT_DISCONNECT,user->nick,user->host,user->server);
}
diff --git a/src/modules/extra/m_sqloper.cpp b/src/modules/extra/m_sqloper.cpp
index d1bece343..c697d6a9b 100644
--- a/src/modules/extra/m_sqloper.cpp
+++ b/src/modules/extra/m_sqloper.cpp
@@ -63,14 +63,14 @@ public:
List[I_OnRequest] = List[I_OnRehash] = List[I_OnPreCommand] = 1;
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
ConfigReader Conf(ServerInstance);
databaseid = Conf.ReadValue("sqloper", "dbid", 0); /* Database ID of a database configured for the service provider module */
}
- virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated, const std::string &original_line)
+ virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line)
{
if ((validated) && (command == "OPER"))
{
@@ -87,7 +87,7 @@ public:
return 0;
}
- bool LookupOper(userrec* user, const std::string &username, const std::string &password)
+ bool LookupOper(User* user, const std::string &username, const std::string &password)
{
Module* target;
@@ -109,7 +109,7 @@ public:
if (req.Send())
{
/* When we get the query response from the service provider we will be given an ID to play with,
- * just an ID number which is unique to this query. We need a way of associating that ID with a userrec
+ * just an ID number which is unique to this query. We need a way of associating that ID with a User
* so we insert it into a map mapping the IDs to users.
* Thankfully m_sqlutils provides this, it will associate a ID with a user or channel, and if the user quits it removes the
* association. This means that if the user quits during a query we will just get a failed lookup from m_sqlutils - telling
@@ -140,7 +140,7 @@ public:
{
SQLresult* res = static_cast<SQLresult*>(request);
- userrec* user = GetAssocUser(this, SQLutils, res->id).S().user;
+ User* user = GetAssocUser(this, SQLutils, res->id).S().user;
UnAssociate(this, SQLutils, res->id).S();
char* tried_user = NULL;
@@ -225,7 +225,7 @@ public:
return NULL;
}
- void LoginFail(userrec* user, const std::string &username, const std::string &pass)
+ void LoginFail(User* user, const std::string &username, const std::string &pass)
{
Command* oper_command = ServerInstance->Parser->GetHandler("OPER");
@@ -240,7 +240,7 @@ public:
}
}
- bool OperUser(userrec* user, const std::string &username, const std::string &password, const std::string &pattern, const std::string &type)
+ bool OperUser(User* user, const std::string &username, const std::string &password, const std::string &pattern, const std::string &type)
{
ConfigReader Conf(ServerInstance);
diff --git a/src/modules/extra/m_sqlutils.cpp b/src/modules/extra/m_sqlutils.cpp
index 2edf28263..b53186f71 100644
--- a/src/modules/extra/m_sqlutils.cpp
+++ b/src/modules/extra/m_sqlutils.cpp
@@ -23,8 +23,8 @@
/* $ModDesc: Provides some utilities to SQL client modules, such as mapping queries to users and channels */
/* $ModDep: m_sqlutils.h */
-typedef std::map<unsigned long, userrec*> IdUserMap;
-typedef std::map<unsigned long, chanrec*> IdChanMap;
+typedef std::map<unsigned long, User*> IdUserMap;
+typedef std::map<unsigned long, Channel*> IdChanMap;
typedef std::list<unsigned long> AssocIdList;
class ModuleSQLutils : public Module
@@ -105,7 +105,7 @@ public:
return SQLUTILSUCCESS;
}
- virtual void OnUserDisconnect(userrec* user)
+ virtual void OnUserDisconnect(User* user)
{
/* A user is disconnecting, first we need to check if they have a list of queries associated with them.
* Then, if they do, we need to erase each of them from our IdUserMap (iduser) so when the module that
@@ -125,7 +125,7 @@ public:
{
if(iter->second != user)
{
- ServerInstance->Log(DEBUG, "BUG: ID associated with user %s doesn't have the same userrec* associated with it in the map (erasing anyway)", user->nick);
+ ServerInstance->Log(DEBUG, "BUG: ID associated with user %s doesn't have the same User* associated with it in the map (erasing anyway)", user->nick);
}
iduser.erase(iter);
@@ -192,7 +192,7 @@ public:
}
}
- virtual void OnChannelDelete(chanrec* chan)
+ virtual void OnChannelDelete(Channel* chan)
{
/* A channel is being destroyed, first we need to check if it has a list of queries associated with it.
* Then, if it does, we need to erase each of them from our IdChanMap (idchan) so when the module that
@@ -212,7 +212,7 @@ public:
{
if(iter->second != chan)
{
- ServerInstance->Log(DEBUG, "BUG: ID associated with channel %s doesn't have the same chanrec* associated with it in the map (erasing anyway)", chan->name);
+ ServerInstance->Log(DEBUG, "BUG: ID associated with channel %s doesn't have the same Channel* associated with it in the map (erasing anyway)", chan->name);
}
idchan.erase(iter);
}
diff --git a/src/modules/extra/m_sqlutils.h b/src/modules/extra/m_sqlutils.h
index 92fbdf5c7..27433e254 100644
--- a/src/modules/extra/m_sqlutils.h
+++ b/src/modules/extra/m_sqlutils.h
@@ -33,9 +33,9 @@ public:
unsigned long id;
/** User
*/
- userrec* user;
+ User* user;
- AssociateUser(Module* s, Module* d, unsigned long i, userrec* u)
+ AssociateUser(Module* s, Module* d, unsigned long i, User* u)
: Request(s, d, SQLUTILAU), id(i), user(u)
{
}
@@ -57,9 +57,9 @@ public:
unsigned long id;
/** Channel
*/
- chanrec* chan;
+ Channel* chan;
- AssociateChan(Module* s, Module* d, unsigned long i, chanrec* u)
+ AssociateChan(Module* s, Module* d, unsigned long i, Channel* u)
: Request(s, d, SQLUTILAC), id(i), chan(u)
{
}
@@ -102,7 +102,7 @@ public:
unsigned long id;
/** The user
*/
- userrec* user;
+ User* user;
GetAssocUser(Module* s, Module* d, unsigned long i)
: Request(s, d, SQLUTILGU), id(i), user(NULL)
@@ -126,7 +126,7 @@ public:
unsigned long id;
/** The channel
*/
- chanrec* chan;
+ Channel* chan;
GetAssocChan(Module* s, Module* d, unsigned long i)
: Request(s, d, SQLUTILGC), id(i), chan(NULL)
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 4af425e0b..a7a52d910 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -111,7 +111,7 @@ class ModuleSSLGnuTLS : public Module
gnutls_certificate_set_dh_params(x509_cred, dh_params);
}
- virtual void OnRehash(userrec* user, const std::string &param)
+ virtual void OnRehash(User* user, const std::string &param)
{
if(param != "ssl")
return;
@@ -247,13 +247,13 @@ class ModuleSSLGnuTLS : public Module
{
if(target_type == TYPE_USER)
{
- userrec* user = (userrec*)item;
+ User* user = (User*)item;
if(user->GetExt("ssl", dummy) && isin(user->GetPort(), listenports))
{
// User is using SSL, they're a local user, and they're using one of *our* SSL ports.
// Potentially there could be multiple SSL modules loaded at once on different ports.
- userrec::QuitUser(ServerInstance, user, "SSL module unloading");
+ User::QuitUser(ServerInstance, user, "SSL module unloading");
}
if (user->GetExt("ssl_cert", dummy) && isin(user->GetPort(), listenports))
{
@@ -578,7 +578,7 @@ class ModuleSSLGnuTLS : public Module
}
// :kenny.chatspike.net 320 Om Epy|AFK :is a Secure Connection
- virtual void OnWhois(userrec* source, userrec* dest)
+ virtual void OnWhois(User* source, User* dest)
{
if (!clientactive)
return;
@@ -590,7 +590,7 @@ class ModuleSSLGnuTLS : public Module
}
}
- virtual void OnSyncUserMetaData(userrec* user, Module* proto, void* opaque, const std::string &extname, bool displayable)
+ virtual void OnSyncUserMetaData(User* user, Module* proto, void* opaque, const std::string &extname, bool displayable)
{
// check if the linking module wants to know about OUR metadata
if(extname == "ssl")
@@ -610,7 +610,7 @@ class ModuleSSLGnuTLS : public Module
// check if its our metadata key, and its associated with a user
if ((target_type == TYPE_USER) && (extname == "ssl"))
{
- userrec* dest = (userrec*)target;
+ User* dest = (User*)target;
// if they dont already have an ssl flag, accept the remote server's
if (!dest->GetExt(extname, dummy))
{
@@ -654,7 +654,7 @@ class ModuleSSLGnuTLS : public Module
{
// Handshake complete.
// This will do for setting the ssl flag...it could be done earlier if it's needed. But this seems neater.
- userrec* extendme = ServerInstance->FindDescriptor(session->fd);
+ User* extendme = ServerInstance->FindDescriptor(session->fd);
if (extendme)
{
if (!extendme->GetExt("ssl", dummy))
@@ -671,7 +671,7 @@ class ModuleSSLGnuTLS : public Module
}
}
- virtual void OnPostConnect(userrec* user)
+ virtual void OnPostConnect(User* user)
{
// This occurs AFTER OnUserConnect so we can be sure the
// protocol module has propagated the NICK message.
@@ -706,7 +706,7 @@ class ModuleSSLGnuTLS : public Module
ServerInstance->SE->WantWrite(eh);
}
- virtual void OnBufferFlushed(userrec* user)
+ virtual void OnBufferFlushed(User* user)
{
if (user->GetExt("ssl"))
{
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index 76270c650..4ce21c805 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -152,7 +152,7 @@ class ModuleSSLOpenSSL : public Module
OnRehash(NULL,"ssl");
}
- virtual void OnRehash(userrec* user, const std::string &param)
+ virtual void OnRehash(User* user, const std::string &param)
{
if (param != "ssl")
return;
@@ -301,13 +301,13 @@ class ModuleSSLOpenSSL : public Module
{
if (target_type == TYPE_USER)
{
- userrec* user = (userrec*)item;
+ User* user = (User*)item;
if (user->GetExt("ssl", dummy) && IS_LOCAL(user) && isin(user->GetPort(), listenports))
{
// User is using SSL, they're a local user, and they're using one of *our* SSL ports.
// Potentially there could be multiple SSL modules loaded at once on different ports.
- userrec::QuitUser(ServerInstance, user, "SSL module unloading");
+ User::QuitUser(ServerInstance, user, "SSL module unloading");
}
if (user->GetExt("ssl_cert", dummy) && isin(user->GetPort(), listenports))
{
@@ -676,7 +676,7 @@ class ModuleSSLOpenSSL : public Module
}
// :kenny.chatspike.net 320 Om Epy|AFK :is a Secure Connection
- virtual void OnWhois(userrec* source, userrec* dest)
+ virtual void OnWhois(User* source, User* dest)
{
if (!clientactive)
return;
@@ -688,7 +688,7 @@ class ModuleSSLOpenSSL : public Module
}
}
- virtual void OnSyncUserMetaData(userrec* user, Module* proto, void* opaque, const std::string &extname, bool displayable)
+ virtual void OnSyncUserMetaData(User* user, Module* proto, void* opaque, const std::string &extname, bool displayable)
{
// check if the linking module wants to know about OUR metadata
if (extname == "ssl")
@@ -708,7 +708,7 @@ class ModuleSSLOpenSSL : public Module
// check if its our metadata key, and its associated with a user
if ((target_type == TYPE_USER) && (extname == "ssl"))
{
- userrec* dest = (userrec*)target;
+ User* dest = (User*)target;
// if they dont already have an ssl flag, accept the remote server's
if (!dest->GetExt(extname, dummy))
{
@@ -756,7 +756,7 @@ class ModuleSSLOpenSSL : public Module
{
// Handshake complete.
// This will do for setting the ssl flag...it could be done earlier if it's needed. But this seems neater.
- userrec* u = ServerInstance->FindDescriptor(session->fd);
+ User* u = ServerInstance->FindDescriptor(session->fd);
if (u)
{
if (!u->GetExt("ssl", dummy))
@@ -782,7 +782,7 @@ class ModuleSSLOpenSSL : public Module
return true;
}
- virtual void OnPostConnect(userrec* user)
+ virtual void OnPostConnect(User* user)
{
// This occurs AFTER OnUserConnect so we can be sure the
// protocol module has propagated the NICK message.
@@ -812,7 +812,7 @@ class ModuleSSLOpenSSL : public Module
ServerInstance->SE->WantWrite(eh);
}
- virtual void OnBufferFlushed(userrec* user)
+ virtual void OnBufferFlushed(User* user)
{
if (user->GetExt("ssl"))
{
diff --git a/src/modules/extra/m_ssl_oper_cert.cpp b/src/modules/extra/m_ssl_oper_cert.cpp
index e95447b6d..3d0e81928 100644
--- a/src/modules/extra/m_ssl_oper_cert.cpp
+++ b/src/modules/extra/m_ssl_oper_cert.cpp
@@ -33,9 +33,9 @@ class cmd_fingerprint : public Command
syntax = "<nickname>";
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
- userrec* target = ServerInstance->FindNick(parameters[0]);
+ User* target = ServerInstance->FindNick(parameters[0]);
if (target)
{
ssl_cert* cert;
@@ -94,7 +94,7 @@ class ModuleOperSSLCert : public Module
List[I_OnPreCommand] = List[I_OnRehash] = 1;
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
delete cf;
cf = new ConfigReader(ServerInstance);
@@ -115,7 +115,7 @@ class ModuleOperSSLCert : public Module
}
- virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated, const std::string &original_line)
+ virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line)
{
irc::string cmd = command.c_str();
diff --git a/src/modules/extra/m_sslinfo.cpp b/src/modules/extra/m_sslinfo.cpp
index 008608f03..0d3dce2eb 100644
--- a/src/modules/extra/m_sslinfo.cpp
+++ b/src/modules/extra/m_sslinfo.cpp
@@ -33,9 +33,9 @@ class cmd_sslinfo : public Command
this->syntax = "<nick>";
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
- userrec* target = ServerInstance->FindNick(parameters[0]);
+ User* target = ServerInstance->FindNick(parameters[0]);
ssl_cert* cert;
if (target)
diff --git a/src/modules/extra/m_ziplink.cpp b/src/modules/extra/m_ziplink.cpp
index 7f7453240..90da97856 100644
--- a/src/modules/extra/m_ziplink.cpp
+++ b/src/modules/extra/m_ziplink.cpp
@@ -218,7 +218,7 @@ class ModuleZLib : public Module
}
/* Handle stats z (misc stats) */
- virtual int OnStats(char symbol, userrec* user, string_list &results)
+ virtual int OnStats(char symbol, User* user, string_list &results)
{
if (symbol == 'z')
{
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp
index 7f09de134..90517255e 100644
--- a/src/modules/m_alias.cpp
+++ b/src/modules/m_alias.cpp
@@ -127,9 +127,9 @@ class ModuleAlias : public Module
}
}
- virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated, const std::string &original_line)
+ virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line)
{
- userrec *u = NULL;
+ User *u = NULL;
/* If theyre not registered yet, we dont want
* to know.
@@ -210,7 +210,7 @@ class ModuleAlias : public Module
return 0;
}
- void DoCommand(std::string newline, userrec* user, const std::string &original_line)
+ void DoCommand(std::string newline, User* user, const std::string &original_line)
{
for (int v = 1; v < 10; v++)
{
@@ -260,7 +260,7 @@ class ModuleAlias : public Module
ServerInstance->Parser->CallHandler(parv[0], &parv[1], x-1, user);
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
ReadAliases();
}
diff --git a/src/modules/m_alltime.cpp b/src/modules/m_alltime.cpp
index 7afa71803..1b48c237f 100644
--- a/src/modules/m_alltime.cpp
+++ b/src/modules/m_alltime.cpp
@@ -25,7 +25,7 @@ class cmd_alltime : public Command
translation.push_back(TR_END);
}
- CmdResult Handle(const char **parameters, int pcnt, userrec *user)
+ CmdResult Handle(const char **parameters, int pcnt, User *user)
{
char fmtdate[64];
char fmtdate2[64];
diff --git a/src/modules/m_antibear.cpp b/src/modules/m_antibear.cpp
index 0e254d00c..5690572ce 100644
--- a/src/modules/m_antibear.cpp
+++ b/src/modules/m_antibear.cpp
@@ -40,7 +40,7 @@ class ModuleAntiBear : public Module
List[I_OnUserRegister] = List[I_OnPreCommand] = 1;
}
- virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated, const std::string &original_line)
+ virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line)
{
if (command == "NOTICE" && !validated && pcnt > 1 && user->GetExt("antibear_timewait"))
{
@@ -62,7 +62,7 @@ class ModuleAntiBear : public Module
return 0;
}
- virtual int OnUserRegister(userrec* user)
+ virtual int OnUserRegister(User* user)
{
user->WriteServ("439 %s :This server has anti-spambot mechanisms enabled.", user->nick);
user->WriteServ("931 %s :Malicious bots, spammers, and other automated systems of dubious origin are NOT welcome here.", user->nick);
diff --git a/src/modules/m_antibottler.cpp b/src/modules/m_antibottler.cpp
index 56ad9da05..cef990a71 100644
--- a/src/modules/m_antibottler.cpp
+++ b/src/modules/m_antibottler.cpp
@@ -39,7 +39,7 @@ class ModuleAntiBottler : public Module
return Version(1,1,0,1,VF_VENDOR,API_VERSION);
}
- virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated, const std::string &original_line)
+ virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line)
{
char data[MAXBUF];
strlcpy(data,original_line.c_str(),MAXBUF);
diff --git a/src/modules/m_auditorium.cpp b/src/modules/m_auditorium.cpp
index aa5e18438..b91538ace 100644
--- a/src/modules/m_auditorium.cpp
+++ b/src/modules/m_auditorium.cpp
@@ -20,7 +20,7 @@ class AuditoriumMode : public ModeHandler
public:
AuditoriumMode(InspIRCd* Instance) : ModeHandler(Instance, 'u', 0, 0, false, MODETYPE_CHANNEL, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (channel->IsModeSet('u') != adding)
{
@@ -65,7 +65,7 @@ class ModuleAuditorium : public Module
DELETE(aum);
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
ConfigReader conf(ServerInstance);
ShowOps = conf.ReadFlag("auditorium", "showops", 0);
@@ -87,7 +87,7 @@ class ModuleAuditorium : public Module
List[I_OnUserJoin] = List[I_OnUserPart] = List[I_OnUserKick] = List[I_OnUserQuit] = List[I_OnUserList] = List[I_OnRehash] = 1;
}
- virtual int OnUserList(userrec* user, chanrec* Ptr, CUList* &nameslist)
+ virtual int OnUserList(User* user, Channel* Ptr, CUList* &nameslist)
{
if (Ptr->IsModeSet('u'))
{
@@ -119,7 +119,7 @@ class ModuleAuditorium : public Module
return 0;
}
- virtual void OnUserJoin(userrec* user, chanrec* channel, bool &silent)
+ virtual void OnUserJoin(User* user, Channel* channel, bool &silent)
{
if (channel->IsModeSet('u'))
{
@@ -131,7 +131,7 @@ class ModuleAuditorium : public Module
}
}
- void OnUserPart(userrec* user, chanrec* channel, const std::string &partmessage, bool &silent)
+ void OnUserPart(User* user, Channel* channel, const std::string &partmessage, bool &silent)
{
if (channel->IsModeSet('u'))
{
@@ -148,7 +148,7 @@ class ModuleAuditorium : public Module
}
}
- void OnUserKick(userrec* source, userrec* user, chanrec* chan, const std::string &reason, bool &silent)
+ void OnUserKick(User* source, User* user, Channel* chan, const std::string &reason, bool &silent)
{
if (chan->IsModeSet('u'))
{
@@ -162,7 +162,7 @@ class ModuleAuditorium : public Module
}
}
- void OnUserQuit(userrec* user, const std::string &reason, const std::string &oper_message)
+ void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message)
{
Command* parthandler = ServerInstance->Parser->GetHandler("PART");
std::vector<std::string> to_leave;
diff --git a/src/modules/m_banexception.cpp b/src/modules/m_banexception.cpp
index 4f36fb8c9..4c0e93dea 100644
--- a/src/modules/m_banexception.cpp
+++ b/src/modules/m_banexception.cpp
@@ -62,7 +62,7 @@ public:
output.append(" EXCEPTS=e");
}
- virtual int OnCheckBan(userrec* user, chanrec* chan)
+ virtual int OnCheckBan(User* user, Channel* chan)
{
if (chan != NULL)
{
@@ -93,17 +93,17 @@ public:
be->DoCleanup(target_type, item);
}
- virtual void OnSyncChannel(chanrec* chan, Module* proto, void* opaque)
+ virtual void OnSyncChannel(Channel* chan, Module* proto, void* opaque)
{
be->DoSyncChannel(chan, proto, opaque);
}
- virtual void OnChannelDelete(chanrec* chan)
+ virtual void OnChannelDelete(Channel* chan)
{
be->DoChannelDelete(chan);
}
- virtual void OnRehash(userrec* user, const std::string &param)
+ virtual void OnRehash(User* user, const std::string &param)
{
be->DoRehash();
}
diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp
index 9ac440d5e..60bd1bba4 100644
--- a/src/modules/m_banredirect.cpp
+++ b/src/modules/m_banredirect.cpp
@@ -44,7 +44,7 @@ class BanRedirect : public ModeWatcher
{
}
- bool BeforeMode(userrec* source, userrec* dest, chanrec* channel, std::string &param, bool adding, ModeType type)
+ bool BeforeMode(User* source, User* dest, Channel* channel, std::string &param, bool adding, ModeType type)
{
/* nick!ident@host -> nick!ident@host
* nick!ident@host#chan -> nick!ident@host#chan
@@ -204,7 +204,7 @@ class ModuleBanRedirect : public Module
List[I_OnRehash] = List[I_OnUserPreJoin] = List[I_OnChannelDelete] = List[I_OnCleanup] = 1;
}
- virtual void OnChannelDelete(chanrec* chan)
+ virtual void OnChannelDelete(Channel* chan)
{
OnCleanup(TYPE_CHANNEL, chan);
}
@@ -213,7 +213,7 @@ class ModuleBanRedirect : public Module
{
if(target_type == TYPE_CHANNEL)
{
- chanrec* chan = static_cast<chanrec*>(item);
+ Channel* chan = static_cast<Channel*>(item);
BanRedirectList* redirects;
if(chan->GetExt("banredirects", redirects))
@@ -251,12 +251,12 @@ class ModuleBanRedirect : public Module
}
}
- virtual void OnRehash(userrec* user, const std::string &param)
+ virtual void OnRehash(User* user, const std::string &param)
{
ExceptionModule = ServerInstance->Modules->Find("m_banexception.so");
}
- virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
{
/* This prevents recursion when a user sets multiple ban redirects in a chain
* (thanks Potter)
@@ -293,7 +293,7 @@ class ModuleBanRedirect : public Module
if(ServerInstance->MatchText(user->GetFullRealHost(), redir->banmask) || ServerInstance->MatchText(user->GetFullHost(), redir->banmask) || ServerInstance->MatchText(ipmask, redir->banmask))
{
/* tell them they're banned and are being transferred */
- chanrec* destchan = ServerInstance->FindChan(redir->targetchan);
+ Channel* destchan = ServerInstance->FindChan(redir->targetchan);
if(destchan && ServerInstance->Modules->Find("m_redirect.so") && destchan->IsModeSet('L') && destchan->limit && (destchan->GetUserCounter() >= destchan->limit))
{
@@ -305,7 +305,7 @@ class ModuleBanRedirect : public Module
user->WriteServ("474 %s %s :Cannot join channel (You are banned)", user->nick, chan->name);
user->WriteServ("470 %s :You are being automatically redirected to %s", user->nick, redir->targetchan.c_str());
nofollow = true;
- chanrec::JoinUser(ServerInstance, user, redir->targetchan.c_str(), false, "", ServerInstance->Time(true));
+ Channel::JoinUser(ServerInstance, user, redir->targetchan.c_str(), false, "", ServerInstance->Time(true));
nofollow = false;
return 1;
}
diff --git a/src/modules/m_blockamsg.cpp b/src/modules/m_blockamsg.cpp
index bcef01fd2..44f59f347 100644
--- a/src/modules/m_blockamsg.cpp
+++ b/src/modules/m_blockamsg.cpp
@@ -65,7 +65,7 @@ class ModuleBlockAmsg : public Module
return Version(1,1,0,0,VF_VENDOR,API_VERSION);
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
ConfigReader Conf(ServerInstance);
@@ -88,7 +88,7 @@ class ModuleBlockAmsg : public Module
action = IBLOCK_KILLOPERS;
}
- virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated, const std::string &original_line)
+ virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line)
{
// Don't do anything with unregistered users, or remote ones.
if(!user || (user->registered != REG_ALL) || !IS_LOCAL(user))
@@ -144,7 +144,7 @@ class ModuleBlockAmsg : public Module
ServerInstance->WriteOpers("*** %s had an /amsg or /ame denied", user->nick);
if(action == IBLOCK_KILL || action == IBLOCK_KILLOPERS)
- userrec::QuitUser(ServerInstance, user, "Global message (/amsg or /ame) detected");
+ User::QuitUser(ServerInstance, user, "Global message (/amsg or /ame) detected");
else if(action == IBLOCK_NOTICE || action == IBLOCK_NOTICEOPERS)
user->WriteServ( "NOTICE %s :Global message (/amsg or /ame) detected", user->nick);
@@ -171,7 +171,7 @@ class ModuleBlockAmsg : public Module
{
if(target_type == TYPE_USER)
{
- userrec* user = (userrec*)item;
+ User* user = (User*)item;
BlockedMessage* m;
user->GetExt("amsgblock", m);
if(m)
diff --git a/src/modules/m_blockcaps.cpp b/src/modules/m_blockcaps.cpp
index 893981283..167a12bec 100644
--- a/src/modules/m_blockcaps.cpp
+++ b/src/modules/m_blockcaps.cpp
@@ -23,7 +23,7 @@ class BlockCaps : public ModeHandler
public:
BlockCaps(InspIRCd* Instance) : ModeHandler(Instance, 'P', 0, 0, false, MODETYPE_CHANNEL, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (adding)
{
@@ -67,19 +67,19 @@ public:
List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = List[I_OnRehash] = 1;
}
- virtual void OnRehash(userrec* user, const std::string &param)
+ virtual void OnRehash(User* user, const std::string &param)
{
ReadConf();
}
- virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
if (target_type == TYPE_CHANNEL)
{
if ((!IS_LOCAL(user)) || (text.length() < minlen))
return 0;
- chanrec* c = (chanrec*)dest;
+ Channel* c = (Channel*)dest;
if (c->IsModeSet('P'))
{
@@ -96,7 +96,7 @@ public:
return 0;
}
- virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
return OnUserPreMessage(user,dest,target_type,text,status,exempt_list);
}
diff --git a/src/modules/m_blockcolor.cpp b/src/modules/m_blockcolor.cpp
index d46e5a9d6..1635815ce 100644
--- a/src/modules/m_blockcolor.cpp
+++ b/src/modules/m_blockcolor.cpp
@@ -22,7 +22,7 @@ class BlockColor : public ModeHandler
public:
BlockColor(InspIRCd* Instance) : ModeHandler(Instance, 'c', 0, 0, false, MODETYPE_CHANNEL, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (adding)
{
@@ -64,11 +64,11 @@ class ModuleBlockColour : public Module
}
- virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
if ((target_type == TYPE_CHANNEL) && (IS_LOCAL(user)))
{
- chanrec* c = (chanrec*)dest;
+ Channel* c = (Channel*)dest;
if(c->IsModeSet('c'))
{
@@ -95,7 +95,7 @@ class ModuleBlockColour : public Module
return 0;
}
- virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
return OnUserPreMessage(user,dest,target_type,text,status,exempt_list);
}
diff --git a/src/modules/m_botmode.cpp b/src/modules/m_botmode.cpp
index 86dc9ea00..b055c83ee 100644
--- a/src/modules/m_botmode.cpp
+++ b/src/modules/m_botmode.cpp
@@ -22,7 +22,7 @@ class BotMode : public ModeHandler
public:
BotMode(InspIRCd* Instance) : ModeHandler(Instance, 'B', 0, 0, false, MODETYPE_USER, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (adding)
{
@@ -75,7 +75,7 @@ class ModuleBotMode : public Module
return Version(1,1,0,0,VF_COMMON|VF_VENDOR,API_VERSION);
}
- virtual void OnWhois(userrec* src, userrec* dst)
+ virtual void OnWhois(User* src, User* dst)
{
if (dst->IsModeSet('B'))
{
diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp
index 6d56b62bc..b02e892d3 100644
--- a/src/modules/m_cban.cpp
+++ b/src/modules/m_cban.cpp
@@ -54,7 +54,7 @@ class cmd_cban : public Command
TRANSLATE4(TR_TEXT,TR_TEXT,TR_TEXT,TR_END);
}
- CmdResult Handle(const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle(const char** parameters, int pcnt, User *user)
{
/* syntax: CBAN #channel time :reason goes here */
/* 'time' is a human-readable timestring, like 2d3h2s. */
@@ -134,7 +134,7 @@ class ModuleCBan : public Module
List[I_OnUserPreJoin] = List[I_OnSyncOtherMetaData] = List[I_OnDecodeMetaData] = List[I_OnStats] = 1;
}
- virtual int OnStats(char symbol, userrec* user, string_list &results)
+ virtual int OnStats(char symbol, User* user, string_list &results)
{
ExpireBans();
@@ -150,7 +150,7 @@ class ModuleCBan : public Module
return 0;
}
- virtual int OnUserPreJoin(userrec *user, chanrec *chan, const char *cname, std::string &privs)
+ virtual int OnUserPreJoin(User *user, Channel *chan, const char *cname, std::string &privs)
{
ExpireBans();
diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp
index 1159febf8..f220b0710 100644
--- a/src/modules/m_censor.cpp
+++ b/src/modules/m_censor.cpp
@@ -27,7 +27,7 @@ class CensorUser : public ModeHandler
public:
CensorUser(InspIRCd* Instance) : ModeHandler(Instance, 'G', 0, 0, false, MODETYPE_USER, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (adding)
{
@@ -57,7 +57,7 @@ class CensorChannel : public ModeHandler
public:
CensorChannel(InspIRCd* Instance) : ModeHandler(Instance, 'G', 0, 0, false, MODETYPE_CHANNEL, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (adding)
{
@@ -128,7 +128,7 @@ class ModuleCensor : public Module
}
// format of a config entry is <badword text="shit" replace="poo">
- virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
if (!IS_LOCAL(user))
return 0;
@@ -136,9 +136,9 @@ class ModuleCensor : public Module
bool active = false;
if (target_type == TYPE_USER)
- active = ((userrec*)dest)->IsModeSet('G');
+ active = ((User*)dest)->IsModeSet('G');
else if (target_type == TYPE_CHANNEL)
- active = ((chanrec*)dest)->IsModeSet('G');
+ active = ((Channel*)dest)->IsModeSet('G');
if (!active)
return 0;
@@ -150,7 +150,7 @@ class ModuleCensor : public Module
{
if (index->second.empty())
{
- user->WriteServ("936 %s %s %s :Your message contained a censored word, and was blocked", user->nick, ((chanrec*)dest)->name, index->first.c_str());
+ user->WriteServ("936 %s %s %s :Your message contained a censored word, and was blocked", user->nick, ((Channel*)dest)->name, index->first.c_str());
return 1;
}
@@ -161,12 +161,12 @@ class ModuleCensor : public Module
return 0;
}
- virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
return OnUserPreMessage(user,dest,target_type,text,status,exempt_list);
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
/*
* reload our config file on rehash - we must destroy and re-allocate the classes
diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp
index eb497dea4..b30b9316b 100644
--- a/src/modules/m_cgiirc.cpp
+++ b/src/modules/m_cgiirc.cpp
@@ -51,7 +51,7 @@ class cmd_webirc : public Command
this->source = "m_cgiirc.so";
this->syntax = "password client hostname ip";
}
- CmdResult Handle(const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle(const char** parameters, int pcnt, User *user)
{
if(user->registered == REG_ALL)
return CMD_FAILURE;
@@ -83,10 +83,10 @@ class CGIResolver : public Resolver
{
std::string typ;
int theirfd;
- userrec* them;
+ User* them;
bool notify;
public:
- CGIResolver(Module* me, InspIRCd* ServerInstance, bool NotifyOpers, const std::string &source, bool forward, userrec* u, int userfd, const std::string &type, bool &cached)
+ CGIResolver(Module* me, InspIRCd* ServerInstance, bool NotifyOpers, const std::string &source, bool forward, User* u, int userfd, const std::string &type, bool &cached)
: Resolver(ServerInstance, source, forward ? DNS_QUERY_A : DNS_QUERY_PTR4, cached, me), typ(type), theirfd(userfd), them(u), notify(NotifyOpers) { }
virtual void OnLookupComplete(const std::string &result, unsigned int ttl, bool cached, int resultnum = 0)
@@ -146,7 +146,7 @@ public:
return PRIORITY_FIRST;
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
ConfigReader Conf(ServerInstance);
@@ -198,7 +198,7 @@ public:
{
if(target_type == TYPE_USER)
{
- userrec* user = (userrec*)item;
+ User* user = (User*)item;
std::string* realhost;
std::string* realip;
@@ -216,7 +216,7 @@ public:
}
}
- virtual void OnSyncUserMetaData(userrec* user, Module* proto, void* opaque, const std::string &extname, bool displayable)
+ virtual void OnSyncUserMetaData(User* user, Module* proto, void* opaque, const std::string &extname, bool displayable)
{
if((extname == "cgiirc_realhost") || (extname == "cgiirc_realip"))
{
@@ -233,7 +233,7 @@ public:
{
if(target_type == TYPE_USER)
{
- userrec* dest = (userrec*)target;
+ User* dest = (User*)target;
std::string* bleh;
if(((extname == "cgiirc_realhost") || (extname == "cgiirc_realip")) && (!dest->GetExt(extname, bleh)))
{
@@ -242,13 +242,13 @@ public:
}
}
- virtual void OnUserQuit(userrec* user, const std::string &message, const std::string &oper_message)
+ virtual void OnUserQuit(User* user, const std::string &message, const std::string &oper_message)
{
OnCleanup(TYPE_USER, user);
}
- virtual int OnUserRegister(userrec* user)
+ virtual int OnUserRegister(User* user)
{
for(CGIHostlist::iterator iter = Hosts.begin(); iter != Hosts.end(); iter++)
{
@@ -283,7 +283,7 @@ public:
return 0;
}
- virtual void OnUserConnect(userrec* user)
+ virtual void OnUserConnect(User* user)
{
std::string *webirc_hostname, *webirc_ip;
if(user->GetExt("cgiirc_webirc_hostname", webirc_hostname))
@@ -317,7 +317,7 @@ public:
}
}
- bool CheckPass(userrec* user)
+ bool CheckPass(User* user)
{
if(IsValidHost(user->password))
{
@@ -376,7 +376,7 @@ public:
return false;
}
- bool CheckIdent(userrec* user)
+ bool CheckIdent(User* user)
{
int ip[4];
char* ident;
diff --git a/src/modules/m_chancreate.cpp b/src/modules/m_chancreate.cpp
index 232d55314..d2b0b4e45 100644
--- a/src/modules/m_chancreate.cpp
+++ b/src/modules/m_chancreate.cpp
@@ -40,7 +40,7 @@ class ModuleChanCreate : public Module
List[I_OnUserJoin] = 1;
}
- virtual void OnUserJoin(userrec* user, chanrec* channel, bool &silent)
+ virtual void OnUserJoin(User* user, Channel* channel, bool &silent)
{
if (channel->GetUserCounter() == 1)
{
diff --git a/src/modules/m_chanfilter.cpp b/src/modules/m_chanfilter.cpp
index 19e1fe3d9..994c71a2a 100644
--- a/src/modules/m_chanfilter.cpp
+++ b/src/modules/m_chanfilter.cpp
@@ -27,7 +27,7 @@ class ChanFilter : public ListModeBase
public:
ChanFilter(InspIRCd* Instance) : ListModeBase(Instance, 'g', "End of channel spamfilter list", "941", "940", false, "chanfilter") { }
- virtual bool ValidateParam(userrec* user, chanrec* chan, std::string &word)
+ virtual bool ValidateParam(User* user, Channel* chan, std::string &word)
{
if ((word.length() > 35) || (word.empty()))
{
@@ -38,18 +38,18 @@ class ChanFilter : public ListModeBase
return true;
}
- virtual bool TellListTooLong(userrec* user, chanrec* chan, std::string &word)
+ virtual bool TellListTooLong(User* user, Channel* chan, std::string &word)
{
user->WriteServ("939 %s %s %s :Channel spamfilter list is full",user->nick, chan->name, word.c_str());
return true;
}
- virtual void TellAlreadyOnList(userrec* user, chanrec* chan, std::string &word)
+ virtual void TellAlreadyOnList(User* user, Channel* chan, std::string &word)
{
user->WriteServ("937 %s %s :The word %s is already on the spamfilter list",user->nick, chan->name,word.c_str());
}
- virtual void TellNotSet(userrec* user, chanrec* chan, std::string &word)
+ virtual void TellNotSet(User* user, Channel* chan, std::string &word)
{
user->WriteServ("938 %s %s :No such spamfilter word is set",user->nick, chan->name);
}
@@ -76,17 +76,17 @@ class ModuleChanFilter : public Module
List[I_OnCleanup] = List[I_OnChannelDelete] = List[I_OnRehash] = List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = List[I_OnSyncChannel] = 1;
}
- virtual void OnChannelDelete(chanrec* chan)
+ virtual void OnChannelDelete(Channel* chan)
{
cf->DoChannelDelete(chan);
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
cf->DoRehash();
}
- virtual int ProcessMessages(userrec* user,chanrec* chan,std::string &text)
+ virtual int ProcessMessages(User* user,Channel* chan,std::string &text)
{
if (!IS_LOCAL(user) || CHANOPS_EXEMPT(ServerInstance, 'g') && chan->GetStatus(user) == STATUS_OP)
return 0;
@@ -112,11 +112,11 @@ class ModuleChanFilter : public Module
return 0;
}
- virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
if (target_type == TYPE_CHANNEL)
{
- return ProcessMessages(user,(chanrec*)dest,text);
+ return ProcessMessages(user,(Channel*)dest,text);
}
else return 0;
}
@@ -126,12 +126,12 @@ class ModuleChanFilter : public Module
cf->DoCleanup(target_type, item);
}
- virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
return OnUserPreMessage(user,dest,target_type,text,status,exempt_list);
}
- virtual void OnSyncChannel(chanrec* chan, Module* proto, void* opaque)
+ virtual void OnSyncChannel(Channel* chan, Module* proto, void* opaque)
{
cf->DoSyncChannel(chan, proto, opaque);
}
diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp
index fb545f58f..325069d0b 100644
--- a/src/modules/m_chanprotect.cpp
+++ b/src/modules/m_chanprotect.cpp
@@ -47,9 +47,9 @@ class FounderProtectBase
{
}
- ModePair ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter)
+ ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter)
{
- userrec* x = MyInstance->FindNick(parameter);
+ User* x = MyInstance->FindNick(parameter);
if (x)
{
if (!channel->HasUser(x))
@@ -72,7 +72,7 @@ class FounderProtectBase
return std::make_pair(false, parameter);
}
- void RemoveMode(chanrec* channel, char mc)
+ void RemoveMode(Channel* channel, char mc)
{
unload_kludge = true;
CUList* cl = channel->GetUsers();
@@ -102,7 +102,7 @@ class FounderProtectBase
unload_kludge = false;
}
- void DisplayList(userrec* user, chanrec* channel)
+ void DisplayList(User* user, Channel* channel)
{
CUList* cl = channel->GetUsers();
std::string item = extend+std::string(channel->name);
@@ -116,9 +116,9 @@ class FounderProtectBase
user->WriteServ("%d %s %s :End of channel %s list", end, user->nick, channel->name, type.c_str());
}
- userrec* FindAndVerify(std::string &parameter, chanrec* channel)
+ User* FindAndVerify(std::string &parameter, Channel* channel)
{
- userrec* theuser = MyInstance->FindNick(parameter);
+ User* theuser = MyInstance->FindNick(parameter);
if ((!theuser) || (!channel->HasUser(theuser)))
{
parameter.clear();
@@ -127,13 +127,13 @@ class FounderProtectBase
return theuser;
}
- bool CanRemoveOthers(userrec* u1, userrec* u2, chanrec* c)
+ bool CanRemoveOthers(User* u1, User* u2, Channel* c)
{
std::string item = extend+std::string(c->name);
return (u1->GetExt(item, dummyptr) && u2->GetExt(item, dummyptr));
}
- ModeAction HandleChange(userrec* source, userrec* theuser, bool adding, chanrec* channel, std::string &parameter)
+ ModeAction HandleChange(User* source, User* theuser, bool adding, Channel* channel, std::string &parameter)
{
std::string item = extend+std::string(channel->name);
@@ -174,23 +174,23 @@ class ChanFounder : public ModeHandler, public FounderProtectBase
return FOUNDER_VALUE;
}
- ModePair ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter)
+ ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter)
{
return FounderProtectBase::ModeSet(source, dest, channel, parameter);
}
- void RemoveMode(chanrec* channel)
+ void RemoveMode(Channel* channel)
{
FounderProtectBase::RemoveMode(channel, this->GetModeChar());
}
- void RemoveMode(userrec* user)
+ void RemoveMode(User* user)
{
}
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
- userrec* theuser = FounderProtectBase::FindAndVerify(parameter, channel);
+ User* theuser = FounderProtectBase::FindAndVerify(parameter, channel);
if (!theuser)
{
@@ -215,7 +215,7 @@ class ChanFounder : public ModeHandler, public FounderProtectBase
}
}
- void DisplayList(userrec* user, chanrec* channel)
+ void DisplayList(User* user, Channel* channel)
{
FounderProtectBase::DisplayList(user,channel);
}
@@ -236,23 +236,23 @@ class ChanProtect : public ModeHandler, public FounderProtectBase
return PROTECT_VALUE;
}
- ModePair ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter)
+ ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter)
{
return FounderProtectBase::ModeSet(source, dest, channel, parameter);
}
- void RemoveMode(chanrec* channel)
+ void RemoveMode(Channel* channel)
{
FounderProtectBase::RemoveMode(channel, this->GetModeChar());
}
- void RemoveMode(userrec* user)
+ void RemoveMode(User* user)
{
}
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
- userrec* theuser = FounderProtectBase::FindAndVerify(parameter, channel);
+ User* theuser = FounderProtectBase::FindAndVerify(parameter, channel);
if (!theuser)
return MODEACTION_DENY;
@@ -276,7 +276,7 @@ class ChanProtect : public ModeHandler, public FounderProtectBase
}
}
- virtual void DisplayList(userrec* user, chanrec* channel)
+ virtual void DisplayList(User* user, Channel* channel)
{
FounderProtectBase::DisplayList(user, channel);
}
@@ -318,21 +318,21 @@ class ModuleChanProtect : public Module
List[I_OnUserKick] = List[I_OnUserPart] = List[I_OnRehash] = List[I_OnUserPreJoin] = List[I_OnPostJoin] = List[I_OnAccessCheck] = List[I_OnSyncChannel] = 1;
}
- virtual void OnUserKick(userrec* source, userrec* user, chanrec* chan, const std::string &reason, bool &silent)
+ virtual void OnUserKick(User* source, User* user, Channel* chan, const std::string &reason, bool &silent)
{
// FIX: when someone gets kicked from a channel we must remove their Extensibles!
user->Shrink("cm_founder_"+std::string(chan->name));
user->Shrink("cm_protect_"+std::string(chan->name));
}
- virtual void OnUserPart(userrec* user, chanrec* channel, const std::string &partreason, bool &silent)
+ virtual void OnUserPart(User* user, Channel* channel, const std::string &partreason, bool &silent)
{
// FIX: when someone parts a channel we must remove their Extensibles!
user->Shrink("cm_founder_"+std::string(channel->name));
user->Shrink("cm_protect_"+std::string(channel->name));
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
/* Create a configreader class and read our flag,
* in old versions this was heap-allocated and the
@@ -367,7 +367,7 @@ class ModuleChanProtect : public Module
}
}
- virtual int OnUserPreJoin(userrec *user, chanrec *chan, const char *cname, std::string &privs)
+ virtual int OnUserPreJoin(User *user, Channel *chan, const char *cname, std::string &privs)
{
// if the user is the first user into the channel, mark them as the founder, but only if
// the config option for it is set
@@ -378,7 +378,7 @@ class ModuleChanProtect : public Module
return 0;
}
- virtual void OnPostJoin(userrec *user, chanrec *channel)
+ virtual void OnPostJoin(User *user, Channel *channel)
{
// This *must* be in PostJoin, not UserJoin - the former will make it appear to happen
// before the client is in the channel
@@ -392,7 +392,7 @@ class ModuleChanProtect : public Module
user->WriteServ("MODE %s +q %s", channel->name, user->nick);
}
- virtual int OnAccessCheck(userrec* source,userrec* dest,chanrec* channel,int access_type)
+ virtual int OnAccessCheck(User* source,User* dest,Channel* channel,int access_type)
{
// here we perform access checks, this is the important bit that actually stops kicking/deopping
// etc of protected users. There are many types of access check, we're going to handle
@@ -488,7 +488,7 @@ class ModuleChanProtect : public Module
return Version(1, 1, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
}
- virtual void OnSyncChannel(chanrec* chan, Module* proto, void* opaque)
+ virtual void OnSyncChannel(Channel* chan, Module* proto, void* opaque)
{
/* NOTE: If +qa prefix is on, this is propagated by the channel join,
* so we dont need to propagate it manually
diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp
index 7a48a3d45..24024e2f9 100644
--- a/src/modules/m_check.cpp
+++ b/src/modules/m_check.cpp
@@ -27,10 +27,10 @@ class cmd_check : public Command
syntax = "<nickname>|<ip>|<hostmask>|<channel>";
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
- userrec *targuser;
- chanrec *targchan;
+ User *targuser;
+ Channel *targchan;
std::string checkstr;
std::string chliststr;
diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp
index db8094aa2..4b53e7c12 100644
--- a/src/modules/m_chghost.cpp
+++ b/src/modules/m_chghost.cpp
@@ -29,7 +29,7 @@ class cmd_chghost : public Command
TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
}
- CmdResult Handle(const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle(const char** parameters, int pcnt, User *user)
{
const char * x = parameters[1];
@@ -52,7 +52,7 @@ class cmd_chghost : public Command
user->WriteServ("NOTICE %s :*** CHGHOST: Host too long", user->nick);
return CMD_FAILURE;
}
- userrec* dest = ServerInstance->FindNick(parameters[0]);
+ User* dest = ServerInstance->FindNick(parameters[0]);
if (!dest)
{
@@ -91,7 +91,7 @@ class ModuleChgHost : public Module
List[I_OnRehash] = 1;
}
- void OnRehash(userrec* user, const std::string &parameter)
+ void OnRehash(User* user, const std::string &parameter)
{
ConfigReader Conf(ServerInstance);
std::string hmap = Conf.ReadValue("hostname", "charmap", 0);
diff --git a/src/modules/m_chgident.cpp b/src/modules/m_chgident.cpp
index 0561c5156..7ae98b37d 100644
--- a/src/modules/m_chgident.cpp
+++ b/src/modules/m_chgident.cpp
@@ -27,9 +27,9 @@ class cmd_chgident : public Command
TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
}
- CmdResult Handle(const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle(const char** parameters, int pcnt, User *user)
{
- userrec* dest = ServerInstance->FindNick(parameters[0]);
+ User* dest = ServerInstance->FindNick(parameters[0]);
if (!dest)
{
diff --git a/src/modules/m_chgname.cpp b/src/modules/m_chgname.cpp
index 31467459c..987678b5b 100644
--- a/src/modules/m_chgname.cpp
+++ b/src/modules/m_chgname.cpp
@@ -27,9 +27,9 @@ class cmd_chgname : public Command
TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
}
- CmdResult Handle(const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle(const char** parameters, int pcnt, User *user)
{
- userrec* dest = ServerInstance->FindNick(parameters[0]);
+ User* dest = ServerInstance->FindNick(parameters[0]);
if (!dest)
{
diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp
index d10f02ce4..86f120d20 100644
--- a/src/modules/m_cloaking.cpp
+++ b/src/modules/m_cloaking.cpp
@@ -67,7 +67,7 @@ class CloakUser : public ModeHandler
{
}
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (source != dest)
return MODEACTION_DENY;
@@ -347,7 +347,7 @@ class ModuleCloaking : public Module
return Version(1,1,0,2,VF_COMMON|VF_VENDOR,API_VERSION);
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
cu->DoRehash();
}
diff --git a/src/modules/m_clones.cpp b/src/modules/m_clones.cpp
index a8644f6ed..82fdf535f 100644
--- a/src/modules/m_clones.cpp
+++ b/src/modules/m_clones.cpp
@@ -36,7 +36,7 @@ class cmd_clones : public Command
return "<?>";
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
std::string clonesstr = "304 " + std::string(user->nick) + " :CLONES";
diff --git a/src/modules/m_close.cpp b/src/modules/m_close.cpp
index da52dd7d9..4b91ca789 100644
--- a/src/modules/m_close.cpp
+++ b/src/modules/m_close.cpp
@@ -24,15 +24,15 @@ class cmd_close : public Command
this->source = "m_close.so";
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
std::map<std::string,int> closed;
- for (std::vector<userrec*>::iterator u = ServerInstance->local_users.begin(); u != ServerInstance->local_users.end(); u++)
+ for (std::vector<User*>::iterator u = ServerInstance->local_users.begin(); u != ServerInstance->local_users.end(); u++)
{
if ((*u)->registered != REG_ALL)
{
- userrec::QuitUser(ServerInstance, *u, "Closing all unknown connections per request");
+ User::QuitUser(ServerInstance, *u, "Closing all unknown connections per request");
std::string key = ConvToStr((*u)->GetIPString())+"."+ConvToStr((*u)->GetPort());
closed[key]++;
}
diff --git a/src/modules/m_commonchans.cpp b/src/modules/m_commonchans.cpp
index e9af24ad0..4cc11b725 100644
--- a/src/modules/m_commonchans.cpp
+++ b/src/modules/m_commonchans.cpp
@@ -22,7 +22,7 @@ class PrivacyMode : public ModeHandler
public:
PrivacyMode(InspIRCd* Instance) : ModeHandler(Instance, 'c', 0, 0, false, MODETYPE_USER, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (adding)
{
@@ -72,11 +72,11 @@ class ModulePrivacyMode : public Module
return Version(1,1,0,0, VF_COMMON|VF_VENDOR, API_VERSION);
}
- virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
if (target_type == TYPE_USER)
{
- userrec* t = (userrec*)dest;
+ User* t = (User*)dest;
if (!IS_OPER(user) && (t->IsModeSet('c')) && (!ServerInstance->ULine(user->server)) && !user->SharesChannelWith(t))
{
user->WriteServ("531 %s %s :You are not permitted to send private messages to this user (+c set)", user->nick, t->nick);
@@ -86,7 +86,7 @@ class ModulePrivacyMode : public Module
return 0;
}
- virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
return OnUserPreMessage(user, dest, target_type, text, status, exempt_list);
}
diff --git a/src/modules/m_conn_join.cpp b/src/modules/m_conn_join.cpp
index d65fdf7e0..5abee8303 100644
--- a/src/modules/m_conn_join.cpp
+++ b/src/modules/m_conn_join.cpp
@@ -58,7 +58,7 @@ class ModuleConnJoin : public Module
List[I_OnPostConnect] = List[I_OnRehash] = 1;
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
ConfigReader* conf = new ConfigReader(ServerInstance);
JoinChan = conf->ReadValue("autojoin", "channel", 0);
@@ -77,14 +77,14 @@ class ModuleConnJoin : public Module
return Version(1,1,0,1,VF_VENDOR,API_VERSION);
}
- virtual void OnPostConnect(userrec* user)
+ virtual void OnPostConnect(User* user)
{
if (!IS_LOCAL(user))
return;
for(std::vector<std::string>::iterator it = Joinchans.begin(); it != Joinchans.end(); it++)
if (ServerInstance->IsChannel(it->c_str()))
- chanrec::JoinUser(ServerInstance, user, it->c_str(), false, "", ServerInstance->Time(true));
+ Channel::JoinUser(ServerInstance, user, it->c_str(), false, "", ServerInstance->Time(true));
}
};
diff --git a/src/modules/m_conn_umodes.cpp b/src/modules/m_conn_umodes.cpp
index 23b5d8280..34e1fd34d 100644
--- a/src/modules/m_conn_umodes.cpp
+++ b/src/modules/m_conn_umodes.cpp
@@ -35,7 +35,7 @@ class ModuleModesOnConnect : public Module
List[I_OnPostConnect] = List[I_OnRehash] = 1;
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
DELETE(Conf);
Conf = new ConfigReader(ServerInstance);
@@ -51,7 +51,7 @@ class ModuleModesOnConnect : public Module
return Version(1,1,0,1,VF_VENDOR,API_VERSION);
}
- virtual void OnPostConnect(userrec* user)
+ virtual void OnPostConnect(User* user)
{
if (!IS_LOCAL(user))
return;
diff --git a/src/modules/m_conn_waitpong.cpp b/src/modules/m_conn_waitpong.cpp
index 11e55cf68..4ab3ed793 100644
--- a/src/modules/m_conn_waitpong.cpp
+++ b/src/modules/m_conn_waitpong.cpp
@@ -28,7 +28,7 @@ class ModuleWaitPong : public Module
OnRehash(NULL,"");
}
- virtual void OnRehash(userrec* user, const std::string &param)
+ virtual void OnRehash(User* user, const std::string &param)
{
ConfigReader Conf(ServerInstance);
@@ -58,7 +58,7 @@ class ModuleWaitPong : public Module
return (char*)out;
}
- virtual int OnUserRegister(userrec* user)
+ virtual int OnUserRegister(User* user)
{
char* pingrpl = RandString(10);
@@ -71,7 +71,7 @@ class ModuleWaitPong : public Module
return 0;
}
- virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec* user, bool validated, const std::string &original_line)
+ virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User* user, bool validated, const std::string &original_line)
{
if (command == "PONG")
{
@@ -89,7 +89,7 @@ class ModuleWaitPong : public Module
else
{
if(killonbadreply)
- userrec::QuitUser(ServerInstance, user, "Incorrect ping reply for registration");
+ User::QuitUser(ServerInstance, user, "Incorrect ping reply for registration");
return 1;
}
}
@@ -97,13 +97,13 @@ class ModuleWaitPong : public Module
return 0;
}
- virtual bool OnCheckReady(userrec* user)
+ virtual bool OnCheckReady(User* user)
{
char* pingrpl;
return (!user->GetExt(extenstr, pingrpl));
}
- virtual void OnUserDisconnect(userrec* user)
+ virtual void OnUserDisconnect(User* user)
{
char* pingrpl;
user->GetExt(extenstr, pingrpl);
@@ -119,7 +119,7 @@ class ModuleWaitPong : public Module
{
if (target_type == TYPE_USER)
{
- userrec* user = (userrec*)item;
+ User* user = (User*)item;
char* pingrpl;
user->GetExt(extenstr, pingrpl);
diff --git a/src/modules/m_connflood.cpp b/src/modules/m_connflood.cpp
index e3fea0521..d6d9eee0f 100644
--- a/src/modules/m_connflood.cpp
+++ b/src/modules/m_connflood.cpp
@@ -64,7 +64,7 @@ public:
first = ServerInstance->Time();
}
- virtual int OnUserRegister(userrec* user)
+ virtual int OnUserRegister(User* user)
{
time_t next = ServerInstance->Time();
@@ -86,7 +86,7 @@ public:
ServerInstance->WriteOpers("*** Connection throttle deactivated");
return 0;
}
- userrec::QuitUser(ServerInstance, user, quitmsg);
+ User::QuitUser(ServerInstance, user, quitmsg);
return 1;
}
@@ -96,7 +96,7 @@ public:
{
throttled = 1;
ServerInstance->WriteOpers("*** Connection throttle activated");
- userrec::QuitUser(ServerInstance, user, quitmsg);
+ User::QuitUser(ServerInstance, user, quitmsg);
return 1;
}
}
@@ -108,7 +108,7 @@ public:
return 0;
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
InitConf();
}
diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp
index ca277c3ae..bd165034f 100644
--- a/src/modules/m_customtitle.cpp
+++ b/src/modules/m_customtitle.cpp
@@ -43,7 +43,7 @@ bool OneOfMatches(const char* host, const char* ip, const char* hostlist)
return false;
}
- CmdResult Handle(const char** parameters, int pcnt, userrec* user)
+ CmdResult Handle(const char** parameters, int pcnt, User* user)
{
if (!IS_LOCAL(user))
return CMD_LOCALONLY;
@@ -126,7 +126,7 @@ class ModuleCustomTitle : public Module
}
// :kenny.chatspike.net 320 Brain Azhrarn :is getting paid to play games.
- int OnWhoisLine(userrec* user, userrec* dest, int &numeric, std::string &text)
+ int OnWhoisLine(User* user, User* dest, int &numeric, std::string &text)
{
/* We use this and not OnWhois because this triggers for remote, too */
if (numeric == 312)
@@ -144,11 +144,11 @@ class ModuleCustomTitle : public Module
}
// Whenever the linking module wants to send out data, but doesnt know what the data
- // represents (e.g. it is metadata, added to a userrec or chanrec by a module) then
+ // represents (e.g. it is metadata, added to a User or Channel by a module) then
// this method is called. We should use the ProtoSendMetaData function after we've
// corrected decided how the data should look, to send the metadata on its way if
// it is ours.
- virtual void OnSyncUserMetaData(userrec* user, Module* proto, void* opaque, const std::string &extname, bool displayable)
+ virtual void OnSyncUserMetaData(User* user, Module* proto, void* opaque, const std::string &extname, bool displayable)
{
// check if the linking module wants to know about OUR metadata
if (extname == "ctitle")
@@ -166,7 +166,7 @@ class ModuleCustomTitle : public Module
}
// when a user quits, tidy up their metadata
- virtual void OnUserQuit(userrec* user, const std::string &message, const std::string &oper_message)
+ virtual void OnUserQuit(User* user, const std::string &message, const std::string &oper_message)
{
std::string* ctitle;
user->GetExt("ctitle", ctitle);
@@ -182,7 +182,7 @@ class ModuleCustomTitle : public Module
{
if (target_type == TYPE_USER)
{
- userrec* user = (userrec*)item;
+ User* user = (User*)item;
std::string* ctitle;
user->GetExt("ctitle", ctitle);
if (ctitle)
@@ -205,7 +205,7 @@ class ModuleCustomTitle : public Module
// check if its our metadata key, and its associated with a user
if ((target_type == TYPE_USER) && (extname == "ctitle"))
{
- userrec* dest = (userrec*)target;
+ User* dest = (User*)target;
// if they dont already have an ctitle field, accept the remote server's
std::string* text;
if (!dest->GetExt("ctitle", text))
diff --git a/src/modules/m_cycle.cpp b/src/modules/m_cycle.cpp
index 06361c692..554bcd17d 100644
--- a/src/modules/m_cycle.cpp
+++ b/src/modules/m_cycle.cpp
@@ -27,9 +27,9 @@ class cmd_cycle : public Command
TRANSLATE3(TR_TEXT, TR_TEXT, TR_END);
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
- chanrec* channel = ServerInstance->FindChan(parameters[0]);
+ Channel* channel = ServerInstance->FindChan(parameters[0]);
std::string reason = ConvToStr("Cycling");
if (pcnt > 1)
@@ -58,11 +58,11 @@ class cmd_cycle : public Command
return CMD_FAILURE;
}
- /* XXX in the future, this may move to a static chanrec method (the delete.) -- w00t */
+ /* XXX in the future, this may move to a static Channel method (the delete.) -- w00t */
if (!channel->PartUser(user, reason.c_str()))
delete channel;
- chanrec::JoinUser(ServerInstance, user, parameters[0], true, "", ServerInstance->Time(true));
+ Channel::JoinUser(ServerInstance, user, parameters[0], true, "", ServerInstance->Time(true));
}
return CMD_LOCALONLY;
diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp
index 7ddce8ab0..ebd3b8630 100644
--- a/src/modules/m_dccallow.cpp
+++ b/src/modules/m_dccallow.cpp
@@ -37,7 +37,7 @@ class DCCAllow
DCCAllow(const std::string &nick, const std::string &hm, const time_t so, const long ln) : nickname(nick), hostmask(hm), set_on(so), length(ln) { }
};
-typedef std::vector<userrec *> userlist;
+typedef std::vector<User *> userlist;
userlist ul;
typedef std::vector<DCCAllow> dccallowlist;
dccallowlist* dl;
@@ -54,7 +54,7 @@ class cmd_dccallow : public Command
/* XXX we need to fix this so it can work with translation stuff (i.e. move +- into a seperate param */
}
- CmdResult Handle(const char **parameters, int pcnt, userrec *user)
+ CmdResult Handle(const char **parameters, int pcnt, User *user)
{
/* syntax: DCCALLOW [+|-]<nick> (<time>) */
if (!pcnt)
@@ -85,7 +85,7 @@ class cmd_dccallow : public Command
}
std::string nick = parameters[0] + 1;
- userrec *target = ServerInstance->FindNick(nick);
+ User *target = ServerInstance->FindNick(nick);
if (target)
{
@@ -118,7 +118,7 @@ class cmd_dccallow : public Command
// remove from userlist
for (userlist::iterator j = ul.begin(); j != ul.end(); ++j)
{
- userrec* u = (userrec*)(*j);
+ User* u = (User*)(*j);
if (u == user)
{
ul.erase(j);
@@ -200,7 +200,7 @@ class cmd_dccallow : public Command
return CMD_FAILURE;
}
- void DisplayHelp(userrec* user)
+ void DisplayHelp(User* user)
{
user->WriteServ("998 %s :DCCALLOW [<+|->nick [time]] [list] [help]", user->nick);
user->WriteServ("998 %s :You may allow DCCs from specific users by specifying a", user->nick);
@@ -224,7 +224,7 @@ class cmd_dccallow : public Command
user->WriteServ("999 %s :End of DCCALLOW HELP", user->nick);
}
- void DisplayDCCAllowList(userrec* user)
+ void DisplayDCCAllowList(User* user)
{
// display current DCCALLOW list
user->WriteServ("990 %s :Users on your DCCALLOW list:", user->nick);
@@ -262,13 +262,13 @@ class ModuleDCCAllow : public Module
List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = List[I_OnUserQuit] = List[I_OnUserPreNick] = List[I_OnRehash] = 1;
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
delete Conf;
Conf = new ConfigReader(ServerInstance);
}
- virtual void OnUserQuit(userrec* user, const std::string &reason, const std::string &oper_message)
+ virtual void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message)
{
dccallowlist* dl;
@@ -287,25 +287,25 @@ class ModuleDCCAllow : public Module
}
- virtual int OnUserPreNick(userrec* user, const std::string &newnick)
+ virtual int OnUserPreNick(User* user, const std::string &newnick)
{
RemoveNick(user);
return 0;
}
- virtual int OnUserPreMessage(userrec* user, void* dest, int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreMessage(User* user, void* dest, int target_type, std::string &text, char status, CUList &exempt_list)
{
return OnUserPreNotice(user, dest, target_type, text, status, exempt_list);
}
- virtual int OnUserPreNotice(userrec* user, void* dest, int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreNotice(User* user, void* dest, int target_type, std::string &text, char status, CUList &exempt_list)
{
if (!IS_LOCAL(user))
return 0;
if (target_type == TYPE_USER)
{
- userrec* u = (userrec*)dest;
+ User* u = (User*)dest;
/* Always allow a user to dcc themselves (although... why?) */
if (user == u)
@@ -384,7 +384,7 @@ class ModuleDCCAllow : public Module
{
for (userlist::iterator iter = ul.begin(); iter != ul.end(); ++iter)
{
- userrec* u = (userrec*)(*iter);
+ User* u = (User*)(*iter);
u->GetExt("dccallow_list", dl);
if (dl)
@@ -413,12 +413,12 @@ class ModuleDCCAllow : public Module
}
}
- void RemoveNick(userrec* user)
+ void RemoveNick(User* user)
{
/* Iterate through all DCCALLOW lists and remove user */
for (userlist::iterator iter = ul.begin(); iter != ul.end(); ++iter)
{
- userrec *u = (userrec*)(*iter);
+ User *u = (User*)(*iter);
u->GetExt("dccallow_list", dl);
if (dl)
@@ -445,12 +445,12 @@ class ModuleDCCAllow : public Module
}
}
- void RemoveFromUserlist(userrec *user)
+ void RemoveFromUserlist(User *user)
{
// remove user from userlist
for (userlist::iterator j = ul.begin(); j != ul.end(); ++j)
{
- userrec* u = (userrec*)(*j);
+ User* u = (User*)(*j);
if (u == user)
{
ul.erase(j);
diff --git a/src/modules/m_deaf.cpp b/src/modules/m_deaf.cpp
index 1689f843c..ced6adece 100644
--- a/src/modules/m_deaf.cpp
+++ b/src/modules/m_deaf.cpp
@@ -25,7 +25,7 @@ class User_d : public ModeHandler
public:
User_d(InspIRCd* Instance) : ModeHandler(Instance, 'd', 0, 0, false, MODETYPE_USER, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (adding)
{
@@ -71,7 +71,7 @@ class ModuleDeaf : public Module
List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = List[I_OnRehash] = List[I_OnBuildExemptList] = 1;
}
- virtual void OnRehash(userrec* user, const std::string&)
+ virtual void OnRehash(User* user, const std::string&)
{
ConfigReader* conf = new ConfigReader(ServerInstance);
deaf_bypasschars = conf->ReadValue("deaf", "bypasschars", 0);
@@ -80,11 +80,11 @@ class ModuleDeaf : public Module
DELETE(conf);
}
- virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
if (target_type == TYPE_CHANNEL)
{
- chanrec* chan = (chanrec*)dest;
+ Channel* chan = (Channel*)dest;
if (chan)
this->BuildDeafList(MSG_NOTICE, chan, user, status, text, exempt_list);
}
@@ -92,11 +92,11 @@ class ModuleDeaf : public Module
return 0;
}
- virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
if (target_type == TYPE_CHANNEL)
{
- chanrec* chan = (chanrec*)dest;
+ Channel* chan = (Channel*)dest;
if (chan)
this->BuildDeafList(MSG_PRIVMSG, chan, user, status, text, exempt_list);
}
@@ -104,12 +104,12 @@ class ModuleDeaf : public Module
return 0;
}
- virtual void OnBuildExemptList(MessageType message_type, chanrec* chan, userrec* sender, char status, CUList &exempt_list, const std::string &text)
+ virtual void OnBuildExemptList(MessageType message_type, Channel* chan, User* sender, char status, CUList &exempt_list, const std::string &text)
{
BuildDeafList(message_type, chan, sender, status, text, exempt_list);
}
- virtual void BuildDeafList(MessageType message_type, chanrec* chan, userrec* sender, char status, const std::string &text, CUList &exempt_list)
+ virtual void BuildDeafList(MessageType message_type, Channel* chan, User* sender, char status, const std::string &text, CUList &exempt_list)
{
CUList *ulist;
bool is_a_uline;
diff --git a/src/modules/m_denychans.cpp b/src/modules/m_denychans.cpp
index 1b72c52c3..d345570c0 100644
--- a/src/modules/m_denychans.cpp
+++ b/src/modules/m_denychans.cpp
@@ -30,7 +30,7 @@ class ModuleDenyChannels : public Module
Conf = new ConfigReader(ServerInstance);
}
- virtual void OnRehash(userrec* user, const std::string &param)
+ virtual void OnRehash(User* user, const std::string &param)
{
DELETE(Conf);
Conf = new ConfigReader(ServerInstance);
@@ -51,7 +51,7 @@ class ModuleDenyChannels : public Module
List[I_OnUserPreJoin] = List[I_OnRehash] = 1;
}
- virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
{
for (int j =0; j < Conf->Enumerate("badchan"); j++)
{
diff --git a/src/modules/m_devoice.cpp b/src/modules/m_devoice.cpp
index 3056bdaff..553d3dfeb 100644
--- a/src/modules/m_devoice.cpp
+++ b/src/modules/m_devoice.cpp
@@ -32,9 +32,9 @@ class cmd_devoice : public Command
TRANSLATE2(TR_TEXT, TR_END);
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
- chanrec* c = ServerInstance->FindChan(parameters[0]);
+ Channel* c = ServerInstance->FindChan(parameters[0]);
if (c && c->HasUser(user))
{
const char* modes[3];
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp
index bfa511da2..c92a2c111 100644
--- a/src/modules/m_dnsbl.cpp
+++ b/src/modules/m_dnsbl.cpp
@@ -46,12 +46,12 @@ class DNSBLConfEntry
class DNSBLResolver : public Resolver
{
int theirfd;
- userrec* them;
+ User* them;
DNSBLConfEntry *ConfEntry;
public:
- DNSBLResolver(Module *me, InspIRCd *ServerInstance, const std::string &hostname, userrec* u, int userfd, DNSBLConfEntry *conf, bool &cached)
+ DNSBLResolver(Module *me, InspIRCd *ServerInstance, const std::string &hostname, User* u, int userfd, DNSBLConfEntry *conf, bool &cached)
: Resolver(ServerInstance, hostname, DNS_QUERY_A, cached, me)
{
theirfd = userfd;
@@ -108,7 +108,7 @@ class DNSBLResolver : public Resolver
{
case DNSBLConfEntry::I_KILL:
{
- userrec::QuitUser(ServerInstance, them, std::string("Killed (") + reason + ")");
+ User::QuitUser(ServerInstance, them, std::string("Killed (") + reason + ")");
break;
}
case DNSBLConfEntry::I_KLINE:
@@ -290,12 +290,12 @@ class ModuleDNSBL : public Module
delete MyConf;
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
ReadConf();
}
- virtual int OnUserRegister(userrec* user)
+ virtual int OnUserRegister(User* user)
{
/* only do lookups on local users */
if (IS_LOCAL(user))
@@ -354,7 +354,7 @@ class ModuleDNSBL : public Module
return 0;
}
- virtual int OnStats(char symbol, userrec* user, string_list &results)
+ virtual int OnStats(char symbol, User* user, string_list &results)
{
if (symbol != 'd')
return 0;
diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp
index 68ec48891..129bce276 100644
--- a/src/modules/m_filter.cpp
+++ b/src/modules/m_filter.cpp
@@ -35,7 +35,7 @@ class ModuleFilter : public FilterBase
{
}
- virtual FilterResult* FilterMatch(userrec* user, const std::string &text, int flags)
+ virtual FilterResult* FilterMatch(User* user, const std::string &text, int flags)
{
for (filter_t::iterator index = filters.begin(); index != filters.end(); index++)
{
@@ -91,7 +91,7 @@ class ModuleFilter : public FilterBase
}
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
ConfigReader* MyConf = new ConfigReader(ServerInstance);
@@ -114,7 +114,7 @@ class ModuleFilter : public FilterBase
DELETE(MyConf);
}
- virtual int OnStats(char symbol, userrec* user, string_list &results)
+ virtual int OnStats(char symbol, User* user, string_list &results)
{
if (symbol == 's')
{
diff --git a/src/modules/m_filter.h b/src/modules/m_filter.h
index e0faafc98..941576f79 100644
--- a/src/modules/m_filter.h
+++ b/src/modules/m_filter.h
@@ -98,22 +98,22 @@ class FilterBase : public Module
FilterBase(InspIRCd* Me, const std::string &source);
virtual ~FilterBase();
virtual void Implements(char* List);
- virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list);
- virtual FilterResult* FilterMatch(userrec* user, const std::string &text, int flags) = 0;
+ virtual int OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list);
+ virtual FilterResult* FilterMatch(User* user, const std::string &text, int flags) = 0;
virtual bool DeleteFilter(const std::string &freeform) = 0;
virtual void SyncFilters(Module* proto, void* opaque) = 0;
virtual void SendFilter(Module* proto, void* opaque, FilterResult* iter);
virtual std::pair<bool, std::string> AddFilter(const std::string &freeform, const std::string &type, const std::string &reason, long duration, const std::string &flags) = 0;
- virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list);
- virtual void OnRehash(userrec* user, const std::string &parameter);
+ virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list);
+ virtual void OnRehash(User* user, const std::string &parameter);
virtual Version GetVersion();
std::string EncodeFilter(FilterResult* filter);
FilterResult DecodeFilter(const std::string &data);
virtual void OnSyncOtherMetaData(Module* proto, void* opaque, bool displayable = false);
virtual void OnDecodeMetaData(int target_type, void* target, const std::string &extname, const std::string &extdata);
- virtual int OnStats(char symbol, userrec* user, string_list &results) = 0;
- virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated, const std::string &original_line);
- bool AppliesToMe(userrec* user, FilterResult* filter, int flags);
+ virtual int OnStats(char symbol, User* user, string_list &results) = 0;
+ virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line);
+ bool AppliesToMe(User* user, FilterResult* filter, int flags);
};
class cmd_filter : public Command
@@ -126,7 +126,7 @@ class cmd_filter : public Command
this->syntax = "<filter-definition> <type> <flags> [<gline-duration>] :<reason>";
}
- CmdResult Handle(const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle(const char** parameters, int pcnt, User *user)
{
if (pcnt == 1)
{
@@ -200,13 +200,13 @@ class cmd_filter : public Command
}
}
- void TooFewParams(userrec* user, const std::string &extra_text)
+ void TooFewParams(User* user, const std::string &extra_text)
{
user->WriteServ("NOTICE %s :*** Not enough parameters%s", user->nick, extra_text.c_str());
}
};
-bool FilterBase::AppliesToMe(userrec* user, FilterResult* filter, int flags)
+bool FilterBase::AppliesToMe(User* user, FilterResult* filter, int flags)
{
if ((filter->flag_no_opers) && IS_OPER(user))
return false;
@@ -236,13 +236,13 @@ void FilterBase::Implements(char* List)
List[I_OnPreCommand] = List[I_OnStats] = List[I_OnSyncOtherMetaData] = List[I_OnDecodeMetaData] = List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = List[I_OnRehash] = 1;
}
-int FilterBase::OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+int FilterBase::OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
flags = FLAG_PRIVMSG;
return OnUserPreNotice(user,dest,target_type,text,status,exempt_list);
}
-int FilterBase::OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+int FilterBase::OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
if (!flags)
flags = FLAG_NOTICE;
@@ -257,12 +257,12 @@ int FilterBase::OnUserPreNotice(userrec* user,void* dest,int target_type, std::s
std::string target = "";
if (target_type == TYPE_USER)
{
- userrec* t = (userrec*)dest;
+ User* t = (User*)dest;
target = std::string(t->nick);
}
else if (target_type == TYPE_CHANNEL)
{
- chanrec* t = (chanrec*)dest;
+ Channel* t = (Channel*)dest;
target = std::string(t->name);
}
if (f->action == "block")
@@ -276,7 +276,7 @@ int FilterBase::OnUserPreNotice(userrec* user,void* dest,int target_type, std::s
}
if (f->action == "kill")
{
- userrec::QuitUser(ServerInstance,user,"Filtered: "+f->reason);
+ User::QuitUser(ServerInstance,user,"Filtered: "+f->reason);
}
if (f->action == "gline")
{
@@ -293,7 +293,7 @@ int FilterBase::OnUserPreNotice(userrec* user,void* dest,int target_type, std::s
return 0;
}
-int FilterBase::OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated, const std::string &original_line)
+int FilterBase::OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line)
{
flags = 0;
if ((validated == 1) && (IS_LOCAL(user)))
@@ -360,7 +360,7 @@ int FilterBase::OnPreCommand(const std::string &command, const char** parameters
if ((parting) && (f->action == "kill"))
{
user->WriteServ("NOTICE %s :*** Your PART message was filtered: %s", user->nick, f->reason.c_str());
- userrec::QuitUser(ServerInstance, user, "Filtered: " + f->reason);
+ User::QuitUser(ServerInstance, user, "Filtered: " + f->reason);
}
if (f->action == "gline")
{
@@ -382,7 +382,7 @@ int FilterBase::OnPreCommand(const std::string &command, const char** parameters
return 0;
}
-void FilterBase::OnRehash(userrec* user, const std::string &parameter)
+void FilterBase::OnRehash(User* user, const std::string &parameter)
{
}
diff --git a/src/modules/m_foobar.cpp b/src/modules/m_foobar.cpp
index b086eb345..91afe9df7 100644
--- a/src/modules/m_foobar.cpp
+++ b/src/modules/m_foobar.cpp
@@ -54,7 +54,7 @@ class ModuleFoobar : public Module
List[I_OnUserConnect] = List[I_OnUserQuit] = List[I_OnUserJoin] = List[I_OnUserPart] = 1;
}
- virtual void OnUserConnect(userrec* user)
+ virtual void OnUserConnect(User* user)
{
// method called when a user connects
@@ -62,7 +62,7 @@ class ModuleFoobar : public Module
ServerInstance->Log(DEBUG,"Foobar: User connecting: "+b);
}
- virtual void OnUserQuit(userrec* user, const std::string &reason, const std::string &oper_message)
+ virtual void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message)
{
// method called when a user disconnects
@@ -70,7 +70,7 @@ class ModuleFoobar : public Module
ServerInstance->Log(DEBUG,"Foobar: User quitting: "+b);
}
- virtual void OnUserJoin(userrec* user, chanrec* channel, bool &silent)
+ virtual void OnUserJoin(User* user, Channel* channel, bool &silent)
{
// method called when a user joins a channel
@@ -79,7 +79,7 @@ class ModuleFoobar : public Module
ServerInstance->Log(DEBUG,"Foobar: User "+b+" joined "+c);
}
- virtual void OnUserPart(userrec* user, chanrec* channel, const std::string &partreason, bool &silent)
+ virtual void OnUserPart(User* user, Channel* channel, const std::string &partreason, bool &silent)
{
// method called when a user parts a channel
diff --git a/src/modules/m_globalload.cpp b/src/modules/m_globalload.cpp
index 0e7ff2e6d..df439b989 100644
--- a/src/modules/m_globalload.cpp
+++ b/src/modules/m_globalload.cpp
@@ -27,7 +27,7 @@ class cmd_gloadmodule : public Command
TRANSLATE3(TR_TEXT, TR_TEXT, TR_END);
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
std::string servername = pcnt > 1 ? parameters[1] : "*";
@@ -61,7 +61,7 @@ class cmd_gunloadmodule : public Command
syntax = "<modulename> [servermask]";
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
std::string servername = pcnt > 1 ? parameters[1] : "*";
@@ -95,7 +95,7 @@ class cmd_greloadmodule : public Command
syntax = "<modulename> [servermask]";
}
- CmdResult Handle(const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle(const char** parameters, int pcnt, User *user)
{
std::string servername = pcnt > 1 ? parameters[1] : "*";
diff --git a/src/modules/m_globops.cpp b/src/modules/m_globops.cpp
index 1d870a7c2..b95f455dc 100644
--- a/src/modules/m_globops.cpp
+++ b/src/modules/m_globops.cpp
@@ -29,7 +29,7 @@ class cmd_globops : public Command
TRANSLATE2(TR_TEXT, TR_END);
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
std::string line = "From " + std::string(user->nick) + ": ";
for (int i = 0; i < pcnt; i++)
diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp
index 86866f7fb..a2a64cc26 100644
--- a/src/modules/m_helpop.cpp
+++ b/src/modules/m_helpop.cpp
@@ -24,7 +24,7 @@ class Helpop : public ModeHandler
public:
Helpop(InspIRCd* Instance) : ModeHandler(Instance, 'h', 0, 0, false, MODETYPE_USER, true) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (adding)
{
@@ -58,7 +58,7 @@ class cmd_helpop : public Command
syntax = "<any-text>";
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
irc::string parameter("start");
if (pcnt > 0)
@@ -158,12 +158,12 @@ class ModuleHelpop : public Module
List[I_OnRehash] = List[I_OnWhois] = 1;
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
ReadConfig();
}
- virtual void OnWhois(userrec* src, userrec* dst)
+ virtual void OnWhois(User* src, User* dst)
{
if (dst->IsModeSet('h'))
{
diff --git a/src/modules/m_hidechans.cpp b/src/modules/m_hidechans.cpp
index 8d2c6b4eb..2637968a9 100644
--- a/src/modules/m_hidechans.cpp
+++ b/src/modules/m_hidechans.cpp
@@ -22,7 +22,7 @@ class HideChans : public ModeHandler
public:
HideChans(InspIRCd* Instance) : ModeHandler(Instance, 'I', 0, 0, false, MODETYPE_USER, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
/* Only opers can change other users modes */
if (source != dest)
@@ -79,7 +79,7 @@ class ModuleHideChans : public Module
return Version(1,1,0,0,VF_COMMON|VF_VENDOR,API_VERSION);
}
- int OnWhoisLine(userrec* user, userrec* dest, int &numeric, std::string &text)
+ int OnWhoisLine(User* user, User* dest, int &numeric, std::string &text)
{
/* Dont display channels if they have +I set and the
* person doing the WHOIS is not an oper
diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp
index 1e4f7ae85..fd39cde0f 100644
--- a/src/modules/m_hideoper.cpp
+++ b/src/modules/m_hideoper.cpp
@@ -22,7 +22,7 @@ class HideOper : public ModeHandler
public:
HideOper(InspIRCd* Instance) : ModeHandler(Instance, 'H', 0, 0, false, MODETYPE_USER, true) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (source != dest)
return MODEACTION_DENY;
@@ -78,7 +78,7 @@ class ModuleHideOper : public Module
return Version(1,1,0,0,VF_COMMON|VF_VENDOR,API_VERSION);
}
- int OnWhoisLine(userrec* user, userrec* dest, int &numeric, std::string &text)
+ int OnWhoisLine(User* user, User* dest, int &numeric, std::string &text)
{
/* Dont display numeric 313 (RPL_WHOISOPER) if they have +H set and the
* person doing the WHOIS is not an oper
diff --git a/src/modules/m_hostchange.cpp b/src/modules/m_hostchange.cpp
index 327732651..17c597e71 100644
--- a/src/modules/m_hostchange.cpp
+++ b/src/modules/m_hostchange.cpp
@@ -62,7 +62,7 @@ class ModuleHostChange : public Module
List[I_OnRehash] = List[I_OnUserConnect] = 1;
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
ConfigReader Conf(ServerInstance);
MySuffix = Conf.ReadValue("host","suffix",0);
@@ -94,7 +94,7 @@ class ModuleHostChange : public Module
return Version(1,1,0,1,VF_VENDOR,API_VERSION);
}
- virtual void OnUserConnect(userrec* user)
+ virtual void OnUserConnect(User* user)
{
for (hostchanges_t::iterator i = hostchanges.begin(); i != hostchanges.end(); i++)
{
diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp
index 445af1826..2d022ad30 100644
--- a/src/modules/m_httpd_stats.cpp
+++ b/src/modules/m_httpd_stats.cpp
@@ -137,7 +137,7 @@ class ModuleHttpStats : public Module
for (SortedIter a = so->begin(); a != so->end(); a++)
{
- chanrec* c = ServerInstance->FindChan(a->second.c_str());
+ Channel* c = ServerInstance->FindChan(a->second.c_str());
if (c && !c->IsModeSet('s') && !c->IsModeSet('p'))
{
data << "<channel>";
@@ -176,7 +176,7 @@ class ModuleHttpStats : public Module
}
}
- void OnChannelDelete(chanrec* chan)
+ void OnChannelDelete(Channel* chan)
{
StatsIter a = sh->find(chan->name);
if (a != sh->end())
@@ -186,7 +186,7 @@ class ModuleHttpStats : public Module
this->changed = true;
}
- void OnUserJoin(userrec* user, chanrec* channel, bool &silent)
+ void OnUserJoin(User* user, Channel* channel, bool &silent)
{
StatsIter a = sh->find(channel->name);
if (a != sh->end())
@@ -201,7 +201,7 @@ class ModuleHttpStats : public Module
this->changed = true;
}
- void OnUserPart(userrec* user, chanrec* channel, const std::string &partmessage, bool &silent)
+ void OnUserPart(User* user, Channel* channel, const std::string &partmessage, bool &silent)
{
StatsIter a = sh->find(channel->name);
if (a != sh->end())
@@ -211,11 +211,11 @@ class ModuleHttpStats : public Module
this->changed = true;
}
- void OnUserQuit(userrec* user, const std::string &message, const std::string &oper_message)
+ void OnUserQuit(User* user, const std::string &message, const std::string &oper_message)
{
for (UCListIter v = user->chans.begin(); v != user->chans.end(); v++)
{
- chanrec* c = v->first;
+ Channel* c = v->first;
StatsIter a = sh->find(c->name);
if (a != sh->end())
{
diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp
index 6f0f3b557..5e7e6ccd0 100644
--- a/src/modules/m_ident.cpp
+++ b/src/modules/m_ident.cpp
@@ -21,10 +21,10 @@
class IdentRequestSocket : public InspSocket
{
private:
- userrec *user;
+ User *user;
int original_fd;
public:
- IdentRequestSocket(InspIRCd *Server, userrec *user, int timeout, const std::string &bindip)
+ IdentRequestSocket(InspIRCd *Server, User *user, int timeout, const std::string &bindip)
: InspSocket(Server, user->GetIPString(), 113, false, timeout, bindip), user(user)
{
original_fd = user->GetFd();
@@ -210,7 +210,7 @@ class ModuleIdent : public Module
List[I_OnRehash] = List[I_OnUserRegister] = List[I_OnCheckReady] = List[I_OnCleanup] = List[I_OnUserDisconnect] = 1;
}
- virtual void OnRehash(userrec *user, const std::string &param)
+ virtual void OnRehash(User *user, const std::string &param)
{
ConfigReader MyConf(ServerInstance);
@@ -219,9 +219,9 @@ class ModuleIdent : public Module
RequestTimeout = 5;
}
- virtual int OnUserRegister(userrec *user)
+ virtual int OnUserRegister(User *user)
{
- /* userrec::ident is currently the username field from USER; with m_ident loaded, that
+ /* User::ident is currently the username field from USER; with m_ident loaded, that
* should be preceded by a ~. The field is actually IDENTMAX+2 characters wide. */
memmove(user->ident + 1, user->ident, IDENTMAX);
user->ident[0] = '~';
@@ -263,7 +263,7 @@ class ModuleIdent : public Module
return 0;
}
- virtual bool OnCheckReady(userrec *user)
+ virtual bool OnCheckReady(User *user)
{
return (!user->GetExt("ident_socket"));
}
@@ -273,7 +273,7 @@ class ModuleIdent : public Module
if (target_type == TYPE_USER)
{
IdentRequestSocket *isock;
- userrec *user = (userrec*)item;
+ User *user = (User*)item;
if (user->GetExt("ident_socket", isock))
{
int *fd;
@@ -293,7 +293,7 @@ class ModuleIdent : public Module
}
}
- virtual void OnUserDisconnect(userrec *user)
+ virtual void OnUserDisconnect(User *user)
{
IdentRequestSocket *isock;
if (user->GetExt("ident_socket", isock))
diff --git a/src/modules/m_invisible.cpp b/src/modules/m_invisible.cpp
index 47e9f595c..2ec8439cf 100644
--- a/src/modules/m_invisible.cpp
+++ b/src/modules/m_invisible.cpp
@@ -29,7 +29,7 @@ class QuietOper : public VisData
{
}
- virtual bool VisibleTo(userrec* user)
+ virtual bool VisibleTo(User* user)
{
return IS_OPER(user);
}
@@ -53,7 +53,7 @@ class InvisibleMode : public ModeHandler
delete qo;
}
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (source != dest)
return MODEACTION_DENY;
@@ -135,7 +135,7 @@ class InvisibleDeOper : public ModeWatcher
{
}
- bool BeforeMode(userrec* source, userrec* dest, chanrec* channel, std::string &param, bool adding, ModeType type)
+ bool BeforeMode(User* source, User* dest, Channel* channel, std::string &param, bool adding, ModeType type)
{
/* Users who are opers and have +Q get their +Q removed when they deoper */
if ((!adding) && (dest->IsModeSet('Q')))
@@ -188,7 +188,7 @@ class ModuleInvisible : public Module
List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = List[I_OnUserJoin] = List[I_OnUserPart] = List[I_OnUserQuit] = List[I_OnRehash] = 1;
}
- virtual void OnUserJoin(userrec* user, chanrec* channel, bool &silent)
+ virtual void OnUserJoin(User* user, Channel* channel, bool &silent)
{
if (user->IsModeSet('Q'))
{
@@ -199,13 +199,13 @@ class ModuleInvisible : public Module
}
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
DELETE(conf);
conf = new ConfigReader(ServerInstance);
}
- void OnUserPart(userrec* user, chanrec* channel, const std::string &partmessage, bool &silent)
+ void OnUserPart(User* user, Channel* channel, const std::string &partmessage, bool &silent)
{
if (user->IsModeSet('Q'))
{
@@ -217,7 +217,7 @@ class ModuleInvisible : public Module
}
}
- void OnUserQuit(userrec* user, const std::string &reason, const std::string &oper_message)
+ void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message)
{
if (user->IsModeSet('Q'))
{
@@ -240,11 +240,11 @@ class ModuleInvisible : public Module
}
/* No privmsg response when hiding - submitted by Eric at neowin */
- virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
if ((target_type == TYPE_USER) && (IS_LOCAL(user)))
{
- userrec* target = (userrec*)dest;
+ User* target = (User*)dest;
if(target->IsModeSet('Q') && !*user->oper)
{
user->WriteServ("401 %s %s :No such nick/channel",user->nick, target->nick);
@@ -254,13 +254,13 @@ class ModuleInvisible : public Module
return 0;
}
- virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
return OnUserPreNotice(user, dest, target_type, text, status, exempt_list);
}
/* Fix by Eric @ neowin.net, thanks :) -- Brain */
- void WriteCommonFrom(userrec *user, chanrec* channel, const char* text, ...)
+ void WriteCommonFrom(User *user, Channel* channel, const char* text, ...)
{
va_list argsPtr;
char textbuffer[MAXBUF];
diff --git a/src/modules/m_inviteexception.cpp b/src/modules/m_inviteexception.cpp
index c689af320..7e1267995 100644
--- a/src/modules/m_inviteexception.cpp
+++ b/src/modules/m_inviteexception.cpp
@@ -60,7 +60,7 @@ public:
output.append(" INVEX=I");
}
- virtual int OnCheckInvite(userrec* user, chanrec* chan)
+ virtual int OnCheckInvite(User* user, Channel* chan)
{
if(chan != NULL)
{
@@ -115,17 +115,17 @@ public:
ie->DoCleanup(target_type, item);
}
- virtual void OnSyncChannel(chanrec* chan, Module* proto, void* opaque)
+ virtual void OnSyncChannel(Channel* chan, Module* proto, void* opaque)
{
ie->DoSyncChannel(chan, proto, opaque);
}
- virtual void OnChannelDelete(chanrec* chan)
+ virtual void OnChannelDelete(Channel* chan)
{
ie->DoChannelDelete(chan);
}
- virtual void OnRehash(userrec* user, const std::string &param)
+ virtual void OnRehash(User* user, const std::string &param)
{
ie->DoRehash();
}
diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp
index 72d79361b..6840e155c 100644
--- a/src/modules/m_joinflood.cpp
+++ b/src/modules/m_joinflood.cpp
@@ -90,7 +90,7 @@ class JoinFlood : public ModeHandler
public:
JoinFlood(InspIRCd* Instance) : ModeHandler(Instance, 'j', 1, 0, false, MODETYPE_CHANNEL, false) { }
- ModePair ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter)
+ ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter)
{
joinfloodsettings* x;
if (channel->GetExt("joinflood",x))
@@ -99,13 +99,13 @@ class JoinFlood : public ModeHandler
return std::make_pair(false, parameter);
}
- bool CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, chanrec* channel)
+ bool CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, Channel* channel)
{
/* When TS is equal, the alphabetically later one wins */
return (their_param < our_param);
}
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
joinfloodsettings* dummy;
@@ -220,7 +220,7 @@ class ModuleJoinFlood : public Module
throw ModuleException("Could not add new modes!");
}
- virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
{
if (chan)
{
@@ -237,7 +237,7 @@ class ModuleJoinFlood : public Module
return 0;
}
- virtual void OnUserJoin(userrec* user, chanrec* channel, bool &silent)
+ virtual void OnUserJoin(User* user, Channel* channel, bool &silent)
{
joinfloodsettings *f;
if (channel->GetExt("joinflood",f))
@@ -252,7 +252,7 @@ class ModuleJoinFlood : public Module
}
}
- void OnChannelDelete(chanrec* chan)
+ void OnChannelDelete(Channel* chan)
{
joinfloodsettings *f;
if (chan->GetExt("joinflood",f))
diff --git a/src/modules/m_jumpserver.cpp b/src/modules/m_jumpserver.cpp
index 600b8f70f..94367f696 100644
--- a/src/modules/m_jumpserver.cpp
+++ b/src/modules/m_jumpserver.cpp
@@ -37,7 +37,7 @@ class cmd_jumpserver : public Command
redirect_all_immediately = redirect_new_users = false;
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
int n_done = 0;
reason = (pcnt < 4) ? "Please use this server/port instead" : parameters[3];
@@ -84,13 +84,13 @@ class cmd_jumpserver : public Command
if (redirect_all_immediately)
{
/* Redirect everyone but the oper sending the command */
- for (std::vector<userrec*>::const_iterator i = ServerInstance->local_users.begin(); i != ServerInstance->local_users.end(); i++)
+ for (std::vector<User*>::const_iterator i = ServerInstance->local_users.begin(); i != ServerInstance->local_users.end(); i++)
{
- userrec* t = *i;
+ User* t = *i;
if (!IS_OPER(t))
{
t->WriteServ("010 %s %s %s :Please use this Server/Port instead", user->nick, parameters[0], parameters[1]);
- userrec::QuitUser(ServerInstance, t, reason);
+ User::QuitUser(ServerInstance, t, reason);
n_done++;
}
}
@@ -135,12 +135,12 @@ class ModuleJumpServer : public Module
{
}
- virtual int OnUserRegister(userrec* user)
+ virtual int OnUserRegister(User* user)
{
if (js->port && js->redirect_new_users)
{
user->WriteServ("010 %s %s %d :Please use this Server/Port instead", user->nick, js->redirect_to.c_str(), js->port);
- userrec::QuitUser(ServerInstance, user, js->reason);
+ User::QuitUser(ServerInstance, user, js->reason);
return 0;
}
return 0;
diff --git a/src/modules/m_kicknorejoin.cpp b/src/modules/m_kicknorejoin.cpp
index 6a684206f..0096c1719 100644
--- a/src/modules/m_kicknorejoin.cpp
+++ b/src/modules/m_kicknorejoin.cpp
@@ -23,7 +23,7 @@ inline int strtoint(const std::string &str)
return result;
}
-typedef std::map<userrec*, time_t> delaylist;
+typedef std::map<User*, time_t> delaylist;
/** Handles channel mode +J
*/
@@ -32,7 +32,7 @@ class KickRejoin : public ModeHandler
public:
KickRejoin(InspIRCd* Instance) : ModeHandler(Instance, 'J', 1, 0, false, MODETYPE_CHANNEL, false) { }
- ModePair ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter)
+ ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter)
{
if (channel->IsModeSet('J'))
return std::make_pair(true, channel->GetModeParameter('J'));
@@ -40,13 +40,13 @@ class KickRejoin : public ModeHandler
return std::make_pair(false, parameter);
}
- bool CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, chanrec* channel)
+ bool CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, Channel* channel)
{
/* When TS is equal, the alphabetically later one wins */
return (their_param < our_param);
}
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (!adding)
{
@@ -128,14 +128,14 @@ public:
throw ModuleException("Could not add new modes!");
}
- virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
{
if (chan)
{
delaylist* dl;
if (chan->GetExt("norejoinusers", dl))
{
- std::vector<userrec*> itemstoremove;
+ std::vector<User*> itemstoremove;
for (delaylist::iterator iter = dl->begin(); iter != dl->end(); iter++)
{
@@ -168,7 +168,7 @@ public:
return 0;
}
- virtual void OnUserKick(userrec* source, userrec* user, chanrec* chan, const std::string &reason, bool &silent)
+ virtual void OnUserKick(User* source, User* user, Channel* chan, const std::string &reason, bool &silent)
{
if (chan->IsModeSet('J') && (source != user))
{
@@ -182,7 +182,7 @@ public:
}
}
- virtual void OnChannelDelete(chanrec* chan)
+ virtual void OnChannelDelete(Channel* chan)
{
delaylist* dl;
@@ -196,7 +196,7 @@ public:
virtual void OnCleanup(int target_type, void* item)
{
if(target_type == TYPE_CHANNEL)
- OnChannelDelete((chanrec*)item);
+ OnChannelDelete((Channel*)item);
}
virtual void Implements(char* List)
diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp
index fd8256641..f4a3335e6 100644
--- a/src/modules/m_knock.cpp
+++ b/src/modules/m_knock.cpp
@@ -27,9 +27,9 @@ class cmd_knock : public Command
TRANSLATE3(TR_TEXT, TR_TEXT, TR_END);
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
- chanrec* c = ServerInstance->FindChan(parameters[0]);
+ Channel* c = ServerInstance->FindChan(parameters[0]);
if (!c)
{
@@ -70,7 +70,7 @@ class Knock : public ModeHandler
public:
Knock(InspIRCd* Instance) : ModeHandler(Instance, 'K', 0, 0, false, MODETYPE_CHANNEL, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (adding)
{
diff --git a/src/modules/m_lockserv.cpp b/src/modules/m_lockserv.cpp
index a4b794050..f14e437ee 100644
--- a/src/modules/m_lockserv.cpp
+++ b/src/modules/m_lockserv.cpp
@@ -34,7 +34,7 @@ public:
syntax.clear();
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
locked = true;
user->WriteServ("988 %s %s :Closed for new connections", user->nick, user->server);
@@ -57,7 +57,7 @@ public:
syntax.clear();
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
locked = false;
user->WriteServ("989 %s %s :Open for new connections", user->nick, user->server);
@@ -99,22 +99,22 @@ public:
List[I_OnUserRegister] = List[I_OnRehash] = List[I_OnCheckReady] = 1;
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
ResetLocked();
}
- virtual int OnUserRegister(userrec* user)
+ virtual int OnUserRegister(User* user)
{
if (locked)
{
- userrec::QuitUser(ServerInstance, user, "Server is temporarily closed. Please try again later.");
+ User::QuitUser(ServerInstance, user, "Server is temporarily closed. Please try again later.");
return 1;
}
return 0;
}
- virtual bool OnCheckReady(userrec* user)
+ virtual bool OnCheckReady(User* user)
{
return !locked;
}
diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp
index 51e20fe7e..e7dd6e272 100644
--- a/src/modules/m_messageflood.cpp
+++ b/src/modules/m_messageflood.cpp
@@ -24,7 +24,7 @@ class floodsettings : public classbase
int secs;
int lines;
time_t reset;
- std::map<userrec*,int> counters;
+ std::map<User*,int> counters;
floodsettings() : ban(0), secs(0), lines(0) {};
floodsettings(bool a, int b, int c) : ban(a), secs(b), lines(c)
@@ -32,9 +32,9 @@ class floodsettings : public classbase
reset = time(NULL) + secs;
};
- void addmessage(userrec* who)
+ void addmessage(User* who)
{
- std::map<userrec*,int>::iterator iter = counters.find(who);
+ std::map<User*,int>::iterator iter = counters.find(who);
if (iter != counters.end())
{
iter->second++;
@@ -50,9 +50,9 @@ class floodsettings : public classbase
}
}
- bool shouldkick(userrec* who)
+ bool shouldkick(User* who)
{
- std::map<userrec*,int>::iterator iter = counters.find(who);
+ std::map<User*,int>::iterator iter = counters.find(who);
if (iter != counters.end())
{
return (iter->second >= this->lines);
@@ -60,9 +60,9 @@ class floodsettings : public classbase
else return false;
}
- void clear(userrec* who)
+ void clear(User* who)
{
- std::map<userrec*,int>::iterator iter = counters.find(who);
+ std::map<User*,int>::iterator iter = counters.find(who);
if (iter != counters.end())
{
counters.erase(iter);
@@ -77,7 +77,7 @@ class MsgFlood : public ModeHandler
public:
MsgFlood(InspIRCd* Instance) : ModeHandler(Instance, 'f', 1, 0, false, MODETYPE_CHANNEL, false) { }
- ModePair ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter)
+ ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter)
{
floodsettings* x;
if (channel->GetExt("flood",x))
@@ -86,13 +86,13 @@ class MsgFlood : public ModeHandler
return std::make_pair(false, parameter);
}
- bool CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, chanrec* channel)
+ bool CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, Channel* channel)
{
/* When TS is equal, the alphabetically later one wins */
return (their_param < our_param);
}
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
floodsettings *f;
@@ -213,7 +213,7 @@ class ModuleMsgFlood : public Module
throw ModuleException("Could not add new modes!");
}
- int ProcessMessages(userrec* user,chanrec* dest, const std::string &text)
+ int ProcessMessages(User* user,Channel* dest, const std::string &text)
{
if (!IS_LOCAL(user) || CHANOPS_EXEMPT(ServerInstance, 'f') && dest->GetStatus(user) == STATUS_OP)
{
@@ -261,23 +261,23 @@ class ModuleMsgFlood : public Module
return 0;
}
- virtual int OnUserPreMessage(userrec *user, void *dest, int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreMessage(User *user, void *dest, int target_type, std::string &text, char status, CUList &exempt_list)
{
if (target_type == TYPE_CHANNEL)
- return ProcessMessages(user,(chanrec*)dest,text);
+ return ProcessMessages(user,(Channel*)dest,text);
return 0;
}
- virtual int OnUserPreNotice(userrec *user, void *dest, int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreNotice(User *user, void *dest, int target_type, std::string &text, char status, CUList &exempt_list)
{
if (target_type == TYPE_CHANNEL)
- return ProcessMessages(user,(chanrec*)dest,text);
+ return ProcessMessages(user,(Channel*)dest,text);
return 0;
}
- void OnChannelDelete(chanrec* chan)
+ void OnChannelDelete(Channel* chan)
{
floodsettings* f;
if (chan->GetExt("flood", f))
diff --git a/src/modules/m_namesx.cpp b/src/modules/m_namesx.cpp
index e97ec8e1b..65fb6c6c2 100644
--- a/src/modules/m_namesx.cpp
+++ b/src/modules/m_namesx.cpp
@@ -35,7 +35,7 @@ class ModuleNamesX : public Module
{
}
- void OnSyncUserMetaData(userrec* user, Module* proto,void* opaque, const std::string &extname, bool displayable)
+ void OnSyncUserMetaData(User* user, Module* proto,void* opaque, const std::string &extname, bool displayable)
{
if ((displayable) && (extname == "NAMESX"))
proto->ProtoSendMetaData(opaque, TYPE_USER, user, extname, "Enabled");
@@ -51,7 +51,7 @@ class ModuleNamesX : public Module
output.append(" NAMESX");
}
- virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated, const std::string &original_line)
+ virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line)
{
irc::string c = command.c_str();
/* We don't actually create a proper command handler class for PROTOCTL,
@@ -70,7 +70,7 @@ class ModuleNamesX : public Module
return 0;
}
- virtual int OnUserList(userrec* user, chanrec* Ptr, CUList* &ulist)
+ virtual int OnUserList(User* user, Channel* Ptr, CUList* &ulist)
{
if (user->GetExt("NAMESX"))
{
diff --git a/src/modules/m_nickflood.cpp b/src/modules/m_nickflood.cpp
index e8e25fe52..cd9d76c5b 100644
--- a/src/modules/m_nickflood.cpp
+++ b/src/modules/m_nickflood.cpp
@@ -90,7 +90,7 @@ class NickFlood : public ModeHandler
public:
NickFlood(InspIRCd* Instance) : ModeHandler(Instance, 'F', 1, 0, false, MODETYPE_CHANNEL, false) { }
- ModePair ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter)
+ ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter)
{
nickfloodsettings* x;
if (channel->GetExt("nickflood",x))
@@ -99,13 +99,13 @@ class NickFlood : public ModeHandler
return std::make_pair(false, parameter);
}
- bool CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, chanrec* channel)
+ bool CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, Channel* channel)
{
/* When TS is equal, the alphabetically later one wins */
return (their_param < our_param);
}
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
nickfloodsettings* dummy;
@@ -219,14 +219,14 @@ class ModuleNickFlood : public Module
throw ModuleException("Could not add new modes!");
}
- virtual int OnUserPreNick(userrec* user, const std::string &newnick)
+ virtual int OnUserPreNick(User* user, const std::string &newnick)
{
if (isdigit(newnick[0])) /* allow switches to UID */
return 0;
for (UCListIter i = user->chans.begin(); i != user->chans.end(); i++)
{
- chanrec *channel = i->first;
+ Channel *channel = i->first;
nickfloodsettings *f;
if (channel->GetExt("nickflood", f))
@@ -254,7 +254,7 @@ class ModuleNickFlood : public Module
return 0;
}
- void OnChannelDelete(chanrec* chan)
+ void OnChannelDelete(Channel* chan)
{
nickfloodsettings *f;
if (chan->GetExt("nickflood",f))
diff --git a/src/modules/m_nicklock.cpp b/src/modules/m_nicklock.cpp
index e21ea9b90..c2c02f629 100644
--- a/src/modules/m_nicklock.cpp
+++ b/src/modules/m_nicklock.cpp
@@ -28,9 +28,9 @@ class cmd_nicklock : public Command
TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
}
- CmdResult Handle(const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle(const char** parameters, int pcnt, User *user)
{
- userrec* source = ServerInstance->FindNick(parameters[0]);
+ User* source = ServerInstance->FindNick(parameters[0]);
irc::string server;
irc::string me;
@@ -59,7 +59,7 @@ class cmd_nicklock : public Command
if (!source->ForceNickChange(parameters[1]))
{
// ugh, nickchange failed for some reason -- possibly existing nick?
- userrec::QuitUser(ServerInstance, source, "Nickname collision");
+ User::QuitUser(ServerInstance, source, "Nickname collision");
}
// give them a lock flag
@@ -81,9 +81,9 @@ class cmd_nickunlock : public Command
syntax = "<locked-nick>";
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
- userrec* source = ServerInstance->FindNick(parameters[0]);
+ User* source = ServerInstance->FindNick(parameters[0]);
if (source)
{
source->Shrink("nick_locked");
@@ -127,7 +127,7 @@ class ModuleNickLock : public Module
List[I_OnUserPreNick] = List[I_OnUserQuit] = List[I_OnCleanup] = 1;
}
- virtual int OnUserPreNick(userrec* user, const std::string &newnick)
+ virtual int OnUserPreNick(User* user, const std::string &newnick)
{
if (isdigit(newnick[0])) /* allow a switch to a UID */
return 0;
@@ -140,7 +140,7 @@ class ModuleNickLock : public Module
return 0;
}
- virtual void OnUserQuit(userrec* user, const std::string &reason, const std::string &oper_message)
+ virtual void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message)
{
user->Shrink("nick_locked");
}
@@ -149,7 +149,7 @@ class ModuleNickLock : public Module
{
if(target_type == TYPE_USER)
{
- userrec* user = (userrec*)item;
+ User* user = (User*)item;
user->Shrink("nick_locked");
}
}
diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp
index b2d15f9d7..cb11dd5ad 100644
--- a/src/modules/m_noctcp.cpp
+++ b/src/modules/m_noctcp.cpp
@@ -20,7 +20,7 @@ class NoCTCP : public ModeHandler
public:
NoCTCP(InspIRCd* Instance) : ModeHandler(Instance, 'C', 0, 0, false, MODETYPE_CHANNEL, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (adding)
{
@@ -64,16 +64,16 @@ class ModuleNoCTCP : public Module
List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = 1;
}
- virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
return OnUserPreNotice(user,dest,target_type,text,status,exempt_list);
}
- virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
if ((target_type == TYPE_CHANNEL) && (IS_LOCAL(user)))
{
- chanrec* c = (chanrec*)dest;
+ Channel* c = (Channel*)dest;
if (c->IsModeSet('C'))
{
if ((text.length()) && (text[0] == '\1'))
diff --git a/src/modules/m_noinvite.cpp b/src/modules/m_noinvite.cpp
index c1d7f0d6f..5447d0d60 100644
--- a/src/modules/m_noinvite.cpp
+++ b/src/modules/m_noinvite.cpp
@@ -20,7 +20,7 @@ class NoInvite : public ModeHandler
public:
NoInvite(InspIRCd* Instance) : ModeHandler(Instance, 'V', 0, 0, false, MODETYPE_CHANNEL, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (adding)
{
@@ -60,7 +60,7 @@ class ModuleNoInvite : public Module
List[I_OnUserPreInvite] = 1;
}
- virtual int OnUserPreInvite(userrec* user,userrec* dest,chanrec* channel)
+ virtual int OnUserPreInvite(User* user,User* dest,Channel* channel)
{
if (channel->IsModeSet('V'))
{
diff --git a/src/modules/m_nokicks.cpp b/src/modules/m_nokicks.cpp
index 93ab2bd1d..c09d2203b 100644
--- a/src/modules/m_nokicks.cpp
+++ b/src/modules/m_nokicks.cpp
@@ -20,7 +20,7 @@ class NoKicks : public ModeHandler
public:
NoKicks(InspIRCd* Instance) : ModeHandler(Instance, 'Q', 0, 0, false, MODETYPE_CHANNEL, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (adding)
{
@@ -64,7 +64,7 @@ class ModuleNoKicks : public Module
List[I_OnAccessCheck] = 1;
}
- virtual int OnAccessCheck(userrec* source,userrec* dest,chanrec* channel,int access_type)
+ virtual int OnAccessCheck(User* source,User* dest,Channel* channel,int access_type)
{
if (access_type == AC_KICK)
{
diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp
index 3adc9e160..66d8d4601 100644
--- a/src/modules/m_nonicks.cpp
+++ b/src/modules/m_nonicks.cpp
@@ -20,7 +20,7 @@ class NoNicks : public ModeHandler
public:
NoNicks(InspIRCd* Instance) : ModeHandler(Instance, 'N', 0, 0, false, MODETYPE_CHANNEL, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (adding)
{
@@ -71,7 +71,7 @@ class ModuleNoNickChange : public Module
List[I_OnUserPreNick] = 1;
}
- virtual int OnUserPreNick(userrec* user, const std::string &newnick)
+ virtual int OnUserPreNick(User* user, const std::string &newnick)
{
if (IS_LOCAL(user))
{
@@ -80,7 +80,7 @@ class ModuleNoNickChange : public Module
for (UCListIter i = user->chans.begin(); i != user->chans.end(); i++)
{
- chanrec* curr = i->first;
+ Channel* curr = i->first;
if (curr->IsModeSet('N'))
{
diff --git a/src/modules/m_nonotice.cpp b/src/modules/m_nonotice.cpp
index fdec61a7e..314a7c8fe 100644
--- a/src/modules/m_nonotice.cpp
+++ b/src/modules/m_nonotice.cpp
@@ -20,7 +20,7 @@ class NoNotice : public ModeHandler
public:
NoNotice(InspIRCd* Instance) : ModeHandler(Instance, 'T', 0, 0, false, MODETYPE_CHANNEL, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (adding)
{
@@ -63,11 +63,11 @@ class ModuleNoNotice : public Module
List[I_OnUserPreNotice] = 1;
}
- virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
if ((target_type == TYPE_CHANNEL) && (IS_LOCAL(user)))
{
- chanrec* c = (chanrec*)dest;
+ Channel* c = (Channel*)dest;
if (c->IsModeSet('T'))
{
if ((ServerInstance->ULine(user->server)) || (c->GetStatus(user) == STATUS_OP) || (c->GetStatus(user) == STATUS_HOP))
diff --git a/src/modules/m_oper_hash.cpp b/src/modules/m_oper_hash.cpp
index 66fa1e61e..cc2afbe54 100644
--- a/src/modules/m_oper_hash.cpp
+++ b/src/modules/m_oper_hash.cpp
@@ -34,7 +34,7 @@ class cmd_mkpasswd : public Command
syntax = "<hashtype> <any-text>";
}
- void MakeHash(userrec* user, const char* algo, const char* stuff)
+ void MakeHash(User* user, const char* algo, const char* stuff)
{
/* Lets see if they gave us an algorithm which has been implemented */
hashymodules::iterator x = hashers.find(algo);
@@ -52,7 +52,7 @@ class cmd_mkpasswd : public Command
}
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
MakeHash(user, parameters[0], parameters[1]);
/* NOTE: Don't propagate this across the network!
@@ -120,7 +120,7 @@ class ModuleOperHash : public Module
List[I_OnRehash] = List[I_OnOperCompare] = 1;
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
/* Re-read configuration file */
if (Conf)
diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp
index 24772aea7..4c3ae4798 100644
--- a/src/modules/m_operchans.cpp
+++ b/src/modules/m_operchans.cpp
@@ -21,7 +21,7 @@ class OperChans : public ModeHandler
/* This is an oper-only mode */
OperChans(InspIRCd* Instance) : ModeHandler(Instance, 'O', 0, 0, false, MODETYPE_CHANNEL, true) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (adding)
{
@@ -63,7 +63,7 @@ class ModuleOperChans : public Module
List[I_OnUserPreJoin] = 1;
}
- virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
{
if (!IS_OPER(user))
{
diff --git a/src/modules/m_operflood.cpp b/src/modules/m_operflood.cpp
index 390dd1fe1..7e336eb8b 100644
--- a/src/modules/m_operflood.cpp
+++ b/src/modules/m_operflood.cpp
@@ -32,7 +32,7 @@ public:
return Version(1,1,0,1,VF_VENDOR,API_VERSION);
}
- void OnPostOper(userrec* user, const std::string &opertype)
+ void OnPostOper(User* user, const std::string &opertype)
{
if(!IS_LOCAL(user))
return;
diff --git a/src/modules/m_operjoin.cpp b/src/modules/m_operjoin.cpp
index 45fcf6be8..ae92a1255 100644
--- a/src/modules/m_operjoin.cpp
+++ b/src/modules/m_operjoin.cpp
@@ -51,7 +51,7 @@ class ModuleOperjoin : public Module
List[I_OnPostOper] = List[I_OnRehash] = 1;
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
ConfigReader* conf = new ConfigReader(ServerInstance);
@@ -72,14 +72,14 @@ class ModuleOperjoin : public Module
return Version(1,1,0,1,VF_VENDOR,API_VERSION);
}
- virtual void OnPostOper(userrec* user, const std::string &opertype)
+ virtual void OnPostOper(User* user, const std::string &opertype)
{
if (!IS_LOCAL(user))
return;
for(std::vector<std::string>::iterator it = operChans.begin(); it != operChans.end(); it++)
if (ServerInstance->IsChannel(it->c_str()))
- chanrec::JoinUser(ServerInstance, user, it->c_str(), false, "", ServerInstance->Time(true));
+ Channel::JoinUser(ServerInstance, user, it->c_str(), false, "", ServerInstance->Time(true));
}
};
diff --git a/src/modules/m_operlevels.cpp b/src/modules/m_operlevels.cpp
index 4c4047caa..c7fa0a642 100644
--- a/src/modules/m_operlevels.cpp
+++ b/src/modules/m_operlevels.cpp
@@ -45,7 +45,7 @@ class ModuleOperLevels : public Module
List[I_OnRehash] = List[I_OnKill] = 1;
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
DELETE(conf);
conf = new ConfigReader(ServerInstance);
@@ -56,7 +56,7 @@ class ModuleOperLevels : public Module
return Version(1,1,0,1,VF_VENDOR,API_VERSION);
}
- virtual int OnKill(userrec* source, userrec* dest, const std::string &reason)
+ virtual int OnKill(User* source, User* dest, const std::string &reason)
{
long dest_level = 0,source_level = 0;
diff --git a/src/modules/m_operlog.cpp b/src/modules/m_operlog.cpp
index 09395fccb..0ca13b2da 100644
--- a/src/modules/m_operlog.cpp
+++ b/src/modules/m_operlog.cpp
@@ -39,7 +39,7 @@ class ModuleOperLog : public Module
List[I_OnPreCommand] = List[I_On005Numeric] = 1;
}
- virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated, const std::string &original_line)
+ virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line)
{
/* If the command doesnt appear to be valid, we dont want to mess with it. */
if (!validated)
diff --git a/src/modules/m_opermodes.cpp b/src/modules/m_opermodes.cpp
index fea793c04..1904b3f01 100644
--- a/src/modules/m_opermodes.cpp
+++ b/src/modules/m_opermodes.cpp
@@ -35,7 +35,7 @@ class ModuleModesOnOper : public Module
List[I_OnPostOper] = List[I_OnRehash] = 1;
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
DELETE(Conf);
Conf = new ConfigReader(ServerInstance);
@@ -51,7 +51,7 @@ class ModuleModesOnOper : public Module
return Version(1,1,0,1,VF_VENDOR,API_VERSION);
}
- virtual void OnPostOper(userrec* user, const std::string &opertype)
+ virtual void OnPostOper(User* user, const std::string &opertype)
{
// whenever a user opers, go through the oper types, find their <type:modes>,
// and if they have one apply their modes. The mode string can contain +modes
diff --git a/src/modules/m_opermotd.cpp b/src/modules/m_opermotd.cpp
index 2ae4c30b5..ef3ae98c4 100644
--- a/src/modules/m_opermotd.cpp
+++ b/src/modules/m_opermotd.cpp
@@ -17,7 +17,7 @@
static FileReader* opermotd;
-CmdResult ShowOperMOTD(userrec* user)
+CmdResult ShowOperMOTD(User* user)
{
if(!opermotd->FileSize())
{
@@ -49,7 +49,7 @@ class cmd_opermotd : public Command
syntax = "[<servername>]";
}
- CmdResult Handle (const char** parameters, int pcnt, userrec* user)
+ CmdResult Handle (const char** parameters, int pcnt, User* user)
{
return ShowOperMOTD(user);
}
@@ -99,12 +99,12 @@ class ModuleOpermotd : public Module
List[I_OnRehash] = List[I_OnOper] = 1;
}
- virtual void OnOper(userrec* user, const std::string &opertype)
+ virtual void OnOper(User* user, const std::string &opertype)
{
ShowOperMOTD(user);
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
LoadOperMOTD();
}
diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp
index 0f8922854..41b57b327 100644
--- a/src/modules/m_override.cpp
+++ b/src/modules/m_override.cpp
@@ -38,7 +38,7 @@ class ModuleOverride : public Module
OverOps = OverDeops = OverVoices = OverDevoices = OverHalfops = OverDehalfops = 0;
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
// on a rehash we delete our classes for good measure and create them again.
ConfigReader* Conf = new ConfigReader(ServerInstance);
@@ -61,7 +61,7 @@ class ModuleOverride : public Module
List[I_OnRehash] = List[I_OnAccessCheck] = List[I_On005Numeric] = List[I_OnUserPreJoin] = List[I_OnUserPreKick] = List[I_OnPostCommand] = 1;
}
- virtual void OnPostCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, CmdResult result, const std::string &original_line)
+ virtual void OnPostCommand(const std::string &command, const char** parameters, int pcnt, User *user, CmdResult result, const std::string &original_line)
{
if ((NoisyOverride) && (OverriddenMode) && (irc::string(command.c_str()) == "MODE") && (result == CMD_SUCCESS))
{
@@ -86,7 +86,7 @@ class ModuleOverride : public Module
output.append(" OVERRIDE");
}
- virtual bool CanOverride(userrec* source, const char* token)
+ virtual bool CanOverride(User* source, const char* token)
{
// checks to see if the oper's type has <type:override>
override_t::iterator j = overrides.find(source->oper);
@@ -101,7 +101,7 @@ class ModuleOverride : public Module
return false;
}
- virtual int OnUserPreKick(userrec* source, userrec* user, chanrec* chan, const std::string &reason)
+ virtual int OnUserPreKick(User* source, User* user, Channel* chan, const std::string &reason)
{
if (IS_OPER(source) && CanOverride(source,"KICK"))
{
@@ -115,7 +115,7 @@ class ModuleOverride : public Module
return 0;
}
- virtual int OnAccessCheck(userrec* source,userrec* dest,chanrec* channel,int access_type)
+ virtual int OnAccessCheck(User* source,User* dest,Channel* channel,int access_type)
{
if (IS_OPER(source))
{
@@ -226,7 +226,7 @@ class ModuleOverride : public Module
return ACR_DEFAULT;
}
- virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
{
if (IS_OPER(user))
{
diff --git a/src/modules/m_randquote.cpp b/src/modules/m_randquote.cpp
index 96ed2758e..435c41453 100644
--- a/src/modules/m_randquote.cpp
+++ b/src/modules/m_randquote.cpp
@@ -31,7 +31,7 @@ class cmd_randquote : public Command
this->source = "m_randquote.so";
}
- CmdResult Handle (const char** parameters, int pcntl, userrec *user)
+ CmdResult Handle (const char** parameters, int pcntl, User *user)
{
std::string str;
int fsize;
@@ -125,7 +125,7 @@ class ModuleRandQuote : public Module
return Version(1,1,0,1,VF_VENDOR,API_VERSION);
}
- virtual void OnUserConnect(userrec* user)
+ virtual void OnUserConnect(User* user)
{
if (mycommand)
mycommand->Handle(NULL, 0, user);
diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp
index 097929456..46b8fbe19 100644
--- a/src/modules/m_redirect.cpp
+++ b/src/modules/m_redirect.cpp
@@ -22,7 +22,7 @@ class Redirect : public ModeHandler
public:
Redirect(InspIRCd* Instance) : ModeHandler(Instance, 'L', 1, 0, false, MODETYPE_CHANNEL, false) { }
- ModePair ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter)
+ ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter)
{
if (channel->IsModeSet('L'))
return std::make_pair(true, channel->GetModeParameter('L'));
@@ -30,17 +30,17 @@ class Redirect : public ModeHandler
return std::make_pair(false, parameter);
}
- bool CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, chanrec* channel)
+ bool CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, Channel* channel)
{
/* When TS is equal, the alphabetically later one wins */
return (their_param < our_param);
}
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (adding)
{
- chanrec* c = NULL;
+ Channel* c = NULL;
if (!ServerInstance->IsChannel(parameter.c_str()))
{
@@ -114,7 +114,7 @@ class ModuleRedirect : public Module
List[I_OnUserPreJoin] = 1;
}
- virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
{
if (chan)
{
@@ -125,7 +125,7 @@ class ModuleRedirect : public Module
std::string channel = chan->GetModeParameter('L');
/* sometimes broken ulines can make circular or chained +L, avoid this */
- chanrec* destchan = NULL;
+ Channel* destchan = NULL;
destchan = ServerInstance->FindChan(channel);
if (destchan && destchan->IsModeSet('L'))
{
@@ -134,7 +134,7 @@ class ModuleRedirect : public Module
}
user->WriteServ("470 %s :%s has become full, so you are automatically being transferred to the linked channel %s", user->nick, cname, channel.c_str());
- chanrec::JoinUser(ServerInstance, user, channel.c_str(), false, "", ServerInstance->Time(true));
+ Channel::JoinUser(ServerInstance, user, channel.c_str(), false, "", ServerInstance->Time(true));
return 1;
}
}
diff --git a/src/modules/m_regonlycreate.cpp b/src/modules/m_regonlycreate.cpp
index c712b396b..b02f9a391 100644
--- a/src/modules/m_regonlycreate.cpp
+++ b/src/modules/m_regonlycreate.cpp
@@ -28,7 +28,7 @@ class ModuleRegOnlyCreate : public Module
List[I_OnUserPreJoin] = 1;
}
- virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
{
if (chan)
return 0;
diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp
index 9de0942c1..22e4b6490 100644
--- a/src/modules/m_remove.cpp
+++ b/src/modules/m_remove.cpp
@@ -69,12 +69,12 @@ class RemoveBase
}
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user, bool neworder)
+ CmdResult Handle (const char** parameters, int pcnt, User *user, bool neworder)
{
const char* channame;
const char* username;
- userrec* target;
- chanrec* channel;
+ User* target;
+ Channel* channel;
ModeLevel tlevel;
ModeLevel ulevel;
std::string reason;
@@ -213,7 +213,7 @@ class cmd_remove : public Command, public RemoveBase
TRANSLATE4(TR_NICK, TR_TEXT, TR_TEXT, TR_END);
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
return RemoveBase::Handle(parameters, pcnt, user, false);
}
@@ -230,7 +230,7 @@ class cmd_fpart : public Command, public RemoveBase
syntax = "<channel> <nick> [<reason>]";
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
return RemoveBase::Handle(parameters, pcnt, user, true);
}
@@ -264,7 +264,7 @@ class ModuleRemove : public Module
output.append(" REMOVE");
}
- virtual void OnRehash(userrec* user, const std::string&)
+ virtual void OnRehash(User* user, const std::string&)
{
ConfigReader conf(ServerInstance);
supportnokicks = conf.ReadFlag("remove", "supportnokicks", 0);
diff --git a/src/modules/m_restrictbanned.cpp b/src/modules/m_restrictbanned.cpp
index a5ab337ad..a5a5ab1ae 100644
--- a/src/modules/m_restrictbanned.cpp
+++ b/src/modules/m_restrictbanned.cpp
@@ -37,7 +37,7 @@ class ModuleRestrictBanned : public Module
List[I_OnLocalTopicChange] = List[I_OnUserPreNick] = List[I_OnUserPreNotice] = List[I_OnUserPreMessage] = 1;
}
- int CheckRestricted(userrec *user, chanrec *channel, const std::string &action)
+ int CheckRestricted(User *user, Channel *channel, const std::string &action)
{
/* aren't local? we don't care. */
if (!IS_LOCAL(user))
@@ -53,7 +53,7 @@ class ModuleRestrictBanned : public Module
return 0;
}
- virtual int OnUserPreNick(userrec *user, const std::string &newnick)
+ virtual int OnUserPreNick(User *user, const std::string &newnick)
{
/* if they aren't local, we don't care */
if (!IS_LOCAL(user))
@@ -73,21 +73,21 @@ class ModuleRestrictBanned : public Module
return 0;
}
- virtual int OnLocalTopicChange(userrec *user, chanrec *channel, const std::string &topic)
+ virtual int OnLocalTopicChange(User *user, Channel *channel, const std::string &topic)
{
return CheckRestricted(user, channel, "change the topic");
}
- virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
return OnUserPreNotice(user,dest,target_type,text,status,exempt_list);
}
- virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
if (target_type == TYPE_CHANNEL)
{
- chanrec *channel = (chanrec *)dest;
+ Channel *channel = (Channel *)dest;
return CheckRestricted(user, channel, "message the channel");
}
diff --git a/src/modules/m_restrictchans.cpp b/src/modules/m_restrictchans.cpp
index 69e503861..e61e8ac0d 100644
--- a/src/modules/m_restrictchans.cpp
+++ b/src/modules/m_restrictchans.cpp
@@ -43,7 +43,7 @@ class ModuleRestrictChans : public Module
ReadConfig();
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
ReadConfig();
}
@@ -53,7 +53,7 @@ class ModuleRestrictChans : public Module
List[I_OnUserPreJoin] = List[I_OnRehash] = 1;
}
- virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
{
irc::string x = cname;
// user is not an oper and its not in the allow list
diff --git a/src/modules/m_restrictmsg.cpp b/src/modules/m_restrictmsg.cpp
index b5f10eb24..b63d7c7b7 100644
--- a/src/modules/m_restrictmsg.cpp
+++ b/src/modules/m_restrictmsg.cpp
@@ -32,11 +32,11 @@ class ModuleRestrictMsg : public Module
List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = 1;
}
- virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
if ((target_type == TYPE_USER) && (IS_LOCAL(user)))
{
- userrec* u = (userrec*)dest;
+ User* u = (User*)dest;
// message allowed if:
// (1) the sender is opered
@@ -54,7 +54,7 @@ class ModuleRestrictMsg : public Module
return 0;
}
- virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
return this->OnUserPreMessage(user,dest,target_type,text,status,exempt_list);
}
diff --git a/src/modules/m_safelist.cpp b/src/modules/m_safelist.cpp
index 40b8d1b0f..a2135bd6b 100644
--- a/src/modules/m_safelist.cpp
+++ b/src/modules/m_safelist.cpp
@@ -48,7 +48,7 @@ class ModuleSafeList : public Module
{
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
ConfigReader MyConf(ServerInstance);
ThrottleSecs = MyConf.ReadInteger("safelist", "throttle", "60", 0, true);
@@ -71,7 +71,7 @@ class ModuleSafeList : public Module
* OnPreCommand()
* Intercept the LIST command.
*/
- virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated, const std::string &original_line)
+ virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line)
{
/* If the command doesnt appear to be valid, we dont want to mess with it. */
if (!validated)
@@ -88,7 +88,7 @@ class ModuleSafeList : public Module
* HandleList()
* Handle (override) the LIST command.
*/
- int HandleList(const char** parameters, int pcnt, userrec* user)
+ int HandleList(const char** parameters, int pcnt, User* user)
{
int minusers = 0, maxusers = 0;
@@ -161,13 +161,13 @@ class ModuleSafeList : public Module
return 1;
}
- virtual void OnBufferFlushed(userrec* user)
+ virtual void OnBufferFlushed(User* user)
{
char buffer[MAXBUF];
ListData* ld;
if (user->GetExt("safelist_cache", ld))
{
- chanrec* chan = NULL;
+ Channel* chan = NULL;
long amount_sent = 0;
do
{
@@ -231,7 +231,7 @@ class ModuleSafeList : public Module
{
if(target_type == TYPE_USER)
{
- userrec* u = (userrec*)item;
+ User* u = (User*)item;
ListData* ld;
u->GetExt("safelist_cache", ld);
if (ld)
@@ -255,7 +255,7 @@ class ModuleSafeList : public Module
output.append(" SAFELIST");
}
- virtual void OnUserQuit(userrec* user, const std::string &message, const std::string &oper_message)
+ virtual void OnUserQuit(User* user, const std::string &message, const std::string &oper_message)
{
this->OnCleanup(TYPE_USER,user);
}
diff --git a/src/modules/m_sajoin.cpp b/src/modules/m_sajoin.cpp
index 03bf7c47c..1627f945f 100644
--- a/src/modules/m_sajoin.cpp
+++ b/src/modules/m_sajoin.cpp
@@ -27,9 +27,9 @@ class cmd_sajoin : public Command
TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
- userrec* dest = ServerInstance->FindNick(parameters[0]);
+ User* dest = ServerInstance->FindNick(parameters[0]);
if (dest)
{
if (ServerInstance->ULine(dest->server))
@@ -50,9 +50,9 @@ class cmd_sajoin : public Command
*/
if (IS_LOCAL(dest))
{
- chanrec::JoinUser(ServerInstance, dest, parameters[1], true, "", ServerInstance->Time(true));
+ Channel::JoinUser(ServerInstance, dest, parameters[1], true, "", ServerInstance->Time(true));
/* Fix for dotslasher and w00t - if the join didnt succeed, return CMD_FAILURE so that it doesnt propagate */
- chanrec* n = ServerInstance->FindChan(parameters[1]);
+ Channel* n = ServerInstance->FindChan(parameters[1]);
if (n)
{
if (n->HasUser(dest))
diff --git a/src/modules/m_samode.cpp b/src/modules/m_samode.cpp
index a083f4305..b67730e27 100644
--- a/src/modules/m_samode.cpp
+++ b/src/modules/m_samode.cpp
@@ -26,7 +26,7 @@ class cmd_samode : public Command
syntax = "<target> <modes> {<mode-parameters>}";
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
/*
* Handles an SAMODE request. Notifies all +s users.
diff --git a/src/modules/m_sanick.cpp b/src/modules/m_sanick.cpp
index e4f2006c4..859db7b37 100644
--- a/src/modules/m_sanick.cpp
+++ b/src/modules/m_sanick.cpp
@@ -27,9 +27,9 @@ class cmd_sanick : public Command
TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
- userrec* source = ServerInstance->FindNick(parameters[0]);
+ User* source = ServerInstance->FindNick(parameters[0]);
if (source)
{
if (ServerInstance->ULine(source->server))
diff --git a/src/modules/m_sapart.cpp b/src/modules/m_sapart.cpp
index 0c4d061e1..f0e795980 100644
--- a/src/modules/m_sapart.cpp
+++ b/src/modules/m_sapart.cpp
@@ -27,10 +27,10 @@ class cmd_sapart : public Command
TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
- userrec* dest = ServerInstance->FindNick(parameters[0]);
- chanrec* channel = ServerInstance->FindChan(parameters[1]);
+ User* dest = ServerInstance->FindNick(parameters[0]);
+ Channel* channel = ServerInstance->FindChan(parameters[1]);
if (dest && channel)
{
if (ServerInstance->ULine(dest->server))
@@ -47,7 +47,7 @@ class cmd_sapart : public Command
{
if (!channel->PartUser(dest, dest->nick))
delete channel;
- chanrec* n = ServerInstance->FindChan(parameters[1]);
+ Channel* n = ServerInstance->FindChan(parameters[1]);
if (!n)
{
ServerInstance->WriteOpers("*** "+std::string(user->nick)+" used SAPART to make "+dest->nick+" part "+parameters[1]);
diff --git a/src/modules/m_saquit.cpp b/src/modules/m_saquit.cpp
index 7f4212d80..4711c612c 100644
--- a/src/modules/m_saquit.cpp
+++ b/src/modules/m_saquit.cpp
@@ -27,9 +27,9 @@ class cmd_saquit : public Command
TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
- userrec* dest = ServerInstance->FindNick(parameters[0]);
+ User* dest = ServerInstance->FindNick(parameters[0]);
if (dest)
{
if (ServerInstance->ULine(dest->server))
@@ -46,7 +46,7 @@ class cmd_saquit : public Command
if (!IS_LOCAL(dest))
return CMD_SUCCESS;
- userrec::QuitUser(ServerInstance, dest, line);
+ User::QuitUser(ServerInstance, dest, line);
return CMD_SUCCESS;
}
else
diff --git a/src/modules/m_securelist.cpp b/src/modules/m_securelist.cpp
index e4fc76478..30b339630 100644
--- a/src/modules/m_securelist.cpp
+++ b/src/modules/m_securelist.cpp
@@ -35,7 +35,7 @@ class ModuleSecureList : public Module
return Version(1,1,0,0,VF_VENDOR,API_VERSION);
}
- void OnRehash(userrec* user, const std::string &parameter)
+ void OnRehash(User* user, const std::string &parameter)
{
ConfigReader* MyConf = new ConfigReader(ServerInstance);
allowlist.clear();
@@ -56,7 +56,7 @@ class ModuleSecureList : public Module
* OnPreCommand()
* Intercept the LIST command.
*/
- virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated, const std::string &original_line)
+ virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line)
{
/* If the command doesnt appear to be valid, we dont want to mess with it. */
if (!validated)
diff --git a/src/modules/m_seenicks.cpp b/src/modules/m_seenicks.cpp
index c0b6473eb..82deda0cd 100644
--- a/src/modules/m_seenicks.cpp
+++ b/src/modules/m_seenicks.cpp
@@ -41,7 +41,7 @@ class ModuleSeeNicks : public Module
List[I_OnUserPostNick] = 1;
}
- virtual void OnUserPostNick(userrec* user, const std::string &oldnick)
+ virtual void OnUserPostNick(User* user, const std::string &oldnick)
{
ServerInstance->SNO->WriteToSnoMask(IS_LOCAL(user) ? 'n' : 'N',"User %s changed their nickname to %s", oldnick.c_str(), user->nick);
}
diff --git a/src/modules/m_services.cpp b/src/modules/m_services.cpp
index c1152b7de..88a6b8fb9 100644
--- a/src/modules/m_services.cpp
+++ b/src/modules/m_services.cpp
@@ -25,7 +25,7 @@ class Channel_r : public ModeHandler
public:
Channel_r(InspIRCd* Instance) : ModeHandler(Instance, 'r', 0, 0, false, MODETYPE_CHANNEL, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
// only a u-lined server may add or remove the +r mode.
if ((ServerInstance->ULine(source->nick)) || (ServerInstance->ULine(source->server)) || (!*source->server || (strchr(source->nick,'.'))))
@@ -49,7 +49,7 @@ class User_r : public ModeHandler
public:
User_r(InspIRCd* Instance) : ModeHandler(Instance, 'r', 0, 0, false, MODETYPE_USER, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if ((kludgeme) || (ServerInstance->ULine(source->nick)) || (ServerInstance->ULine(source->server)) || (!*source->server || (strchr(source->nick,'.'))))
{
@@ -75,7 +75,7 @@ class Channel_R : public ModeHandler
public:
Channel_R(InspIRCd* Instance) : ModeHandler(Instance, 'R', 0, 0, false, MODETYPE_CHANNEL, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (adding)
{
@@ -105,7 +105,7 @@ class User_R : public ModeHandler
public:
User_R(InspIRCd* Instance) : ModeHandler(Instance, 'R', 0, 0, false, MODETYPE_USER, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (adding)
{
@@ -135,7 +135,7 @@ class Channel_M : public ModeHandler
public:
Channel_M(InspIRCd* Instance) : ModeHandler(Instance, 'M', 0, 0, false, MODETYPE_CHANNEL, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (adding)
{
@@ -189,7 +189,7 @@ class ModuleServices : public Module
}
/* <- :stitch.chatspike.net 307 w00t w00t :is a registered nick */
- virtual void OnWhois(userrec* source, userrec* dest)
+ virtual void OnWhois(User* source, User* dest)
{
if (dest->IsModeSet('r'))
{
@@ -203,7 +203,7 @@ class ModuleServices : public Module
List[I_OnWhois] = List[I_OnUserPostNick] = List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = List[I_OnUserPreJoin] = 1;
}
- virtual void OnUserPostNick(userrec* user, const std::string &oldnick)
+ virtual void OnUserPostNick(User* user, const std::string &oldnick)
{
/* On nickchange, if they have +r, remove it */
if (user->IsModeSet('r') && irc::string(user->nick) != oldnick)
@@ -217,14 +217,14 @@ class ModuleServices : public Module
}
}
- virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
if (!IS_LOCAL(user))
return 0;
if (target_type == TYPE_CHANNEL)
{
- chanrec* c = (chanrec*)dest;
+ Channel* c = (Channel*)dest;
if ((c->IsModeSet('M')) && (!user->IsModeSet('r')))
{
if ((ServerInstance->ULine(user->nick)) || (ServerInstance->ULine(user->server)))
@@ -239,7 +239,7 @@ class ModuleServices : public Module
}
if (target_type == TYPE_USER)
{
- userrec* u = (userrec*)dest;
+ User* u = (User*)dest;
if ((u->IsModeSet('R')) && (!user->IsModeSet('r')))
{
if ((ServerInstance->ULine(user->nick)) || (ServerInstance->ULine(user->server)))
@@ -255,12 +255,12 @@ class ModuleServices : public Module
return 0;
}
- virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
return OnUserPreMessage(user,dest,target_type,text,status, exempt_list);
}
- virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
{
if (chan)
{
diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp
index 74e445376..5aa86a910 100644
--- a/src/modules/m_services_account.cpp
+++ b/src/modules/m_services_account.cpp
@@ -22,7 +22,7 @@ class AChannel_R : public ModeHandler
public:
AChannel_R(InspIRCd* Instance) : ModeHandler(Instance, 'R', 0, 0, false, MODETYPE_CHANNEL, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (adding)
{
@@ -52,7 +52,7 @@ class AUser_R : public ModeHandler
public:
AUser_R(InspIRCd* Instance) : ModeHandler(Instance, 'R', 0, 0, false, MODETYPE_USER, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (adding)
{
@@ -82,7 +82,7 @@ class AChannel_M : public ModeHandler
public:
AChannel_M(InspIRCd* Instance) : ModeHandler(Instance, 'M', 0, 0, false, MODETYPE_CHANNEL, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (adding)
{
@@ -123,7 +123,7 @@ class ModuleServicesAccount : public Module
}
/* <- :twisted.oscnet.org 330 w00t2 w00t2 w00t :is logged in as */
- virtual void OnWhois(userrec* source, userrec* dest)
+ virtual void OnWhois(User* source, User* dest)
{
std::string *account;
dest->GetExt("accountname", account);
@@ -140,7 +140,7 @@ class ModuleServicesAccount : public Module
List[I_OnSyncUserMetaData] = List[I_OnUserQuit] = List[I_OnCleanup] = List[I_OnDecodeMetaData] = 1;
}
- virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
std::string *account;
@@ -151,7 +151,7 @@ class ModuleServicesAccount : public Module
if (target_type == TYPE_CHANNEL)
{
- chanrec* c = (chanrec*)dest;
+ Channel* c = (Channel*)dest;
if ((c->IsModeSet('M')) && (!account))
{
@@ -168,7 +168,7 @@ class ModuleServicesAccount : public Module
}
if (target_type == TYPE_USER)
{
- userrec* u = (userrec*)dest;
+ User* u = (User*)dest;
if ((u->modes['R'-65]) && (!account))
{
@@ -186,12 +186,12 @@ class ModuleServicesAccount : public Module
return 0;
}
- virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
return OnUserPreMessage(user, dest, target_type, text, status, exempt_list);
}
- virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
{
std::string *account;
user->GetExt("accountname", account);
@@ -217,11 +217,11 @@ class ModuleServicesAccount : public Module
}
// Whenever the linking module wants to send out data, but doesnt know what the data
- // represents (e.g. it is metadata, added to a userrec or chanrec by a module) then
+ // represents (e.g. it is metadata, added to a User or Channel by a module) then
// this method is called. We should use the ProtoSendMetaData function after we've
// corrected decided how the data should look, to send the metadata on its way if
// it is ours.
- virtual void OnSyncUserMetaData(userrec* user, Module* proto, void* opaque, const std::string &extname, bool displayable)
+ virtual void OnSyncUserMetaData(User* user, Module* proto, void* opaque, const std::string &extname, bool displayable)
{
// check if the linking module wants to know about OUR metadata
if (extname == "accountname")
@@ -242,7 +242,7 @@ class ModuleServicesAccount : public Module
}
// when a user quits, tidy up their metadata
- virtual void OnUserQuit(userrec* user, const std::string &message, const std::string &oper_message)
+ virtual void OnUserQuit(User* user, const std::string &message, const std::string &oper_message)
{
std::string* account;
user->GetExt("accountname", account);
@@ -258,7 +258,7 @@ class ModuleServicesAccount : public Module
{
if (target_type == TYPE_USER)
{
- userrec* user = (userrec*)item;
+ User* user = (User*)item;
std::string* account;
user->GetExt("accountname", account);
if (account)
@@ -281,7 +281,7 @@ class ModuleServicesAccount : public Module
// check if its our metadata key, and its associated with a user
if ((target_type == TYPE_USER) && (extname == "accountname"))
{
- userrec* dest = (userrec*)target;
+ User* dest = (User*)target;
/* logging them out? */
if (extdata.empty())
diff --git a/src/modules/m_servprotect.cpp b/src/modules/m_servprotect.cpp
index d1ea08c73..852ad6d3f 100644
--- a/src/modules/m_servprotect.cpp
+++ b/src/modules/m_servprotect.cpp
@@ -28,7 +28,7 @@ class ServProtectMode : public ModeHandler
public:
ServProtectMode(InspIRCd* Instance) : ModeHandler(Instance, 'k', 0, 0, false, MODETYPE_USER, true) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
return MODEACTION_DENY;
}
@@ -66,7 +66,7 @@ class ModuleServProtectMode : public Module
return Version(1,1,0,0,VF_COMMON,API_VERSION);
}
- virtual void OnWhois(userrec* src, userrec* dst)
+ virtual void OnWhois(User* src, User* dst)
{
if (dst->IsModeSet('k'))
{
@@ -74,7 +74,7 @@ class ModuleServProtectMode : public Module
}
}
- virtual int OnKill(userrec* src, userrec* dst, const std::string &reason)
+ virtual int OnKill(User* src, User* dst, const std::string &reason)
{
if (src == NULL)
return 0;
@@ -88,7 +88,7 @@ class ModuleServProtectMode : public Module
return 0;
}
- virtual int OnWhoisLine(userrec* src, userrec* dst, int &numeric, std::string &text)
+ virtual int OnWhoisLine(User* src, User* dst, int &numeric, std::string &text)
{
return ((src != dst) && (numeric == 319) && dst->IsModeSet('k'));
}
diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp
index 59b48fbc1..7ea03ebbc 100644
--- a/src/modules/m_sethost.cpp
+++ b/src/modules/m_sethost.cpp
@@ -29,7 +29,7 @@ class cmd_sethost : public Command
TRANSLATE2(TR_TEXT, TR_END);
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
size_t len = 0;
for (const char* x = parameters[0]; *x; x++, len++)
@@ -79,7 +79,7 @@ class ModuleSetHost : public Module
List[I_OnRehash] = 1;
}
- void OnRehash(userrec* user, const std::string &parameter)
+ void OnRehash(User* user, const std::string &parameter)
{
ConfigReader Conf(ServerInstance);
std::string hmap = Conf.ReadValue("hostname", "charmap", 0);
diff --git a/src/modules/m_setident.cpp b/src/modules/m_setident.cpp
index 4a19b8412..0eae1c7be 100644
--- a/src/modules/m_setident.cpp
+++ b/src/modules/m_setident.cpp
@@ -27,7 +27,7 @@ class cmd_setident : public Command
TRANSLATE2(TR_TEXT, TR_END);
}
- CmdResult Handle(const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle(const char** parameters, int pcnt, User *user)
{
if (!*parameters[0])
{
diff --git a/src/modules/m_setidle.cpp b/src/modules/m_setidle.cpp
index 6dbcae711..a676eedb4 100644
--- a/src/modules/m_setidle.cpp
+++ b/src/modules/m_setidle.cpp
@@ -27,7 +27,7 @@ class cmd_setidle : public Command
TRANSLATE2(TR_TEXT, TR_END);
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
time_t idle = ServerInstance->Duration(parameters[0]);
if (idle < 1)
diff --git a/src/modules/m_setname.cpp b/src/modules/m_setname.cpp
index 80179c8cb..04e101fa3 100644
--- a/src/modules/m_setname.cpp
+++ b/src/modules/m_setname.cpp
@@ -27,7 +27,7 @@ class cmd_setname : public Command
TRANSLATE2(TR_TEXT, TR_END);
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
if (!*parameters[0])
{
diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp
index 02ac49d22..5acb9b513 100644
--- a/src/modules/m_showwhois.cpp
+++ b/src/modules/m_showwhois.cpp
@@ -22,7 +22,7 @@ class SeeWhois : public ModeHandler
public:
SeeWhois(InspIRCd* Instance) : ModeHandler(Instance, 'W', 0, 0, false, MODETYPE_USER, true) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
/* Only opers can change other users modes */
if (source != dest)
@@ -80,7 +80,7 @@ class ModuleShowwhois : public Module
return Version(1,1,0,3,VF_COMMON|VF_VENDOR,API_VERSION);
}
- virtual void OnWhois(userrec* source, userrec* dest)
+ virtual void OnWhois(User* source, User* dest)
{
if ((dest->IsModeSet('W')) && (source != dest))
{
diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp
index 1bea10b70..240752099 100644
--- a/src/modules/m_silence.cpp
+++ b/src/modules/m_silence.cpp
@@ -32,7 +32,7 @@ class cmd_silence : public Command
TRANSLATE2(TR_TEXT, TR_END);
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
if (!pcnt)
{
@@ -142,7 +142,7 @@ class ModuleSilence : public Module
List[I_OnRehash] = List[I_OnUserQuit] = List[I_On005Numeric] = List[I_OnUserPreNotice] = List[I_OnUserPreMessage] = 1;
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
ConfigReader Conf(ServerInstance);
maxsilence = Conf.ReadInteger("silence", "maxentries", 0, true);
@@ -150,7 +150,7 @@ class ModuleSilence : public Module
maxsilence = 32;
}
- virtual void OnUserQuit(userrec* user, const std::string &reason, const std::string &oper_message)
+ virtual void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message)
{
// when the user quits tidy up any silence list they might have just to keep things tidy
// and to prevent a HONKING BIG MEMORY LEAK!
@@ -169,7 +169,7 @@ class ModuleSilence : public Module
output = output + " SILENCE=" + ConvToStr(maxsilence);
}
- virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
// im not sure how unreal's silence operates but ours is sensible. It blocks notices and
// privmsgs from people on the silence list, directed privately at the user.
@@ -177,7 +177,7 @@ class ModuleSilence : public Module
// a channel when you've set an ignore on the two most talkative people?)
if ((target_type == TYPE_USER) && (IS_LOCAL(user)))
{
- userrec* u = (userrec*)dest;
+ User* u = (User*)dest;
silencelist* sl;
u->GetExt("silence_list", sl);
if (sl)
@@ -194,7 +194,7 @@ class ModuleSilence : public Module
return 0;
}
- virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
return OnUserPreNotice(user,dest,target_type,text,status,exempt_list);
}
diff --git a/src/modules/m_silence_ext.cpp b/src/modules/m_silence_ext.cpp
index e9a4fdc78..c6fbcdbdc 100644
--- a/src/modules/m_silence_ext.cpp
+++ b/src/modules/m_silence_ext.cpp
@@ -62,7 +62,7 @@ class cmd_silence : public Command
TRANSLATE3(TR_TEXT, TR_TEXT, TR_END);
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
if (!pcnt)
{
@@ -243,7 +243,7 @@ class ModuleSilence : public Module
ServerInstance->AddCommand(mycommand);
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
ConfigReader Conf(ServerInstance);
maxsilence = Conf.ReadInteger("silence", "maxentries", 0, true);
@@ -256,7 +256,7 @@ class ModuleSilence : public Module
List[I_OnRehash] = List[I_OnBuildExemptList] = List[I_OnUserQuit] = List[I_On005Numeric] = List[I_OnUserPreNotice] = List[I_OnUserPreMessage] = List[I_OnUserPreInvite] = 1;
}
- virtual void OnUserQuit(userrec* user, const std::string &reason, const std::string &oper_message)
+ virtual void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message)
{
// when the user quits tidy up any silence list they might have just to keep things tidy
silencelist* sl;
@@ -274,7 +274,7 @@ class ModuleSilence : public Module
output = output + " ESILENCE SILENCE=" + ConvToStr(maxsilence);
}
- virtual void OnBuildExemptList(MessageType message_type, chanrec* chan, userrec* sender, char status, CUList &exempt_list, const std::string &text)
+ virtual void OnBuildExemptList(MessageType message_type, Channel* chan, User* sender, char status, CUList &exempt_list, const std::string &text)
{
int public_silence = (message_type == MSG_PRIVMSG ? SILENCE_CHANNEL : SILENCE_CNOTICE);
CUList *ulist;
@@ -306,18 +306,18 @@ class ModuleSilence : public Module
}
}
- virtual int PreText(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list, int silence_type)
+ virtual int PreText(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list, int silence_type)
{
if (!IS_LOCAL(user))
return 0;
if (target_type == TYPE_USER)
{
- return MatchPattern((userrec*)dest, user, silence_type);
+ return MatchPattern((User*)dest, user, silence_type);
}
else if (target_type == TYPE_CHANNEL)
{
- chanrec* chan = (chanrec*)dest;
+ Channel* chan = (Channel*)dest;
if (chan)
{
this->OnBuildExemptList((silence_type == SILENCE_PRIVATE ? MSG_PRIVMSG : MSG_NOTICE), chan, user, status, exempt_list, "");
@@ -326,22 +326,22 @@ class ModuleSilence : public Module
return 0;
}
- virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
return PreText(user, dest, target_type, text, status, exempt_list, SILENCE_PRIVATE);
}
- virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
return PreText(user, dest, target_type, text, status, exempt_list, SILENCE_NOTICE);
}
- virtual int OnUserPreInvite(userrec* source,userrec* dest,chanrec* channel)
+ virtual int OnUserPreInvite(User* source,User* dest,Channel* channel)
{
return MatchPattern(dest, source, SILENCE_INVITE);
}
- int MatchPattern(userrec* dest, userrec* source, int pattern)
+ int MatchPattern(User* dest, User* source, int pattern)
{
silencelist* sl;
dest->GetExt("silence_list", sl);
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 4a31d7007..62f288fb3 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -54,7 +54,7 @@ ModuleSpanningTree::ModuleSpanningTree(InspIRCd* Me)
ServerInstance->Timers->AddTimer(RefreshTimer);
}
-void ModuleSpanningTree::ShowLinks(TreeServer* Current, userrec* user, int hops)
+void ModuleSpanningTree::ShowLinks(TreeServer* Current, User* user, int hops)
{
std::string Parent = Utils->TreeRoot->GetName();
if (Current->GetParent())
@@ -98,14 +98,14 @@ int ModuleSpanningTree::CountServs()
return Utils->serverlist.size();
}
-void ModuleSpanningTree::HandleLinks(const char** parameters, int pcnt, userrec* user)
+void ModuleSpanningTree::HandleLinks(const char** parameters, int pcnt, User* user)
{
ShowLinks(Utils->TreeRoot,user,0);
user->WriteServ("365 %s * :End of /LINKS list.",user->nick);
return;
}
-void ModuleSpanningTree::HandleLusers(const char** parameters, int pcnt, userrec* user)
+void ModuleSpanningTree::HandleLusers(const char** parameters, int pcnt, User* user)
{
unsigned int n_users = ServerInstance->UserCount();
@@ -299,7 +299,7 @@ void ModuleSpanningTree::AutoConnectServers(time_t curtime)
}
}
-int ModuleSpanningTree::HandleVersion(const char** parameters, int pcnt, userrec* user)
+int ModuleSpanningTree::HandleVersion(const char** parameters, int pcnt, User* user)
{
// we've already checked if pcnt > 0, so this is safe
TreeServer* found = Utils->FindServerMask(parameters[0]);
@@ -326,7 +326,7 @@ int ModuleSpanningTree::HandleVersion(const char** parameters, int pcnt, userrec
* If the user is NULL, then the notice is sent locally via WriteToSnoMask with snomask 'l',
* and remotely via SNONOTICE with mask 'l'.
*/
-void ModuleSpanningTree::RemoteMessage(userrec* user, const char* format, ...)
+void ModuleSpanningTree::RemoteMessage(User* user, const char* format, ...)
{
/* This could cause an infinite loop, because DoOneToMany() will, on error,
* call TreeSocket::OnError(), which in turn will call this function to
@@ -369,7 +369,7 @@ void ModuleSpanningTree::RemoteMessage(userrec* user, const char* format, ...)
SendingRemoteMessage = false;
}
-int ModuleSpanningTree::HandleConnect(const char** parameters, int pcnt, userrec* user)
+int ModuleSpanningTree::HandleConnect(const char** parameters, int pcnt, User* user)
{
for (std::vector<Link>::iterator x = Utils->LinkBlocks.begin(); x < Utils->LinkBlocks.end(); x++)
{
@@ -413,7 +413,7 @@ void ModuleSpanningTree::OnGetServerDescription(const std::string &servername,st
}
}
-void ModuleSpanningTree::OnUserInvite(userrec* source,userrec* dest,chanrec* channel)
+void ModuleSpanningTree::OnUserInvite(User* source,User* dest,Channel* channel)
{
if (IS_LOCAL(source))
{
@@ -424,7 +424,7 @@ void ModuleSpanningTree::OnUserInvite(userrec* source,userrec* dest,chanrec* cha
}
}
-void ModuleSpanningTree::OnPostLocalTopicChange(userrec* user, chanrec* chan, const std::string &topic)
+void ModuleSpanningTree::OnPostLocalTopicChange(User* user, Channel* chan, const std::string &topic)
{
std::deque<std::string> params;
params.push_back(chan->name);
@@ -432,7 +432,7 @@ void ModuleSpanningTree::OnPostLocalTopicChange(userrec* user, chanrec* chan, co
Utils->DoOneToMany(user->uuid,"TOPIC",params);
}
-void ModuleSpanningTree::OnWallops(userrec* user, const std::string &text)
+void ModuleSpanningTree::OnWallops(User* user, const std::string &text)
{
if (IS_LOCAL(user))
{
@@ -442,11 +442,11 @@ void ModuleSpanningTree::OnWallops(userrec* user, const std::string &text)
}
}
-void ModuleSpanningTree::OnUserNotice(userrec* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list)
+void ModuleSpanningTree::OnUserNotice(User* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list)
{
if (target_type == TYPE_USER)
{
- userrec* d = (userrec*)dest;
+ User* d = (User*)dest;
if ((d->GetFd() < 0) && (IS_LOCAL(user)))
{
std::deque<std::string> params;
@@ -460,7 +460,7 @@ void ModuleSpanningTree::OnUserNotice(userrec* user, void* dest, int target_type
{
if (IS_LOCAL(user))
{
- chanrec *c = (chanrec*)dest;
+ Channel *c = (Channel*)dest;
if (c)
{
std::string cname = c->name;
@@ -490,13 +490,13 @@ void ModuleSpanningTree::OnUserNotice(userrec* user, void* dest, int target_type
}
}
-void ModuleSpanningTree::OnUserMessage(userrec* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list)
+void ModuleSpanningTree::OnUserMessage(User* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list)
{
if (target_type == TYPE_USER)
{
// route private messages which are targetted at clients only to the server
// which needs to receive them
- userrec* d = (userrec*)dest;
+ User* d = (User*)dest;
if ((d->GetFd() < 0) && (IS_LOCAL(user)))
{
std::deque<std::string> params;
@@ -510,7 +510,7 @@ void ModuleSpanningTree::OnUserMessage(userrec* user, void* dest, int target_typ
{
if (IS_LOCAL(user))
{
- chanrec *c = (chanrec*)dest;
+ Channel *c = (Channel*)dest;
if (c)
{
std::string cname = c->name;
@@ -546,7 +546,7 @@ void ModuleSpanningTree::OnBackgroundTimer(time_t curtime)
DoPingChecks(curtime);
}
-void ModuleSpanningTree::OnUserJoin(userrec* user, chanrec* channel, bool &silent)
+void ModuleSpanningTree::OnUserJoin(User* user, Channel* channel, bool &silent)
{
// Only do this for local users
if (IS_LOCAL(user))
@@ -576,7 +576,7 @@ void ModuleSpanningTree::OnUserJoin(userrec* user, chanrec* channel, bool &silen
}
}
-void ModuleSpanningTree::OnChangeHost(userrec* user, const std::string &newhost)
+void ModuleSpanningTree::OnChangeHost(User* user, const std::string &newhost)
{
// only occurs for local clients
if (user->registered != REG_ALL)
@@ -586,7 +586,7 @@ void ModuleSpanningTree::OnChangeHost(userrec* user, const std::string &newhost)
Utils->DoOneToMany(user->uuid,"FHOST",params);
}
-void ModuleSpanningTree::OnChangeName(userrec* user, const std::string &gecos)
+void ModuleSpanningTree::OnChangeName(User* user, const std::string &gecos)
{
// only occurs for local clients
if (user->registered != REG_ALL)
@@ -596,7 +596,7 @@ void ModuleSpanningTree::OnChangeName(userrec* user, const std::string &gecos)
Utils->DoOneToMany(user->uuid,"FNAME",params);
}
-void ModuleSpanningTree::OnUserPart(userrec* user, chanrec* channel, const std::string &partmessage, bool &silent)
+void ModuleSpanningTree::OnUserPart(User* user, Channel* channel, const std::string &partmessage, bool &silent)
{
if (IS_LOCAL(user))
{
@@ -608,7 +608,7 @@ void ModuleSpanningTree::OnUserPart(userrec* user, chanrec* channel, const std::
}
}
-void ModuleSpanningTree::OnUserConnect(userrec* user)
+void ModuleSpanningTree::OnUserConnect(User* user)
{
if (IS_LOCAL(user))
{
@@ -633,7 +633,7 @@ void ModuleSpanningTree::OnUserConnect(userrec* user)
}
}
-void ModuleSpanningTree::OnUserQuit(userrec* user, const std::string &reason, const std::string &oper_message)
+void ModuleSpanningTree::OnUserQuit(User* user, const std::string &reason, const std::string &oper_message)
{
if ((IS_LOCAL(user)) && (user->registered == REG_ALL))
{
@@ -656,7 +656,7 @@ void ModuleSpanningTree::OnUserQuit(userrec* user, const std::string &reason, co
}
}
-void ModuleSpanningTree::OnUserPostNick(userrec* user, const std::string &oldnick)
+void ModuleSpanningTree::OnUserPostNick(User* user, const std::string &oldnick)
{
if (IS_LOCAL(user))
{
@@ -673,7 +673,7 @@ void ModuleSpanningTree::OnUserPostNick(userrec* user, const std::string &oldnic
}
}
-void ModuleSpanningTree::OnUserKick(userrec* source, userrec* user, chanrec* chan, const std::string &reason, bool &silent)
+void ModuleSpanningTree::OnUserKick(User* source, User* user, Channel* chan, const std::string &reason, bool &silent)
{
if ((source) && (IS_LOCAL(source)))
{
@@ -693,7 +693,7 @@ void ModuleSpanningTree::OnUserKick(userrec* source, userrec* user, chanrec* cha
}
}
-void ModuleSpanningTree::OnRemoteKill(userrec* source, userrec* dest, const std::string &reason, const std::string &operreason)
+void ModuleSpanningTree::OnRemoteKill(User* source, User* dest, const std::string &reason, const std::string &operreason)
{
std::deque<std::string> params;
params.push_back(":"+reason);
@@ -705,7 +705,7 @@ void ModuleSpanningTree::OnRemoteKill(userrec* source, userrec* dest, const std:
Utils->DoOneToMany(source->uuid,"KILL",params);
}
-void ModuleSpanningTree::OnRehash(userrec* user, const std::string &parameter)
+void ModuleSpanningTree::OnRehash(User* user, const std::string &parameter)
{
if (!parameter.empty())
{
@@ -726,7 +726,7 @@ void ModuleSpanningTree::OnRehash(userrec* user, const std::string &parameter)
// note: the protocol does not allow direct umode +o except
// via NICK with 8 params. sending OPERTYPE infers +o modechange
// locally.
-void ModuleSpanningTree::OnOper(userrec* user, const std::string &opertype)
+void ModuleSpanningTree::OnOper(User* user, const std::string &opertype)
{
if (IS_LOCAL(user))
{
@@ -736,7 +736,7 @@ void ModuleSpanningTree::OnOper(userrec* user, const std::string &opertype)
}
}
-void ModuleSpanningTree::OnLine(userrec* source, const std::string &host, bool adding, char linetype, long duration, const std::string &reason)
+void ModuleSpanningTree::OnLine(User* source, const std::string &host, bool adding, char linetype, long duration, const std::string &reason)
{
if (!source)
{
@@ -775,47 +775,47 @@ void ModuleSpanningTree::OnLine(userrec* source, const std::string &host, bool a
}
}
-void ModuleSpanningTree::OnAddGLine(long duration, userrec* source, const std::string &reason, const std::string &hostmask)
+void ModuleSpanningTree::OnAddGLine(long duration, User* source, const std::string &reason, const std::string &hostmask)
{
OnLine(source,hostmask,true,'G',duration,reason);
}
-void ModuleSpanningTree::OnAddZLine(long duration, userrec* source, const std::string &reason, const std::string &ipmask)
+void ModuleSpanningTree::OnAddZLine(long duration, User* source, const std::string &reason, const std::string &ipmask)
{
OnLine(source,ipmask,true,'Z',duration,reason);
}
-void ModuleSpanningTree::OnAddQLine(long duration, userrec* source, const std::string &reason, const std::string &nickmask)
+void ModuleSpanningTree::OnAddQLine(long duration, User* source, const std::string &reason, const std::string &nickmask)
{
OnLine(source,nickmask,true,'Q',duration,reason);
}
-void ModuleSpanningTree::OnAddELine(long duration, userrec* source, const std::string &reason, const std::string &hostmask)
+void ModuleSpanningTree::OnAddELine(long duration, User* source, const std::string &reason, const std::string &hostmask)
{
OnLine(source,hostmask,true,'E',duration,reason);
}
-void ModuleSpanningTree::OnDelGLine(userrec* source, const std::string &hostmask)
+void ModuleSpanningTree::OnDelGLine(User* source, const std::string &hostmask)
{
OnLine(source,hostmask,false,'G',0,"");
}
-void ModuleSpanningTree::OnDelZLine(userrec* source, const std::string &ipmask)
+void ModuleSpanningTree::OnDelZLine(User* source, const std::string &ipmask)
{
OnLine(source,ipmask,false,'Z',0,"");
}
-void ModuleSpanningTree::OnDelQLine(userrec* source, const std::string &nickmask)
+void ModuleSpanningTree::OnDelQLine(User* source, const std::string &nickmask)
{
OnLine(source,nickmask,false,'Q',0,"");
}
-void ModuleSpanningTree::OnDelELine(userrec* source, const std::string &hostmask)
+void ModuleSpanningTree::OnDelELine(User* source, const std::string &hostmask)
{
OnLine(source,hostmask,false,'E',0,"");
}
-void ModuleSpanningTree::OnMode(userrec* user, void* dest, int target_type, const std::string &text)
+void ModuleSpanningTree::OnMode(User* user, void* dest, int target_type, const std::string &text)
{
if ((IS_LOCAL(user)) && (user->registered == REG_ALL))
{
@@ -827,14 +827,14 @@ void ModuleSpanningTree::OnMode(userrec* user, void* dest, int target_type, cons
if (target_type == TYPE_USER)
{
- userrec* u = (userrec*)dest;
+ User* u = (User*)dest;
params.push_back(u->uuid);
params.push_back(output_text);
command = "MODE";
}
else
{
- chanrec* c = (chanrec*)dest;
+ Channel* c = (Channel*)dest;
params.push_back(c->name);
params.push_back(ConvToStr(c->age));
params.push_back(output_text);
@@ -845,7 +845,7 @@ void ModuleSpanningTree::OnMode(userrec* user, void* dest, int target_type, cons
}
}
-void ModuleSpanningTree::OnSetAway(userrec* user)
+void ModuleSpanningTree::OnSetAway(User* user)
{
if (IS_LOCAL(user))
{
@@ -855,7 +855,7 @@ void ModuleSpanningTree::OnSetAway(userrec* user)
}
}
-void ModuleSpanningTree::OnCancelAway(userrec* user)
+void ModuleSpanningTree::OnCancelAway(User* user)
{
if (IS_LOCAL(user))
{
@@ -876,12 +876,12 @@ void ModuleSpanningTree::ProtoSendMode(void* opaque, int target_type, void* targ
{
if (target_type == TYPE_USER)
{
- userrec* u = (userrec*)target;
+ User* u = (User*)target;
s->WriteLine(std::string(":")+ServerInstance->Config->GetSID()+" FMODE "+u->uuid+" "+ConvToStr(u->age)+" "+output_text);
}
else
{
- chanrec* c = (chanrec*)target;
+ Channel* c = (Channel*)target;
s->WriteLine(std::string(":")+ServerInstance->Config->GetSID()+" FMODE "+c->name+" "+ConvToStr(c->age)+" "+output_text);
}
}
@@ -894,12 +894,12 @@ void ModuleSpanningTree::ProtoSendMetaData(void* opaque, int target_type, void*
{
if (target_type == TYPE_USER)
{
- userrec* u = (userrec*)target;
+ User* u = (User*)target;
s->WriteLine(std::string(":")+ServerInstance->Config->GetSID()+" METADATA "+u->uuid+" "+extname+" :"+extdata);
}
else if (target_type == TYPE_CHANNEL)
{
- chanrec* c = (chanrec*)target;
+ Channel* c = (Channel*)target;
s->WriteLine(std::string(":")+ServerInstance->Config->GetSID()+" METADATA "+c->name+" "+extname+" :"+extdata);
}
}
@@ -932,7 +932,7 @@ void ModuleSpanningTree::OnEvent(Event* event)
{
if (params->size() < 2)
return;
- // Insert the TS value of the object, either userrec or chanrec
+ // Insert the TS value of the object, either User or Channel
time_t ourTS = 0;
std::string output_text;
@@ -940,7 +940,7 @@ void ModuleSpanningTree::OnEvent(Event* event)
for (size_t n = 0; n < params->size(); n++)
ServerInstance->Parser->TranslateUIDs(TR_NICK, (*params)[n], (*params)[n]);
- userrec* a = ServerInstance->FindNick((*params)[0]);
+ User* a = ServerInstance->FindNick((*params)[0]);
if (a)
{
ourTS = a->age;
@@ -949,7 +949,7 @@ void ModuleSpanningTree::OnEvent(Event* event)
}
else
{
- chanrec* a = ServerInstance->FindChan((*params)[0]);
+ Channel* a = ServerInstance->FindChan((*params)[0]);
if (a)
{
ourTS = a->age;
@@ -996,7 +996,7 @@ void ModuleSpanningTree::OnEvent(Event* event)
if (params->size() < 2)
return;
- userrec *a = ServerInstance->FindNick((*params)[0]);
+ User *a = ServerInstance->FindNick((*params)[0]);
if (!a)
return;
diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h
index 9b697a89f..dab1b2420 100644
--- a/src/modules/m_spanningtree/main.h
+++ b/src/modules/m_spanningtree/main.h
@@ -63,7 +63,7 @@ class ModuleSpanningTree : public Module
/** Shows /LINKS
*/
- void ShowLinks(TreeServer* Current, userrec* user, int hops);
+ void ShowLinks(TreeServer* Current, User* user, int hops);
/** Counts local servers
*/
@@ -75,47 +75,47 @@ class ModuleSpanningTree : public Module
/** Handle LINKS command
*/
- void HandleLinks(const char** parameters, int pcnt, userrec* user);
+ void HandleLinks(const char** parameters, int pcnt, User* user);
/** Handle LUSERS command
*/
- void HandleLusers(const char** parameters, int pcnt, userrec* user);
+ void HandleLusers(const char** parameters, int pcnt, User* user);
/** Show MAP output to a user (recursive)
*/
- void ShowMap(TreeServer* Current, userrec* user, int depth, char matrix[128][128], float &totusers, float &totservers);
+ void ShowMap(TreeServer* Current, User* user, int depth, char matrix[128][128], float &totusers, float &totservers);
/** Handle remote MOTD
*/
- int HandleMotd(const char** parameters, int pcnt, userrec* user);
+ int HandleMotd(const char** parameters, int pcnt, User* user);
/** Handle remote ADMIN
*/
- int HandleAdmin(const char** parameters, int pcnt, userrec* user);
+ int HandleAdmin(const char** parameters, int pcnt, User* user);
/** Handle remote STATS
*/
- int HandleStats(const char** parameters, int pcnt, userrec* user);
+ int HandleStats(const char** parameters, int pcnt, User* user);
/** Handle MAP command
*/
- void HandleMap(const char** parameters, int pcnt, userrec* user);
+ void HandleMap(const char** parameters, int pcnt, User* user);
/** Handle SQUIT
*/
- int HandleSquit(const char** parameters, int pcnt, userrec* user);
+ int HandleSquit(const char** parameters, int pcnt, User* user);
/** Handle TIME
*/
- int HandleTime(const char** parameters, int pcnt, userrec* user);
+ int HandleTime(const char** parameters, int pcnt, User* user);
/** Handle remote WHOIS
*/
- int HandleRemoteWhois(const char** parameters, int pcnt, userrec* user);
+ int HandleRemoteWhois(const char** parameters, int pcnt, User* user);
/** Handle remote MODULES
*/
- int HandleModules(const char** parameters, int pcnt, userrec* user);
+ int HandleModules(const char** parameters, int pcnt, User* user);
/** Ping all local servers
*/
@@ -131,11 +131,11 @@ class ModuleSpanningTree : public Module
/** Handle remote VERSON
*/
- int HandleVersion(const char** parameters, int pcnt, userrec* user);
+ int HandleVersion(const char** parameters, int pcnt, User* user);
/** Handle CONNECT
*/
- int HandleConnect(const char** parameters, int pcnt, userrec* user);
+ int HandleConnect(const char** parameters, int pcnt, User* user);
/** Send out time sync to all servers
*/
@@ -143,7 +143,7 @@ class ModuleSpanningTree : public Module
/** Attempt to send a message to a user
*/
- void RemoteMessage(userrec* user, const char* format, ...);
+ void RemoteMessage(User* user, const char* format, ...);
/** Returns oper-specific MAP information
*/
@@ -157,39 +157,39 @@ class ModuleSpanningTree : public Module
** *** MODULE EVENTS ***
**/
- virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated, const std::string &original_line);
- virtual void OnPostCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, CmdResult result, const std::string &original_line);
+ virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line);
+ virtual void OnPostCommand(const std::string &command, const char** parameters, int pcnt, User *user, CmdResult result, const std::string &original_line);
virtual void OnGetServerDescription(const std::string &servername,std::string &description);
- virtual void OnUserInvite(userrec* source,userrec* dest,chanrec* channel);
- virtual void OnPostLocalTopicChange(userrec* user, chanrec* chan, const std::string &topic);
- virtual void OnWallops(userrec* user, const std::string &text);
- virtual void OnUserNotice(userrec* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list);
- virtual void OnUserMessage(userrec* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list);
+ virtual void OnUserInvite(User* source,User* dest,Channel* channel);
+ virtual void OnPostLocalTopicChange(User* user, Channel* chan, const std::string &topic);
+ virtual void OnWallops(User* user, const std::string &text);
+ virtual void OnUserNotice(User* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list);
+ virtual void OnUserMessage(User* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list);
virtual void OnBackgroundTimer(time_t curtime);
- virtual void OnUserJoin(userrec* user, chanrec* channel, bool &silent);
- virtual void OnChangeHost(userrec* user, const std::string &newhost);
- virtual void OnChangeName(userrec* user, const std::string &gecos);
- virtual void OnUserPart(userrec* user, chanrec* channel, const std::string &partmessage, bool &silent);
- virtual void OnUserConnect(userrec* user);
- virtual void OnUserQuit(userrec* user, const std::string &reason, const std::string &oper_message);
- virtual void OnUserPostNick(userrec* user, const std::string &oldnick);
- virtual void OnUserKick(userrec* source, userrec* user, chanrec* chan, const std::string &reason, bool &silent);
- virtual void OnRemoteKill(userrec* source, userrec* dest, const std::string &reason, const std::string &operreason);
- virtual void OnRehash(userrec* user, const std::string &parameter);
- virtual void OnOper(userrec* user, const std::string &opertype);
- void OnLine(userrec* source, const std::string &host, bool adding, char linetype, long duration, const std::string &reason);
- virtual void OnAddGLine(long duration, userrec* source, const std::string &reason, const std::string &hostmask);
- virtual void OnAddZLine(long duration, userrec* source, const std::string &reason, const std::string &ipmask);
- virtual void OnAddQLine(long duration, userrec* source, const std::string &reason, const std::string &nickmask);
- virtual void OnAddELine(long duration, userrec* source, const std::string &reason, const std::string &hostmask);
- virtual void OnDelGLine(userrec* source, const std::string &hostmask);
- virtual void OnDelZLine(userrec* source, const std::string &ipmask);
- virtual void OnDelQLine(userrec* source, const std::string &nickmask);
- virtual void OnDelELine(userrec* source, const std::string &hostmask);
- virtual void OnMode(userrec* user, void* dest, int target_type, const std::string &text);
- virtual int OnStats(char statschar, userrec* user, string_list &results);
- virtual void OnSetAway(userrec* user);
- virtual void OnCancelAway(userrec* user);
+ virtual void OnUserJoin(User* user, Channel* channel, bool &silent);
+ virtual void OnChangeHost(User* user, const std::string &newhost);
+ virtual void OnChangeName(User* user, const std::string &gecos);
+ virtual void OnUserPart(User* user, Channel* channel, const std::string &partmessage, bool &silent);
+ virtual void OnUserConnect(User* user);
+ virtual void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message);
+ virtual void OnUserPostNick(User* user, const std::string &oldnick);
+ virtual void OnUserKick(User* source, User* user, Channel* chan, const std::string &reason, bool &silent);
+ virtual void OnRemoteKill(User* source, User* dest, const std::string &reason, const std::string &operreason);
+ virtual void OnRehash(User* user, const std::string &parameter);
+ virtual void OnOper(User* user, const std::string &opertype);
+ void OnLine(User* source, const std::string &host, bool adding, char linetype, long duration, const std::string &reason);
+ virtual void OnAddGLine(long duration, User* source, const std::string &reason, const std::string &hostmask);
+ virtual void OnAddZLine(long duration, User* source, const std::string &reason, const std::string &ipmask);
+ virtual void OnAddQLine(long duration, User* source, const std::string &reason, const std::string &nickmask);
+ virtual void OnAddELine(long duration, User* source, const std::string &reason, const std::string &hostmask);
+ virtual void OnDelGLine(User* source, const std::string &hostmask);
+ virtual void OnDelZLine(User* source, const std::string &ipmask);
+ virtual void OnDelQLine(User* source, const std::string &nickmask);
+ virtual void OnDelELine(User* source, const std::string &hostmask);
+ virtual void OnMode(User* user, void* dest, int target_type, const std::string &text);
+ virtual int OnStats(char statschar, User* user, string_list &results);
+ virtual void OnSetAway(User* user);
+ virtual void OnCancelAway(User* user);
virtual void ProtoSendMode(void* opaque, int target_type, void* target, const std::string &modeline);
virtual void ProtoSendMetaData(void* opaque, int target_type, void* target, const std::string &extname, const std::string &extdata);
virtual void OnEvent(Event* event);
diff --git a/src/modules/m_spanningtree/override_admin.cpp b/src/modules/m_spanningtree/override_admin.cpp
index 41bb66570..0a122a780 100644
--- a/src/modules/m_spanningtree/override_admin.cpp
+++ b/src/modules/m_spanningtree/override_admin.cpp
@@ -33,7 +33,7 @@
/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */
-int ModuleSpanningTree::HandleAdmin(const char** parameters, int pcnt, userrec* user)
+int ModuleSpanningTree::HandleAdmin(const char** parameters, int pcnt, User* user)
{
if (pcnt > 0)
{
diff --git a/src/modules/m_spanningtree/override_map.cpp b/src/modules/m_spanningtree/override_map.cpp
index d6f39e6a8..d0940936a 100644
--- a/src/modules/m_spanningtree/override_map.cpp
+++ b/src/modules/m_spanningtree/override_map.cpp
@@ -40,7 +40,7 @@ const std::string ModuleSpanningTree::MapOperInfo(TreeServer* Current)
}
// WARNING: NOT THREAD SAFE - DONT GET ANY SMART IDEAS.
-void ModuleSpanningTree::ShowMap(TreeServer* Current, userrec* user, int depth, char matrix[128][128], float &totusers, float &totservers)
+void ModuleSpanningTree::ShowMap(TreeServer* Current, User* user, int depth, char matrix[128][128], float &totusers, float &totservers)
{
if (line < 128)
{
@@ -104,7 +104,7 @@ void ModuleSpanningTree::ShowMap(TreeServer* Current, userrec* user, int depth,
// and divisons, we instead render the map onto a backplane of characters
// (a character matrix), then draw the branches as a series of "L" shapes
// from the nodes. This is not only friendlier on CPU it uses less stack.
-void ModuleSpanningTree::HandleMap(const char** parameters, int pcnt, userrec* user)
+void ModuleSpanningTree::HandleMap(const char** parameters, int pcnt, User* user)
{
// This array represents a virtual screen which we will
// "scratch" draw to, as the console device of an irc
diff --git a/src/modules/m_spanningtree/override_modules.cpp b/src/modules/m_spanningtree/override_modules.cpp
index 21f6f7350..f32e3ced0 100644
--- a/src/modules/m_spanningtree/override_modules.cpp
+++ b/src/modules/m_spanningtree/override_modules.cpp
@@ -33,7 +33,7 @@
/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */
-int ModuleSpanningTree::HandleModules(const char** parameters, int pcnt, userrec* user)
+int ModuleSpanningTree::HandleModules(const char** parameters, int pcnt, User* user)
{
if (pcnt > 0)
{
diff --git a/src/modules/m_spanningtree/override_motd.cpp b/src/modules/m_spanningtree/override_motd.cpp
index df8331cb7..78e030429 100644
--- a/src/modules/m_spanningtree/override_motd.cpp
+++ b/src/modules/m_spanningtree/override_motd.cpp
@@ -33,7 +33,7 @@
/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */
-int ModuleSpanningTree::HandleMotd(const char** parameters, int pcnt, userrec* user)
+int ModuleSpanningTree::HandleMotd(const char** parameters, int pcnt, User* user)
{
if (pcnt > 0)
{
diff --git a/src/modules/m_spanningtree/override_squit.cpp b/src/modules/m_spanningtree/override_squit.cpp
index ce58744b7..8db459411 100644
--- a/src/modules/m_spanningtree/override_squit.cpp
+++ b/src/modules/m_spanningtree/override_squit.cpp
@@ -33,7 +33,7 @@
/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */
-int ModuleSpanningTree::HandleSquit(const char** parameters, int pcnt, userrec* user)
+int ModuleSpanningTree::HandleSquit(const char** parameters, int pcnt, User* user)
{
TreeServer* s = Utils->FindServerMask(parameters[0]);
if (s)
diff --git a/src/modules/m_spanningtree/override_stats.cpp b/src/modules/m_spanningtree/override_stats.cpp
index 05a8da8af..d9dca2827 100644
--- a/src/modules/m_spanningtree/override_stats.cpp
+++ b/src/modules/m_spanningtree/override_stats.cpp
@@ -33,7 +33,7 @@
/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */
-int ModuleSpanningTree::HandleStats(const char** parameters, int pcnt, userrec* user)
+int ModuleSpanningTree::HandleStats(const char** parameters, int pcnt, User* user)
{
if (pcnt > 1)
{
@@ -61,7 +61,7 @@ int ModuleSpanningTree::HandleStats(const char** parameters, int pcnt, userrec*
return 0;
}
-int ModuleSpanningTree::OnStats(char statschar, userrec* user, string_list &results)
+int ModuleSpanningTree::OnStats(char statschar, User* user, string_list &results)
{
if ((statschar == 'c') || (statschar == 'n'))
{
diff --git a/src/modules/m_spanningtree/override_time.cpp b/src/modules/m_spanningtree/override_time.cpp
index 6c093ba98..359275dfd 100644
--- a/src/modules/m_spanningtree/override_time.cpp
+++ b/src/modules/m_spanningtree/override_time.cpp
@@ -33,7 +33,7 @@
/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */
-int ModuleSpanningTree::HandleTime(const char** parameters, int pcnt, userrec* user)
+int ModuleSpanningTree::HandleTime(const char** parameters, int pcnt, User* user)
{
if ((IS_LOCAL(user)) && (pcnt))
{
diff --git a/src/modules/m_spanningtree/override_whois.cpp b/src/modules/m_spanningtree/override_whois.cpp
index 493735f6a..214c20da3 100644
--- a/src/modules/m_spanningtree/override_whois.cpp
+++ b/src/modules/m_spanningtree/override_whois.cpp
@@ -33,11 +33,11 @@
/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */
-int ModuleSpanningTree::HandleRemoteWhois(const char** parameters, int pcnt, userrec* user)
+int ModuleSpanningTree::HandleRemoteWhois(const char** parameters, int pcnt, User* user)
{
if ((IS_LOCAL(user)) && (pcnt > 1))
{
- userrec* remote = ServerInstance->FindNick(parameters[1]);
+ User* remote = ServerInstance->FindNick(parameters[1]);
if ((remote) && (remote->GetFd() < 0))
{
std::deque<std::string> params;
diff --git a/src/modules/m_spanningtree/postcommand.cpp b/src/modules/m_spanningtree/postcommand.cpp
index f538e2963..bf4232b96 100644
--- a/src/modules/m_spanningtree/postcommand.cpp
+++ b/src/modules/m_spanningtree/postcommand.cpp
@@ -33,7 +33,7 @@
/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */
-void ModuleSpanningTree::OnPostCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, CmdResult result, const std::string &original_line)
+void ModuleSpanningTree::OnPostCommand(const std::string &command, const char** parameters, int pcnt, User *user, CmdResult result, const std::string &original_line)
{
if ((result == CMD_SUCCESS) && (ServerInstance->IsValidModuleCommand(command, pcnt, user)))
{
diff --git a/src/modules/m_spanningtree/precommand.cpp b/src/modules/m_spanningtree/precommand.cpp
index c9afef795..1c854a1c1 100644
--- a/src/modules/m_spanningtree/precommand.cpp
+++ b/src/modules/m_spanningtree/precommand.cpp
@@ -33,7 +33,7 @@
/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */
-int ModuleSpanningTree::OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated, const std::string &original_line)
+int ModuleSpanningTree::OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line)
{
/* If the command doesnt appear to be valid, we dont want to mess with it. */
if (!validated)
diff --git a/src/modules/m_spanningtree/rconnect.cpp b/src/modules/m_spanningtree/rconnect.cpp
index 25bf833e1..a984472d1 100644
--- a/src/modules/m_spanningtree/rconnect.cpp
+++ b/src/modules/m_spanningtree/rconnect.cpp
@@ -36,7 +36,7 @@ cmd_rconnect::cmd_rconnect (InspIRCd* Instance, Module* Callback, SpanningTreeUt
syntax = "<remote-server-mask> <target-server-mask>";
}
-CmdResult cmd_rconnect::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_rconnect::Handle (const char** parameters, int pcnt, User *user)
{
if (IS_LOCAL(user))
{
diff --git a/src/modules/m_spanningtree/rconnect.h b/src/modules/m_spanningtree/rconnect.h
index 080d2aad6..ec33445ab 100644
--- a/src/modules/m_spanningtree/rconnect.h
+++ b/src/modules/m_spanningtree/rconnect.h
@@ -22,7 +22,7 @@ class cmd_rconnect : public Command
SpanningTreeUtilities* Utils; /* Utility class */
public:
cmd_rconnect (InspIRCd* Instance, Module* Callback, SpanningTreeUtilities* Util);
- CmdResult Handle (const char** parameters, int pcnt, userrec *user);
+ CmdResult Handle (const char** parameters, int pcnt, User *user);
};
#endif
diff --git a/src/modules/m_spanningtree/rsquit.cpp b/src/modules/m_spanningtree/rsquit.cpp
index 8c7e9d7f9..62f22bc4f 100644
--- a/src/modules/m_spanningtree/rsquit.cpp
+++ b/src/modules/m_spanningtree/rsquit.cpp
@@ -36,7 +36,7 @@ cmd_rsquit::cmd_rsquit (InspIRCd* Instance, Module* Callback, SpanningTreeUtilit
syntax = "<remote-server-mask> [target-server-mask]";
}
-CmdResult cmd_rsquit::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_rsquit::Handle (const char** parameters, int pcnt, User *user)
{
if (IS_LOCAL(user))
{
@@ -103,7 +103,7 @@ CmdResult cmd_rsquit::Handle (const char** parameters, int pcnt, userrec *user)
return CMD_SUCCESS;
}
-void cmd_rsquit::NoticeUser(userrec* user, const std::string &msg)
+void cmd_rsquit::NoticeUser(User* user, const std::string &msg)
{
if (IS_LOCAL(user))
{
diff --git a/src/modules/m_spanningtree/rsquit.h b/src/modules/m_spanningtree/rsquit.h
index d6285b83f..af2d347b1 100644
--- a/src/modules/m_spanningtree/rsquit.h
+++ b/src/modules/m_spanningtree/rsquit.h
@@ -22,8 +22,8 @@ class cmd_rsquit : public Command
SpanningTreeUtilities* Utils; /* Utility class */
public:
cmd_rsquit (InspIRCd* Instance, Module* Callback, SpanningTreeUtilities* Util);
- CmdResult Handle (const char** parameters, int pcnt, userrec *user);
- void NoticeUser(userrec* user, const std::string &msg);
+ CmdResult Handle (const char** parameters, int pcnt, User *user);
+ void NoticeUser(User* user, const std::string &msg);
};
#endif
diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp
index 4bedf8388..635d2cc18 100644
--- a/src/modules/m_spanningtree/treeserver.cpp
+++ b/src/modules/m_spanningtree/treeserver.cpp
@@ -149,7 +149,7 @@ bool TreeServer::DuplicateID()
int TreeServer::QuitUsers(const std::string &reason)
{
const char* reason_s = reason.c_str();
- std::vector<userrec*> time_to_die;
+ std::vector<User*> time_to_die;
for (user_hash::iterator n = ServerInstance->clientlist->begin(); n != ServerInstance->clientlist->end(); n++)
{
if (!strcmp(n->second->server, this->ServerName.c_str()))
@@ -157,15 +157,15 @@ int TreeServer::QuitUsers(const std::string &reason)
time_to_die.push_back(n->second);
}
}
- for (std::vector<userrec*>::iterator n = time_to_die.begin(); n != time_to_die.end(); n++)
+ for (std::vector<User*>::iterator n = time_to_die.begin(); n != time_to_die.end(); n++)
{
- userrec* a = (userrec*)*n;
+ User* a = (User*)*n;
if (!IS_LOCAL(a))
{
if (ServerInstance->Config->HideSplits)
- userrec::QuitUser(ServerInstance, a, "*.net *.split", reason_s);
+ User::QuitUser(ServerInstance, a, "*.net *.split", reason_s);
else
- userrec::QuitUser(ServerInstance, a, reason_s);
+ User::QuitUser(ServerInstance, a, reason_s);
if (this->Utils->quiet_bursts)
ServerInstance->GlobalCulls.MakeSilent(a);
diff --git a/src/modules/m_spanningtree/treesocket.h b/src/modules/m_spanningtree/treesocket.h
index a798976d2..08e308dfb 100644
--- a/src/modules/m_spanningtree/treesocket.h
+++ b/src/modules/m_spanningtree/treesocket.h
@@ -228,7 +228,7 @@ class TreeSocket : public InspSocket
bool ForceJoin(const std::string &source, std::deque<std::string> &params);
/* Used on nick collision ... XXX ugly function HACK */
- int DoCollision(userrec *u, time_t remotets, const char *remoteident, const char *remoteip, const char *remoteuid);
+ int DoCollision(User *u, time_t remotets, const char *remoteident, const char *remoteip, const char *remoteuid);
/** UID command */
bool ParseUID(const std::string &source, std::deque<std::string> &params);
@@ -237,7 +237,7 @@ class TreeSocket : public InspSocket
* If the length of a single line is more than 480-NICKMAX
* in length, it is split over multiple lines.
*/
- void SendFJoins(TreeServer* Current, chanrec* c);
+ void SendFJoins(TreeServer* Current, Channel* c);
/** Send G, Q, Z and E lines */
void SendXLines(TreeServer* Current);
diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp
index f75362bd3..4f6dae56a 100644
--- a/src/modules/m_spanningtree/treesocket1.cpp
+++ b/src/modules/m_spanningtree/treesocket1.cpp
@@ -622,7 +622,7 @@ bool TreeSocket::ForceMode(const std::string &source, std::deque<std::string> &p
bool smode = false;
std::string sourceserv;
/* Are we dealing with an FMODE from a user, or from a server? */
- userrec* who = this->Instance->FindNick(source);
+ User* who = this->Instance->FindNick(source);
if (who)
{
/* FMODE from a user, set sourceserv to the users server name */
@@ -632,7 +632,7 @@ bool TreeSocket::ForceMode(const std::string &source, std::deque<std::string> &p
{
/* FMODE from a server, use a fake user to receive mode feedback */
who = this->Instance->FakeClient;
- smode = true; /* Setting this flag tells us we should free the userrec later */
+ smode = true; /* Setting this flag tells us we should free the User later */
sourceserv = source; /* Set sourceserv to the actual source string */
}
const char* modelist[64];
@@ -656,9 +656,9 @@ bool TreeSocket::ForceMode(const std::string &source, std::deque<std::string> &p
}
}
- /* Extract the TS value of the object, either userrec or chanrec */
- userrec* dst = this->Instance->FindNick(params[0]);
- chanrec* chan = NULL;
+ /* Extract the TS value of the object, either User or Channel */
+ User* dst = this->Instance->FindNick(params[0]);
+ Channel* chan = NULL;
time_t ourTS = 0;
if (dst)
{
@@ -713,7 +713,7 @@ bool TreeSocket::ForceTopic(const std::string &source, std::deque<std::string> &
return true;
time_t ts = atoi(params[1].c_str());
std::string nsource = source;
- chanrec* c = this->Instance->FindChan(params[0]);
+ Channel* c = this->Instance->FindChan(params[0]);
if (c)
{
if ((ts >= c->topicset) || (!*c->topic))
@@ -728,7 +728,7 @@ bool TreeSocket::ForceTopic(const std::string &source, std::deque<std::string> &
*/
if (oldtopic != params[3])
{
- userrec* user = this->Instance->FindNick(source);
+ User* user = this->Instance->FindNick(source);
if (!user)
{
c->WriteChannelWithServ(Instance->Config->ServerName, "TOPIC %s :%s", c->name, c->topic);
@@ -789,12 +789,12 @@ bool TreeSocket::ForceJoin(const std::string &source, std::deque<std::string> &p
return true;
irc::modestacker modestack(true); /* Modes to apply from the users in the user list */
- userrec* who = NULL; /* User we are currently checking */
+ User* who = NULL; /* User we are currently checking */
std::string channel = params[0]; /* Channel name, as a string */
time_t TS = atoi(params[1].c_str()); /* Timestamp given to us for remote side */
irc::tokenstream users(params[2]); /* Users from the user list */
bool apply_other_sides_modes = true; /* True if we are accepting the other side's modes */
- chanrec* chan = this->Instance->FindChan(channel); /* The channel we're sending joins to */
+ Channel* chan = this->Instance->FindChan(channel); /* The channel we're sending joins to */
time_t ourTS = chan ? chan->age : Instance->Time(true)+600; /* The TS of our side of the link */
bool created = !chan; /* True if the channel doesnt exist here yet */
std::string item; /* One item in the list of nicks */
@@ -866,7 +866,7 @@ bool TreeSocket::ForceJoin(const std::string &source, std::deque<std::string> &p
for (std::string::iterator x = modes.begin(); x != modes.end(); ++x)
modestack.Push(*x, who->nick);
- chanrec::JoinUser(this->Instance, who, channel.c_str(), true, "", TS);
+ Channel::JoinUser(this->Instance, who, channel.c_str(), true, "", TS);
}
else
{
@@ -898,11 +898,11 @@ bool TreeSocket::ForceJoin(const std::string &source, std::deque<std::string> &p
/*
* Yes, this function looks a little ugly.
- * However, in some circumstances we may not have a userrec, so we need to do things this way.
+ * However, in some circumstances we may not have a User, so we need to do things this way.
* Returns 1 if colliding local client, 2 if colliding remote, 3 if colliding both.
* Sends SVSNICKs as appropriate and forces nickchanges too.
*/
-int TreeSocket::DoCollision(userrec *u, time_t remotets, const char *remoteident, const char *remoteip, const char *remoteuid)
+int TreeSocket::DoCollision(User *u, time_t remotets, const char *remoteident, const char *remoteip, const char *remoteuid)
{
/*
* Under old protocol rules, we would have had to kill both clients.
@@ -924,7 +924,7 @@ int TreeSocket::DoCollision(userrec *u, time_t remotets, const char *remoteident
bool bChangeLocal = true;
bool bChangeRemote = true;
- /* for brevity, don't use the userrec */
+ /* for brevity, don't use the User */
time_t localts = u->age;
const char *localident = u->ident;
const char *localip = u->GetIPString();
@@ -980,7 +980,7 @@ int TreeSocket::DoCollision(userrec *u, time_t remotets, const char *remoteident
* have 928AAAB's nick set to that.
* -- w00t
*/
- userrec *remote = this->Instance->FindUUID(remoteuid);
+ User *remote = this->Instance->FindUUID(remoteuid);
if (remote)
{
@@ -1066,10 +1066,10 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque<std::string> &pa
/* IMPORTANT NOTE: For remote users, we pass the UUID in the constructor. This automatically
* sets it up in the UUID hash for us.
*/
- userrec* _new = NULL;
+ User* _new = NULL;
try
{
- _new = new userrec(this->Instance, params[0]);
+ _new = new User(this->Instance, params[0]);
}
catch (...)
{
@@ -1142,7 +1142,7 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque<std::string> &pa
* If the length of a single line is more than 480-NICKMAX
* in length, it is split over multiple lines.
*/
-void TreeSocket::SendFJoins(TreeServer* Current, chanrec* c)
+void TreeSocket::SendFJoins(TreeServer* Current, Channel* c)
{
std::string buffer;
char list[MAXBUF];
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp
index becfc785b..0c2e99041 100644
--- a/src/modules/m_spanningtree/treesocket2.cpp
+++ b/src/modules/m_spanningtree/treesocket2.cpp
@@ -67,7 +67,7 @@ bool TreeSocket::Modules(const std::string &prefix, std::deque<std::string> &par
par.push_back(prefix);
par.push_back("");
- userrec* source = this->Instance->FindNick(prefix);
+ User* source = this->Instance->FindNick(prefix);
if (!source)
return true;
@@ -114,7 +114,7 @@ bool TreeSocket::Motd(const std::string &prefix, std::deque<std::string> &params
{
/* It's for our server */
string_list results;
- userrec* source = this->Instance->FindNick(prefix);
+ User* source = this->Instance->FindNick(prefix);
if (source)
{
@@ -145,7 +145,7 @@ bool TreeSocket::Motd(const std::string &prefix, std::deque<std::string> &params
else
{
/* Pass it on */
- userrec* source = this->Instance->FindNick(prefix);
+ User* source = this->Instance->FindNick(prefix);
if (source)
Utils->DoOneToOne(prefix, "MOTD", params, params[0]);
}
@@ -162,7 +162,7 @@ bool TreeSocket::Admin(const std::string &prefix, std::deque<std::string> &param
{
/* It's for our server */
string_list results;
- userrec* source = this->Instance->FindNick(prefix);
+ User* source = this->Instance->FindNick(prefix);
if (source)
{
std::deque<std::string> par;
@@ -181,7 +181,7 @@ bool TreeSocket::Admin(const std::string &prefix, std::deque<std::string> &param
else
{
/* Pass it on */
- userrec* source = this->Instance->FindNick(prefix);
+ User* source = this->Instance->FindNick(prefix);
if (source)
Utils->DoOneToOne(prefix, "ADMIN", params, params[0]);
}
@@ -200,7 +200,7 @@ bool TreeSocket::Stats(const std::string &prefix, std::deque<std::string> &param
{
/* It's for our server */
string_list results;
- userrec* source = this->Instance->FindNick(prefix);
+ User* source = this->Instance->FindNick(prefix);
if (source)
{
std::deque<std::string> par;
@@ -217,7 +217,7 @@ bool TreeSocket::Stats(const std::string &prefix, std::deque<std::string> &param
else
{
/* Pass it on */
- userrec* source = this->Instance->FindNick(prefix);
+ User* source = this->Instance->FindNick(prefix);
if (source)
Utils->DoOneToOne(source->uuid, "STATS", params, params[1]);
}
@@ -234,7 +234,7 @@ bool TreeSocket::OperType(const std::string &prefix, std::deque<std::string> &pa
if (params.size() != 1)
return true;
std::string opertype = params[0];
- userrec* u = this->Instance->FindNick(prefix);
+ User* u = this->Instance->FindNick(prefix);
if (u)
{
if (!u->IsModeSet('o'))
@@ -276,7 +276,7 @@ bool TreeSocket::ForceNick(const std::string &prefix, std::deque<std::string> &p
if (params.size() < 3)
return true;
- userrec* u = this->Instance->FindNick(params[0]);
+ User* u = this->Instance->FindNick(params[0]);
if (u)
{
@@ -292,7 +292,7 @@ bool TreeSocket::ForceNick(const std::string &prefix, std::deque<std::string> &p
/* buh. UID them */
if (!u->ForceNickChange(u->uuid))
{
- userrec::QuitUser(this->Instance, u, "Nickname collision");
+ User::QuitUser(this->Instance, u, "Nickname collision");
return true;
}
}
@@ -309,7 +309,7 @@ bool TreeSocket::OperQuit(const std::string &prefix, std::deque<std::string> &pa
if (params.size() < 1)
return true;
- userrec* u = this->Instance->FindNick(prefix);
+ User* u = this->Instance->FindNick(prefix);
if (u)
{
@@ -328,13 +328,13 @@ bool TreeSocket::ServiceJoin(const std::string &prefix, std::deque<std::string>
if (!this->Instance->IsChannel(params[1].c_str()))
return true;
- userrec* u = this->Instance->FindNick(params[0]);
+ User* u = this->Instance->FindNick(params[0]);
if (u)
{
/* only join if it's local, otherwise just pass it on! */
if (IS_LOCAL(u))
- chanrec::JoinUser(this->Instance, u, params[1].c_str(), false, "", Instance->Time());
+ Channel::JoinUser(this->Instance, u, params[1].c_str(), false, "", Instance->Time());
Utils->DoOneToAllButSender(prefix,"SVSJOIN",params,prefix);
}
return true;
@@ -348,8 +348,8 @@ bool TreeSocket::ServicePart(const std::string &prefix, std::deque<std::string>
if (!this->Instance->IsChannel(params[1].c_str()))
return true;
- userrec* u = this->Instance->FindNick(params[0]);
- chanrec* c = this->Instance->FindChan(params[1]);
+ User* u = this->Instance->FindNick(params[0]);
+ Channel* c = this->Instance->FindChan(params[1]);
if (u)
{
@@ -386,7 +386,7 @@ bool TreeSocket::RemoteKill(const std::string &prefix, std::deque<std::string> &
if (params.size() != 2)
return true;
- userrec* who = this->Instance->FindNick(params[0]);
+ User* who = this->Instance->FindNick(params[0]);
if (who)
{
@@ -401,7 +401,7 @@ bool TreeSocket::RemoteKill(const std::string &prefix, std::deque<std::string> &
// NOTE: This is safe with kill hiding on, as RemoteKill is only reached if we have a server prefix.
// in short this is not executed for USERS.
who->Write(":%s KILL %s :%s (%s)", prefix.c_str(), who->nick, prefix.c_str(), reason.c_str());
- userrec::QuitUser(this->Instance,who,reason);
+ User::QuitUser(this->Instance,who,reason);
}
return true;
}
@@ -434,7 +434,7 @@ bool TreeSocket::LocalPong(const std::string &prefix, std::deque<std::string> &p
* dump the PONG reply back to their fd. If its a server, do nowt.
* Services might want to send these s->s, but we dont need to yet.
*/
- userrec* u = this->Instance->FindNick(prefix);
+ User* u = this->Instance->FindNick(prefix);
if (u)
{
u->WriteServ("PONG %s %s",params[0].c_str(),params[1].c_str());
@@ -467,7 +467,7 @@ bool TreeSocket::MetaData(const std::string &prefix, std::deque<std::string> &pa
}
else if (*(params[0].c_str()) == '#')
{
- chanrec* c = this->Instance->FindChan(params[0]);
+ Channel* c = this->Instance->FindChan(params[0]);
if (c)
{
FOREACH_MOD_I(this->Instance,I_OnDecodeMetaData,OnDecodeMetaData(TYPE_CHANNEL,c,params[1],params[2]));
@@ -475,7 +475,7 @@ bool TreeSocket::MetaData(const std::string &prefix, std::deque<std::string> &pa
}
else if (*(params[0].c_str()) != '#')
{
- userrec* u = this->Instance->FindNick(params[0]);
+ User* u = this->Instance->FindNick(params[0]);
if (u)
{
FOREACH_MOD_I(this->Instance,I_OnDecodeMetaData,OnDecodeMetaData(TYPE_USER,u,params[1],params[2]));
@@ -508,7 +508,7 @@ bool TreeSocket::ChangeHost(const std::string &prefix, std::deque<std::string> &
{
if (params.size() < 1)
return true;
- userrec* u = this->Instance->FindNick(prefix);
+ User* u = this->Instance->FindNick(prefix);
if (u)
{
@@ -587,7 +587,7 @@ bool TreeSocket::ChangeName(const std::string &prefix, std::deque<std::string> &
{
if (params.size() < 1)
return true;
- userrec* u = this->Instance->FindNick(prefix);
+ User* u = this->Instance->FindNick(prefix);
if (u)
{
u->ChangeName(params[0].c_str());
@@ -601,16 +601,16 @@ bool TreeSocket::Whois(const std::string &prefix, std::deque<std::string> &param
{
if (params.size() < 1)
return true;
- userrec* u = this->Instance->FindNick(prefix);
+ User* u = this->Instance->FindNick(prefix);
if (u)
{
// an incoming request
if (params.size() == 1)
{
- userrec* x = this->Instance->FindNick(params[0]);
+ User* x = this->Instance->FindNick(params[0]);
if ((x) && (IS_LOCAL(x)))
{
- userrec* x = this->Instance->FindNick(params[0]);
+ User* x = this->Instance->FindNick(params[0]);
char signon[MAXBUF];
char idle[MAXBUF];
snprintf(signon, MAXBUF, "%lu", (unsigned long)x->signon);
@@ -632,7 +632,7 @@ bool TreeSocket::Whois(const std::string &prefix, std::deque<std::string> &param
else if (params.size() == 3)
{
std::string who_did_the_whois = params[0];
- userrec* who_to_send_to = this->Instance->FindNick(who_did_the_whois);
+ User* who_to_send_to = this->Instance->FindNick(who_did_the_whois);
if ((who_to_send_to) && (IS_LOCAL(who_to_send_to)))
{
// an incoming reply to a whois we sent out
@@ -659,7 +659,7 @@ bool TreeSocket::Push(const std::string &prefix, std::deque<std::string> &params
{
if (params.size() < 2)
return true;
- userrec* u = this->Instance->FindNick(params[0]);
+ User* u = this->Instance->FindNick(params[0]);
if (!u)
return true;
if (IS_LOCAL(u))
@@ -710,7 +710,7 @@ bool TreeSocket::Time(const std::string &prefix, std::deque<std::string> &params
// someone querying our time?
if (this->Instance->Config->ServerName == params[0] || this->Instance->Config->GetSID() == params[0])
{
- userrec* u = this->Instance->FindNick(params[1]);
+ User* u = this->Instance->FindNick(params[1]);
if (u)
{
params.push_back(ConvToStr(Instance->Time(false)));
@@ -721,7 +721,7 @@ bool TreeSocket::Time(const std::string &prefix, std::deque<std::string> &params
else
{
// not us, pass it on
- userrec* u = this->Instance->FindNick(params[1]);
+ User* u = this->Instance->FindNick(params[1]);
if (u)
Utils->DoOneToOne(prefix,"TIME",params,params[0]);
}
@@ -729,7 +729,7 @@ bool TreeSocket::Time(const std::string &prefix, std::deque<std::string> &params
else if (params.size() == 3)
{
// a response to a previous TIME
- userrec* u = this->Instance->FindNick(params[1]);
+ User* u = this->Instance->FindNick(params[1]);
if ((u) && (IS_LOCAL(u)))
{
time_t rawtime = atol(params[2].c_str());
@@ -784,7 +784,7 @@ bool TreeSocket::RemoveStatus(const std::string &prefix, std::deque<std::string>
{
if (params.size() < 1)
return true;
- chanrec* c = Instance->FindChan(params[0]);
+ Channel* c = Instance->FindChan(params[0]);
if (c)
{
for (char modeletter = 'A'; modeletter <= 'z'; modeletter++)
@@ -1208,7 +1208,7 @@ bool TreeSocket::ProcessLine(std::string &line)
{
std::string direction = prefix;
- userrec *t = this->Instance->FindUUID(prefix);
+ User *t = this->Instance->FindUUID(prefix);
if (t)
{
direction = t->server;
@@ -1239,10 +1239,10 @@ bool TreeSocket::ProcessLine(std::string &line)
if ((command == "MODE") && (params.size() >= 2))
{
- chanrec* channel = Instance->FindChan(params[0]);
+ Channel* channel = Instance->FindChan(params[0]);
if (channel)
{
- userrec* x = Instance->FindNick(prefix);
+ User* x = Instance->FindNick(prefix);
if (x)
{
if (warned.find(x->server) == warned.end())
@@ -1421,8 +1421,8 @@ bool TreeSocket::ProcessLine(std::string &line)
std::string sourceserv = this->myhost;
if (params.size() == 3)
{
- userrec* user = this->Instance->FindNick(params[1]);
- chanrec* chan = this->Instance->FindChan(params[0]);
+ User* user = this->Instance->FindNick(params[1]);
+ Channel* chan = this->Instance->FindChan(params[0]);
if (user && chan)
{
if (!chan->ServerKickUser(user, params[2].c_str(), false))
@@ -1504,7 +1504,7 @@ bool TreeSocket::ProcessLine(std::string &line)
* Not a special s2s command. Emulate the user doing it.
* This saves us having a huge ugly command parser again.
*/
- userrec *who = this->Instance->FindUUID(prefix);
+ User *who = this->Instance->FindUUID(prefix);
std::string sourceserv = this->myhost;
if (!this->InboundServerName.empty())
@@ -1539,7 +1539,7 @@ bool TreeSocket::ProcessLine(std::string &line)
* already exist here. If it does, kill their copy,
* and our copy.
*/
- userrec* x = this->Instance->FindNickOnly(params[0]);
+ User* x = this->Instance->FindNickOnly(params[0]);
if ((x) && (x != who))
{
int collideret = 0;
@@ -1567,11 +1567,11 @@ Old nickname collision logic..
p.push_back(prefix);
p.push_back(":Nickname collision");
Utils->DoOneToMany(this->Instance->Config->ServerName,"KILL",p);
- userrec::QuitUser(this->Instance,x,"Nickname collision ("+prefix+" -> "+params[0]+")");
- userrec* y = this->Instance->FindNick(prefix);
+ User::QuitUser(this->Instance,x,"Nickname collision ("+prefix+" -> "+params[0]+")");
+ User* y = this->Instance->FindNick(prefix);
if (y)
{
- userrec::QuitUser(this->Instance,y,"Nickname collision");
+ User::QuitUser(this->Instance,y,"Nickname collision");
}
return Utils->DoOneToAllButSenderRaw(line,sourceserv,prefix,command,params);
*/
diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp
index abc251ab0..4814013e6 100644
--- a/src/modules/m_spanningtree/utils.cpp
+++ b/src/modules/m_spanningtree/utils.cpp
@@ -230,7 +230,7 @@ void SpanningTreeUtilities::AddThisServer(TreeServer* server, TreeServerList &li
}
/* returns a list of DIRECT servernames for a specific channel */
-void SpanningTreeUtilities::GetListOfServersForChannel(chanrec* c, TreeServerList &list, char status, const CUList &exempt_list)
+void SpanningTreeUtilities::GetListOfServersForChannel(Channel* c, TreeServerList &list, char status, const CUList &exempt_list)
{
CUList *ulist;
switch (status)
@@ -277,7 +277,7 @@ bool SpanningTreeUtilities::DoOneToAllButSenderRaw(const std::string &data, cons
if ((*(params[0].c_str()) != '#') && (*(params[0].c_str()) != '$'))
{
// special routing for private messages/notices
- userrec* d = ServerInstance->FindNick(params[0]);
+ User* d = ServerInstance->FindNick(params[0]);
if (d)
{
std::deque<std::string> par;
@@ -297,8 +297,8 @@ bool SpanningTreeUtilities::DoOneToAllButSenderRaw(const std::string &data, cons
}
else
{
- chanrec* c = ServerInstance->FindChan(params[0]);
- userrec* u = ServerInstance->FindNick(prefix);
+ Channel* c = ServerInstance->FindChan(params[0]);
+ User* u = ServerInstance->FindNick(prefix);
if (c && u)
{
CUList elist;
diff --git a/src/modules/m_spanningtree/utils.h b/src/modules/m_spanningtree/utils.h
index 0203e7602..aeb89c6be 100644
--- a/src/modules/m_spanningtree/utils.h
+++ b/src/modules/m_spanningtree/utils.h
@@ -158,7 +158,7 @@ class SpanningTreeUtilities
void AddThisServer(TreeServer* server, TreeServerList &list);
/** Compile a list of servers which contain members of channel c
*/
- void GetListOfServersForChannel(chanrec* c, TreeServerList &list, char status, const CUList &exempt_list);
+ void GetListOfServersForChannel(Channel* c, TreeServerList &list, char status, const CUList &exempt_list);
/** Find a server by name
*/
TreeServer* FindServer(const std::string &ServerName);
diff --git a/src/modules/m_spy.cpp b/src/modules/m_spy.cpp
index 8e42f9c75..76ae8cfa4 100644
--- a/src/modules/m_spy.cpp
+++ b/src/modules/m_spy.cpp
@@ -16,7 +16,7 @@
#include "inspircd.h"
#include "wildcard.h"
-void spy_userlist(userrec *user, chanrec *c)
+void spy_userlist(User *user, Channel *c)
{
char list[MAXBUF];
size_t dlen, curlen;
@@ -72,7 +72,7 @@ class cmd_spylist : public Command
syntax.clear();
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
ServerInstance->WriteOpers("*** Oper %s used SPYLIST to list +s/+p channels and keys.",user->nick);
user->WriteServ("321 %s Channel :Users Name",user->nick);
@@ -100,9 +100,9 @@ class cmd_spynames : public Command
syntax = "{<channel>{,<channel>}}";
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
- chanrec* c = NULL;
+ Channel* c = NULL;
if (!pcnt)
{
diff --git a/src/modules/m_ssl_dummy.cpp b/src/modules/m_ssl_dummy.cpp
index 6b9f6d46c..4a91feada 100644
--- a/src/modules/m_ssl_dummy.cpp
+++ b/src/modules/m_ssl_dummy.cpp
@@ -41,7 +41,7 @@ class ModuleSSLDummy : public Module
}
// :kenny.chatspike.net 320 Om Epy|AFK :is a Secure Connection
- virtual void OnWhois(userrec* source, userrec* dest)
+ virtual void OnWhois(User* source, User* dest)
{
if(dest->GetExt("ssl", dummy))
{
@@ -49,7 +49,7 @@ class ModuleSSLDummy : public Module
}
}
- virtual void OnSyncUserMetaData(userrec* user, Module* proto, void* opaque, const std::string &extname, bool displayable)
+ virtual void OnSyncUserMetaData(User* user, Module* proto, void* opaque, const std::string &extname, bool displayable)
{
// check if the linking module wants to know about OUR metadata
if(extname == "ssl")
@@ -69,7 +69,7 @@ class ModuleSSLDummy : public Module
// check if its our metadata key, and its associated with a user
if ((target_type == TYPE_USER) && (extname == "ssl"))
{
- userrec* dest = (userrec*)target;
+ User* dest = (User*)target;
// if they dont already have an ssl flag, accept the remote server's
if (!dest->GetExt(extname, dummy))
{
diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp
index a9c5b89b3..e31d41c0b 100644
--- a/src/modules/m_sslmodes.cpp
+++ b/src/modules/m_sslmodes.cpp
@@ -24,7 +24,7 @@ class SSLMode : public ModeHandler
public:
SSLMode(InspIRCd* Instance) : ModeHandler(Instance, 'z', 0, 0, false, MODETYPE_CHANNEL, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (adding)
{
@@ -84,7 +84,7 @@ class ModuleSSLModes : public Module
List[I_OnUserPreJoin] = 1;
}
- virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
{
if(chan && chan->IsModeSet('z'))
{
diff --git a/src/modules/m_stripcolor.cpp b/src/modules/m_stripcolor.cpp
index ba8913600..8ed4bb49b 100644
--- a/src/modules/m_stripcolor.cpp
+++ b/src/modules/m_stripcolor.cpp
@@ -22,7 +22,7 @@ class ChannelStripColor : public ModeHandler
public:
ChannelStripColor(InspIRCd* Instance) : ModeHandler(Instance, 'S', 0, 0, false, MODETYPE_CHANNEL, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
if (adding)
{
@@ -52,7 +52,7 @@ class UserStripColor : public ModeHandler
public:
UserStripColor(InspIRCd* Instance) : ModeHandler(Instance, 'S', 0, 0, false, MODETYPE_USER, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
{
/* Only opers can change other users modes */
if (source != dest)
@@ -138,7 +138,7 @@ class ModuleStripColor : public Module
}
}
- virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
if (!IS_LOCAL(user))
return 0;
@@ -146,12 +146,12 @@ class ModuleStripColor : public Module
bool active = false;
if (target_type == TYPE_USER)
{
- userrec* t = (userrec*)dest;
+ User* t = (User*)dest;
active = t->IsModeSet('S');
}
else if (target_type == TYPE_CHANNEL)
{
- chanrec* t = (chanrec*)dest;
+ Channel* t = (Channel*)dest;
// check if we allow ops to bypass filtering, if we do, check if they're opped accordingly.
// note: short circut logic here, don't wreck it. -- w00t
@@ -167,7 +167,7 @@ class ModuleStripColor : public Module
return 0;
}
- virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
return OnUserPreMessage(user,dest,target_type,text,status,exempt_list);
}
diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp
index f26454d3e..7988d73ba 100644
--- a/src/modules/m_svshold.cpp
+++ b/src/modules/m_svshold.cpp
@@ -57,7 +57,7 @@ class cmd_svshold : public Command
TRANSLATE4(TR_NICK, TR_TEXT, TR_TEXT, TR_END);
}
- CmdResult Handle(const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle(const char** parameters, int pcnt, User *user)
{
/* syntax: svshold nickname time :reason goes here */
/* 'time' is a human-readable timestring, like 2d3h2s. */
@@ -166,7 +166,7 @@ class ModuleSVSHold : public Module
List[I_OnUserPreNick] = List[I_OnSyncOtherMetaData] = List[I_OnDecodeMetaData] = List[I_OnStats] = 1;
}
- virtual int OnStats(char symbol, userrec* user, string_list &results)
+ virtual int OnStats(char symbol, User* user, string_list &results)
{
ExpireBans();
@@ -182,7 +182,7 @@ class ModuleSVSHold : public Module
return 0;
}
- virtual int OnUserPreNick(userrec *user, const std::string &newnick)
+ virtual int OnUserPreNick(User *user, const std::string &newnick)
{
ExpireBans();
diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp
index 3e8c53ea1..196c43553 100644
--- a/src/modules/m_swhois.cpp
+++ b/src/modules/m_swhois.cpp
@@ -28,9 +28,9 @@ class cmd_swhois : public Command
TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
}
- CmdResult Handle(const char** parameters, int pcnt, userrec* user)
+ CmdResult Handle(const char** parameters, int pcnt, User* user)
{
- userrec* dest = ServerInstance->FindNick(parameters[0]);
+ User* dest = ServerInstance->FindNick(parameters[0]);
if (!dest)
{
@@ -110,7 +110,7 @@ class ModuleSWhois : public Module
ServerInstance->AddCommand(mycommand);
}
- void OnRehash(userrec* user, const std::string &parameter)
+ void OnRehash(User* user, const std::string &parameter)
{
DELETE(Conf);
Conf = new ConfigReader(ServerInstance);
@@ -122,7 +122,7 @@ class ModuleSWhois : public Module
}
// :kenny.chatspike.net 320 Brain Azhrarn :is getting paid to play games.
- int OnWhoisLine(userrec* user, userrec* dest, int &numeric, std::string &text)
+ int OnWhoisLine(User* user, User* dest, int &numeric, std::string &text)
{
/* We use this and not OnWhois because this triggers for remote, too */
if (numeric == 312)
@@ -140,11 +140,11 @@ class ModuleSWhois : public Module
}
// Whenever the linking module wants to send out data, but doesnt know what the data
- // represents (e.g. it is metadata, added to a userrec or chanrec by a module) then
+ // represents (e.g. it is metadata, added to a User or Channel by a module) then
// this method is called. We should use the ProtoSendMetaData function after we've
// corrected decided how the data should look, to send the metadata on its way if
// it is ours.
- virtual void OnSyncUserMetaData(userrec* user, Module* proto, void* opaque, const std::string &extname, bool displayable)
+ virtual void OnSyncUserMetaData(User* user, Module* proto, void* opaque, const std::string &extname, bool displayable)
{
// check if the linking module wants to know about OUR metadata
if (extname == "swhois")
@@ -162,7 +162,7 @@ class ModuleSWhois : public Module
}
// when a user quits, tidy up their metadata
- virtual void OnUserQuit(userrec* user, const std::string &message, const std::string &oper_message)
+ virtual void OnUserQuit(User* user, const std::string &message, const std::string &oper_message)
{
std::string* swhois;
user->GetExt("swhois", swhois);
@@ -178,7 +178,7 @@ class ModuleSWhois : public Module
{
if (target_type == TYPE_USER)
{
- userrec* user = (userrec*)item;
+ User* user = (User*)item;
std::string* swhois;
user->GetExt("swhois", swhois);
if (swhois)
@@ -201,7 +201,7 @@ class ModuleSWhois : public Module
// check if its our metadata key, and its associated with a user
if ((target_type == TYPE_USER) && (extname == "swhois"))
{
- userrec* dest = (userrec*)target;
+ User* dest = (User*)target;
// if they dont already have an swhois field, accept the remote server's
std::string* text;
if (!dest->GetExt("swhois", text))
@@ -212,7 +212,7 @@ class ModuleSWhois : public Module
}
}
- virtual void OnPostCommand(const std::string &command, const char **params, int pcnt, userrec *user, CmdResult result, const std::string &original_line)
+ virtual void OnPostCommand(const std::string &command, const char **params, int pcnt, User *user, CmdResult result, const std::string &original_line)
{
if ((command != "OPER") || (result != CMD_SUCCESS))
return;
diff --git a/src/modules/m_taxonomy.cpp b/src/modules/m_taxonomy.cpp
index da8ad9749..bf77c5812 100644
--- a/src/modules/m_taxonomy.cpp
+++ b/src/modules/m_taxonomy.cpp
@@ -29,9 +29,9 @@ class cmd_taxonomy : public Command
syntax = "<nickname>";
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
- userrec* dest = ServerInstance->FindNick(parameters[0]);
+ User* dest = ServerInstance->FindNick(parameters[0]);
if (dest)
{
std::deque<std::string> list;
@@ -76,7 +76,7 @@ class ModuleTaxonomy : public Module
{
if (target_type == TYPE_USER)
{
- userrec* spool = (userrec*)opaque;
+ User* spool = (User*)opaque;
std::string taxstr = "304 " + std::string(spool->nick) + ":TAXONOMY METADATA "+extname+" = "+extdata;
spool->WriteServ(taxstr);
claimed = true;
diff --git a/src/modules/m_testcommand.cpp b/src/modules/m_testcommand.cpp
index d99a51c7d..58fd466df 100644
--- a/src/modules/m_testcommand.cpp
+++ b/src/modules/m_testcommand.cpp
@@ -26,7 +26,7 @@ class cmd_dalinfo : public Command
this->source = "m_testcommand.so";
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
user->WriteServ("NOTICE %s :*** DALNet had nothing to do with it.", user->nick);
return CMD_FAILURE;
diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp
index 714b8b40a..a226b9747 100644
--- a/src/modules/m_timedbans.cpp
+++ b/src/modules/m_timedbans.cpp
@@ -40,9 +40,9 @@ class cmd_tban : public Command
TRANSLATE4(TR_TEXT, TR_TEXT, TR_TEXT, TR_END);
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
- chanrec* channel = ServerInstance->FindChan(parameters[0]);
+ Channel* channel = ServerInstance->FindChan(parameters[0]);
if (channel)
{
int cm = channel->GetStatus(user);
@@ -125,7 +125,7 @@ class ModuleTimedBans : public Module
List[I_OnDelBan] = List[I_OnBackgroundTimer] = 1;
}
- virtual int OnDelBan(userrec* source, chanrec* chan, const std::string &banmask)
+ virtual int OnDelBan(User* source, Channel* chan, const std::string &banmask)
{
irc::string listitem = banmask.c_str();
irc::string thischan = chan->name;
@@ -152,7 +152,7 @@ class ModuleTimedBans : public Module
{
if (curtime > i->expire)
{
- chanrec* cr = ServerInstance->FindChan(i->channel);
+ Channel* cr = ServerInstance->FindChan(i->channel);
again = true;
if (cr)
{
diff --git a/src/modules/m_tline.cpp b/src/modules/m_tline.cpp
index bfeeb202e..c246cc811 100644
--- a/src/modules/m_tline.cpp
+++ b/src/modules/m_tline.cpp
@@ -27,7 +27,7 @@ class cmd_tline : public Command
this->syntax = "<mask>";
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
float n_counted = 0;
float n_matched = 0;
diff --git a/src/modules/m_uhnames.cpp b/src/modules/m_uhnames.cpp
index 41534eca4..830be12e8 100644
--- a/src/modules/m_uhnames.cpp
+++ b/src/modules/m_uhnames.cpp
@@ -36,7 +36,7 @@ class ModuleUHNames : public Module
{
}
- void OnSyncUserMetaData(userrec* user, Module* proto,void* opaque, const std::string &extname, bool displayable)
+ void OnSyncUserMetaData(User* user, Module* proto,void* opaque, const std::string &extname, bool displayable)
{
if ((displayable) && (extname == "UHNAMES"))
proto->ProtoSendMetaData(opaque, TYPE_USER, user, extname, "Enabled");
@@ -57,7 +57,7 @@ class ModuleUHNames : public Module
return (Priority)ServerInstance->Modules->PriorityBefore("m_namesx.so");
}
- virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated, const std::string &original_line)
+ virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line)
{
irc::string c = command.c_str();
/* We don't actually create a proper command handler class for PROTOCTL,
@@ -77,7 +77,7 @@ class ModuleUHNames : public Module
}
/* IMPORTANT: This must be prioritized above NAMESX! */
- virtual int OnUserList(userrec* user, chanrec* Ptr, CUList* &ulist)
+ virtual int OnUserList(User* user, Channel* Ptr, CUList* &ulist)
{
if (user->GetExt("UHNAMES"))
{
diff --git a/src/modules/m_uninvite.cpp b/src/modules/m_uninvite.cpp
index 7e13a63f9..9fbd6dfb0 100644
--- a/src/modules/m_uninvite.cpp
+++ b/src/modules/m_uninvite.cpp
@@ -27,10 +27,10 @@ class cmd_uninvite : public Command
TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
- userrec* u = ServerInstance->FindNick(parameters[0]);
- chanrec* c = ServerInstance->FindChan(parameters[1]);
+ User* u = ServerInstance->FindNick(parameters[0]);
+ Channel* c = ServerInstance->FindChan(parameters[1]);
if ((!c) || (!u))
{
diff --git a/src/modules/m_userip.cpp b/src/modules/m_userip.cpp
index 949ce758e..829a535e3 100644
--- a/src/modules/m_userip.cpp
+++ b/src/modules/m_userip.cpp
@@ -26,13 +26,13 @@ class cmd_userip : public Command
syntax = "<nick>{,<nick>}";
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
std::string retbuf = std::string("340 ") + user->nick + " :";
for (int i = 0; i < pcnt; i++)
{
- userrec *u = ServerInstance->FindNick(parameters[i]);
+ User *u = ServerInstance->FindNick(parameters[i]);
if ((u) && (u->registered == REG_ALL))
{
retbuf = retbuf + u->nick + (IS_OPER(u) ? "*" : "") + "=+" + u->ident + "@" + u->GetIPString() + " ";
diff --git a/src/modules/m_vhost.cpp b/src/modules/m_vhost.cpp
index 92aeb3401..0827343de 100644
--- a/src/modules/m_vhost.cpp
+++ b/src/modules/m_vhost.cpp
@@ -26,7 +26,7 @@ class cmd_vhost : public Command
syntax = "<username> <password>";
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
ConfigReader *Conf = new ConfigReader(ServerInstance);
diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp
index a090487f3..6cc96d0f9 100644
--- a/src/modules/m_watch.cpp
+++ b/src/modules/m_watch.cpp
@@ -30,7 +30,7 @@
* and Om by reading their 'watched by' list. When this occurs, their online status
* in each of these users lists (see below) is also updated.
*
- * Each user also has a seperate (smaller) map attached to their userrec whilst they
+ * Each user also has a seperate (smaller) map attached to their User whilst they
* have any watch entries, which is managed by class Extensible. When they add or remove
* a watch entry from their list, it is inserted here, as well as the main list being
* maintained. This map also contains the user's online status. For users that are
@@ -62,9 +62,9 @@
* Yes, it's horrid. Blame cl for being different. -- w00t
*/
#ifdef WINDOWS
-typedef nspace::hash_map<irc::string, std::deque<userrec*>, nspace::hash_compare<irc::string, less<irc::string> > > watchentries;
+typedef nspace::hash_map<irc::string, std::deque<User*>, nspace::hash_compare<irc::string, less<irc::string> > > watchentries;
#else
-typedef nspace::hash_map<irc::string, std::deque<userrec*>, nspace::hash<irc::string> > watchentries;
+typedef nspace::hash_map<irc::string, std::deque<User*>, nspace::hash<irc::string> > watchentries;
#endif
typedef std::map<irc::string, std::string> watchlist;
@@ -80,7 +80,7 @@ class cmd_watch : public Command
{
unsigned int& MAX_WATCH;
public:
- CmdResult remove_watch(userrec* user, const char* nick)
+ CmdResult remove_watch(User* user, const char* nick)
{
// removing an item from the list
if (!ServerInstance->IsNick(nick))
@@ -114,7 +114,7 @@ class cmd_watch : public Command
if (x != whos_watching_me->end())
{
/* People are watching this user, am i one of them? */
- std::deque<userrec*>::iterator n = std::find(x->second.begin(), x->second.end(), user);
+ std::deque<User*>::iterator n = std::find(x->second.begin(), x->second.end(), user);
if (n != x->second.end())
/* I'm no longer watching you... */
x->second.erase(n);
@@ -131,7 +131,7 @@ class cmd_watch : public Command
return CMD_FAILURE;
}
- CmdResult add_watch(userrec* user, const char* nick)
+ CmdResult add_watch(User* user, const char* nick)
{
if (!ServerInstance->IsNick(nick))
{
@@ -164,12 +164,12 @@ class cmd_watch : public Command
}
else
{
- std::deque<userrec*> newlist;
+ std::deque<User*> newlist;
newlist.push_back(user);
(*(whos_watching_me))[nick] = newlist;
}
- userrec* target = ServerInstance->FindNick(nick);
+ User* target = ServerInstance->FindNick(nick);
if (target)
{
if (target->Visibility && !target->Visibility->VisibleTo(user))
@@ -199,7 +199,7 @@ class cmd_watch : public Command
TRANSLATE2(TR_TEXT, TR_END); /* we watch for a nick. not a UID. */
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
if (!pcnt)
{
@@ -231,7 +231,7 @@ class cmd_watch : public Command
if (x != whos_watching_me->end())
{
/* People are watching this user, am i one of them? */
- std::deque<userrec*>::iterator n = std::find(x->second.begin(), x->second.end(), user);
+ std::deque<User*>::iterator n = std::find(x->second.begin(), x->second.end(), user);
if (n != x->second.end())
/* I'm no longer watching you... */
x->second.erase(n);
@@ -314,7 +314,7 @@ class Modulewatch : public Module
ServerInstance->AddCommand(mycommand);
}
- virtual void OnRehash(userrec* user, const std::string &parameter)
+ virtual void OnRehash(User* user, const std::string &parameter)
{
ConfigReader Conf(ServerInstance);
maxwatch = Conf.ReadInteger("watch", "maxentries", 0, true);
@@ -327,12 +327,12 @@ class Modulewatch : public Module
List[I_OnRehash] = List[I_OnGarbageCollect] = List[I_OnCleanup] = List[I_OnUserQuit] = List[I_OnPostConnect] = List[I_OnUserPostNick] = List[I_On005Numeric] = 1;
}
- virtual void OnUserQuit(userrec* user, const std::string &reason, const std::string &oper_message)
+ virtual void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message)
{
watchentries::iterator x = whos_watching_me->find(user->nick);
if (x != whos_watching_me->end())
{
- for (std::deque<userrec*>::iterator n = x->second.begin(); n != x->second.end(); n++)
+ for (std::deque<User*>::iterator n = x->second.begin(); n != x->second.end(); n++)
{
if (!user->Visibility || user->Visibility->VisibleTo(user))
(*n)->WriteServ("601 %s %s %s %s %lu :went offline", (*n)->nick ,user->nick, user->ident, user->dhost, ServerInstance->Time());
@@ -355,7 +355,7 @@ class Modulewatch : public Module
if (x != whos_watching_me->end())
{
/* People are watching this user, am i one of them? */
- std::deque<userrec*>::iterator n = std::find(x->second.begin(), x->second.end(), user);
+ std::deque<User*>::iterator n = std::find(x->second.begin(), x->second.end(), user);
if (n != x->second.end())
/* I'm no longer watching you... */
x->second.erase(n);
@@ -386,7 +386,7 @@ class Modulewatch : public Module
if (target_type == TYPE_USER)
{
watchlist* wl;
- userrec* user = (userrec*)item;
+ User* user = (User*)item;
if (user->GetExt("watchlist", wl))
{
@@ -396,12 +396,12 @@ class Modulewatch : public Module
}
}
- virtual void OnPostConnect(userrec* user)
+ virtual void OnPostConnect(User* user)
{
watchentries::iterator x = whos_watching_me->find(user->nick);
if (x != whos_watching_me->end())
{
- for (std::deque<userrec*>::iterator n = x->second.begin(); n != x->second.end(); n++)
+ for (std::deque<User*>::iterator n = x->second.begin(); n != x->second.end(); n++)
{
if (!user->Visibility || user->Visibility->VisibleTo(user))
(*n)->WriteServ("600 %s %s %s %s %lu :arrived online", (*n)->nick, user->nick, user->ident, user->dhost, user->age);
@@ -414,14 +414,14 @@ class Modulewatch : public Module
}
}
- virtual void OnUserPostNick(userrec* user, const std::string &oldnick)
+ virtual void OnUserPostNick(User* user, const std::string &oldnick)
{
watchentries::iterator new_offline = whos_watching_me->find(assign(oldnick));
watchentries::iterator new_online = whos_watching_me->find(user->nick);
if (new_offline != whos_watching_me->end())
{
- for (std::deque<userrec*>::iterator n = new_offline->second.begin(); n != new_offline->second.end(); n++)
+ for (std::deque<User*>::iterator n = new_offline->second.begin(); n != new_offline->second.end(); n++)
{
watchlist* wl;
if ((*n)->GetExt("watchlist", wl))
@@ -435,7 +435,7 @@ class Modulewatch : public Module
if (new_online != whos_watching_me->end())
{
- for (std::deque<userrec*>::iterator n = new_online->second.begin(); n != new_online->second.end(); n++)
+ for (std::deque<User*>::iterator n = new_online->second.begin(); n != new_online->second.end(); n++)
{
watchlist* wl;
if ((*n)->GetExt("watchlist", wl))
diff --git a/src/modules/m_xmlsocket.cpp b/src/modules/m_xmlsocket.cpp
index d97d40f87..6d1e99d31 100644
--- a/src/modules/m_xmlsocket.cpp
+++ b/src/modules/m_xmlsocket.cpp
@@ -28,7 +28,7 @@ class ModuleXMLSocket : public Module
OnRehash(NULL,"");
}
- virtual void OnRehash(userrec* user, const std::string &param)
+ virtual void OnRehash(User* user, const std::string &param)
{
Conf = new ConfigReader(ServerInstance);
@@ -107,7 +107,7 @@ class ModuleXMLSocket : public Module
virtual int OnRawSocketRead(int fd, char* buffer, unsigned int count, int &readresult)
{
- userrec* user = dynamic_cast<userrec*>(ServerInstance->FindDescriptor(fd));
+ User* user = dynamic_cast<User*>(ServerInstance->FindDescriptor(fd));
if (user == NULL)
return -1;
@@ -135,7 +135,7 @@ class ModuleXMLSocket : public Module
virtual int OnRawSocketWrite(int fd, const char* buffer, int count)
{
- userrec* user = dynamic_cast<userrec*>(ServerInstance->FindDescriptor(fd));
+ User* user = dynamic_cast<User*>(ServerInstance->FindDescriptor(fd));
if (user == NULL)
return -1;