From b57c7f4e466f72fdd2ac3deca42caa1ea7748338 Mon Sep 17 00:00:00 2001 From: w00t Date: Mon, 15 Oct 2007 20:59:05 +0000 Subject: 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 --- src/modules/extra/m_filter_pcre.cpp | 6 +- src/modules/extra/m_httpclienttest.cpp | 4 +- src/modules/extra/m_mysql.cpp | 2 +- src/modules/extra/m_pgsql.cpp | 2 +- src/modules/extra/m_sqlauth.cpp | 18 ++--- src/modules/extra/m_sqlite3.cpp | 2 +- src/modules/extra/m_sqllog.cpp | 14 ++-- src/modules/extra/m_sqloper.cpp | 14 ++-- src/modules/extra/m_sqlutils.cpp | 12 ++-- src/modules/extra/m_sqlutils.h | 12 ++-- src/modules/extra/m_ssl_gnutls.cpp | 18 ++--- src/modules/extra/m_ssl_openssl.cpp | 18 ++--- src/modules/extra/m_ssl_oper_cert.cpp | 8 +-- src/modules/extra/m_sslinfo.cpp | 4 +- src/modules/extra/m_ziplink.cpp | 2 +- src/modules/m_alias.cpp | 8 +-- src/modules/m_alltime.cpp | 2 +- src/modules/m_antibear.cpp | 4 +- src/modules/m_antibottler.cpp | 2 +- src/modules/m_auditorium.cpp | 14 ++-- src/modules/m_banexception.cpp | 8 +-- src/modules/m_banredirect.cpp | 14 ++-- src/modules/m_blockamsg.cpp | 8 +-- src/modules/m_blockcaps.cpp | 10 +-- src/modules/m_blockcolor.cpp | 8 +-- src/modules/m_botmode.cpp | 4 +- src/modules/m_cban.cpp | 6 +- src/modules/m_censor.cpp | 16 ++--- src/modules/m_cgiirc.cpp | 24 +++---- src/modules/m_chancreate.cpp | 2 +- src/modules/m_chanfilter.cpp | 22 +++--- src/modules/m_chanprotect.cpp | 54 +++++++------- src/modules/m_check.cpp | 6 +- src/modules/m_chghost.cpp | 6 +- src/modules/m_chgident.cpp | 4 +- src/modules/m_chgname.cpp | 4 +- src/modules/m_cloaking.cpp | 4 +- src/modules/m_clones.cpp | 2 +- src/modules/m_close.cpp | 6 +- src/modules/m_commonchans.cpp | 8 +-- src/modules/m_conn_join.cpp | 6 +- src/modules/m_conn_umodes.cpp | 4 +- src/modules/m_conn_waitpong.cpp | 14 ++-- src/modules/m_connflood.cpp | 8 +-- src/modules/m_customtitle.cpp | 14 ++-- src/modules/m_cycle.cpp | 8 +-- src/modules/m_dccallow.cpp | 34 ++++----- src/modules/m_deaf.cpp | 16 ++--- src/modules/m_denychans.cpp | 4 +- src/modules/m_devoice.cpp | 4 +- src/modules/m_dnsbl.cpp | 12 ++-- src/modules/m_filter.cpp | 6 +- src/modules/m_filter.h | 36 +++++----- src/modules/m_foobar.cpp | 8 +-- src/modules/m_globalload.cpp | 6 +- src/modules/m_globops.cpp | 2 +- src/modules/m_helpop.cpp | 8 +-- src/modules/m_hidechans.cpp | 4 +- src/modules/m_hideoper.cpp | 4 +- src/modules/m_hostchange.cpp | 4 +- src/modules/m_httpd_stats.cpp | 12 ++-- src/modules/m_ident.cpp | 16 ++--- src/modules/m_invisible.cpp | 22 +++--- src/modules/m_inviteexception.cpp | 8 +-- src/modules/m_joinflood.cpp | 12 ++-- src/modules/m_jumpserver.cpp | 12 ++-- src/modules/m_kicknorejoin.cpp | 18 ++--- src/modules/m_knock.cpp | 6 +- src/modules/m_lockserv.cpp | 12 ++-- src/modules/m_messageflood.cpp | 32 ++++----- src/modules/m_namesx.cpp | 6 +- src/modules/m_nickflood.cpp | 12 ++-- src/modules/m_nicklock.cpp | 16 ++--- src/modules/m_noctcp.cpp | 8 +-- src/modules/m_noinvite.cpp | 4 +- src/modules/m_nokicks.cpp | 4 +- src/modules/m_nonicks.cpp | 6 +- src/modules/m_nonotice.cpp | 6 +- src/modules/m_oper_hash.cpp | 6 +- src/modules/m_operchans.cpp | 4 +- src/modules/m_operflood.cpp | 2 +- src/modules/m_operjoin.cpp | 6 +- src/modules/m_operlevels.cpp | 4 +- src/modules/m_operlog.cpp | 2 +- src/modules/m_opermodes.cpp | 4 +- src/modules/m_opermotd.cpp | 8 +-- src/modules/m_override.cpp | 12 ++-- src/modules/m_randquote.cpp | 4 +- src/modules/m_redirect.cpp | 14 ++-- src/modules/m_regonlycreate.cpp | 2 +- src/modules/m_remove.cpp | 12 ++-- src/modules/m_restrictbanned.cpp | 12 ++-- src/modules/m_restrictchans.cpp | 4 +- src/modules/m_restrictmsg.cpp | 6 +- src/modules/m_safelist.cpp | 14 ++-- src/modules/m_sajoin.cpp | 8 +-- src/modules/m_samode.cpp | 2 +- src/modules/m_sanick.cpp | 4 +- src/modules/m_sapart.cpp | 8 +-- src/modules/m_saquit.cpp | 6 +- src/modules/m_securelist.cpp | 4 +- src/modules/m_seenicks.cpp | 2 +- src/modules/m_services.cpp | 24 +++---- src/modules/m_services_account.cpp | 28 ++++---- src/modules/m_servprotect.cpp | 8 +-- src/modules/m_sethost.cpp | 4 +- src/modules/m_setident.cpp | 2 +- src/modules/m_setidle.cpp | 2 +- src/modules/m_setname.cpp | 2 +- src/modules/m_showwhois.cpp | 4 +- src/modules/m_silence.cpp | 12 ++-- src/modules/m_silence_ext.cpp | 22 +++--- src/modules/m_spanningtree/main.cpp | 96 ++++++++++++------------- src/modules/m_spanningtree/main.h | 92 ++++++++++++------------ src/modules/m_spanningtree/override_admin.cpp | 2 +- src/modules/m_spanningtree/override_map.cpp | 4 +- src/modules/m_spanningtree/override_modules.cpp | 2 +- src/modules/m_spanningtree/override_motd.cpp | 2 +- src/modules/m_spanningtree/override_squit.cpp | 2 +- src/modules/m_spanningtree/override_stats.cpp | 4 +- src/modules/m_spanningtree/override_time.cpp | 2 +- src/modules/m_spanningtree/override_whois.cpp | 4 +- src/modules/m_spanningtree/postcommand.cpp | 2 +- src/modules/m_spanningtree/precommand.cpp | 2 +- src/modules/m_spanningtree/rconnect.cpp | 2 +- src/modules/m_spanningtree/rconnect.h | 2 +- src/modules/m_spanningtree/rsquit.cpp | 4 +- src/modules/m_spanningtree/rsquit.h | 4 +- src/modules/m_spanningtree/treeserver.cpp | 10 +-- src/modules/m_spanningtree/treesocket.h | 4 +- src/modules/m_spanningtree/treesocket1.cpp | 34 ++++----- src/modules/m_spanningtree/treesocket2.cpp | 82 ++++++++++----------- src/modules/m_spanningtree/utils.cpp | 8 +-- src/modules/m_spanningtree/utils.h | 2 +- src/modules/m_spy.cpp | 8 +-- src/modules/m_ssl_dummy.cpp | 6 +- src/modules/m_sslmodes.cpp | 4 +- src/modules/m_stripcolor.cpp | 12 ++-- src/modules/m_svshold.cpp | 6 +- src/modules/m_swhois.cpp | 20 +++--- src/modules/m_taxonomy.cpp | 6 +- src/modules/m_testcommand.cpp | 2 +- src/modules/m_timedbans.cpp | 8 +-- src/modules/m_tline.cpp | 2 +- src/modules/m_uhnames.cpp | 6 +- src/modules/m_uninvite.cpp | 6 +- src/modules/m_userip.cpp | 4 +- src/modules/m_vhost.cpp | 2 +- src/modules/m_watch.cpp | 40 +++++------ src/modules/m_xmlsocket.cpp | 6 +- 150 files changed, 779 insertions(+), 779 deletions(-) (limited to 'src/modules') 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::iterator index = filters.begin(); index != filters.end(); index++) { @@ -131,7 +131,7 @@ class ModuleFilterPCRE : public FilterBase } } - virtual void OnRehash(userrec* user, const std::string ¶meter) + virtual void OnRehash(User* user, const std::string ¶meter) { 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 ¶meter) + virtual void OnRehash(User* user, const std::string ¶meter) { 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 ¶meter) + virtual void OnRehash(User* user, const std::string ¶meter) { 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 ¶meter) + virtual void OnRehash(User* user, const std::string ¶meter) { 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(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 ¶meter) + virtual void OnRehash(User* user, const std::string ¶meter) { 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 ¶meter) + virtual void OnRehash(User* user, const std::string ¶meter) { 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 ¶meter) + virtual void OnRehash(User* user, const std::string ¶meter) { 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(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 IdUserMap; -typedef std::map IdChanMap; +typedef std::map IdUserMap; +typedef std::map IdChanMap; typedef std::list 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 ¶m) + virtual void OnRehash(User* user, const std::string ¶m) { 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 ¶m) + virtual void OnRehash(User* user, const std::string ¶m) { 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 = ""; } - 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 ¶meter) + virtual void OnRehash(User* user, const std::string ¶meter) { 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 = ""; } - 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 ¶meter) + virtual void OnRehash(User* user, const std::string ¶meter) { 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 ¶meter, bool adding) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, 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 ¶meter) + virtual void OnRehash(User* user, const std::string ¶meter) { 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 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 ¶m) + virtual void OnRehash(User* user, const std::string ¶m) { 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 ¶m, bool adding, ModeType type) + bool BeforeMode(User* source, User* dest, Channel* channel, std::string ¶m, 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(item); + Channel* chan = static_cast(item); BanRedirectList* redirects; if(chan->GetExt("banredirects", redirects)) @@ -251,12 +251,12 @@ class ModuleBanRedirect : public Module } } - virtual void OnRehash(userrec* user, const std::string ¶m) + virtual void OnRehash(User* user, const std::string ¶m) { 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 ¶meter) + virtual void OnRehash(User* user, const std::string ¶meter) { 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 ¶meter, bool adding) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, 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 ¶m) + virtual void OnRehash(User* user, const std::string ¶m) { 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 ¶meter, bool adding) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, 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 ¶meter, bool adding) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, 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 ¶meter, bool adding) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, 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 ¶meter, bool adding) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { if (adding) { @@ -128,7 +128,7 @@ class ModuleCensor : public Module } // format of a config entry is - 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 ¶meter) + virtual void OnRehash(User* user, const std::string ¶meter) { /* * 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 ¶meter) + virtual void OnRehash(User* user, const std::string ¶meter) { 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 ¶meter) + virtual void OnRehash(User* user, const std::string ¶meter) { 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 ¶meter) + ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string ¶meter) { - 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 ¶meter, chanrec* channel) + User* FindAndVerify(std::string ¶meter, 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 ¶meter) + ModeAction HandleChange(User* source, User* theuser, bool adding, Channel* channel, std::string ¶meter) { 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 ¶meter) + ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string ¶meter) { 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 ¶meter, bool adding) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, 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 ¶meter) + ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string ¶meter) { 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 ¶meter, bool adding) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, 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 ¶meter) + virtual void OnRehash(User* user, const std::string ¶meter) { /* 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 = "|||"; } - 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 ¶meter) + void OnRehash(User* user, const std::string ¶meter) { 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 ¶meter, bool adding) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, 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 ¶meter) + virtual void OnRehash(User* user, const std::string ¶meter) { 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 closed; - for (std::vector::iterator u = ServerInstance->local_users.begin(); u != ServerInstance->local_users.end(); u++) + for (std::vector::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 ¶meter, bool adding) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, 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 ¶meter) + virtual void OnRehash(User* user, const std::string ¶meter) { 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::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 ¶meter) + virtual void OnRehash(User* user, const std::string ¶meter) { 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 ¶m) + virtual void OnRehash(User* user, const std::string ¶m) { 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 ¶meter) + virtual void OnRehash(User* user, const std::string ¶meter) { 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 userlist; +typedef std::vector userlist; userlist ul; typedef std::vector 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 [+|-] (