]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
In the grand tradition of huge fucking commits:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 15 Oct 2007 20:59:05 +0000 (20:59 +0000)
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 15 Oct 2007 20:59:05 +0000 (20:59 +0000)
 - chanrec -> Channel
 - userrec -> User
Enjoy.

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8204 e03df62e-2008-0410-955e-edbf42e46eb7

321 files changed:
include/base.h
include/caller.h
include/channels.h
include/command_parse.h
include/commands/cmd_admin.h
include/commands/cmd_away.h
include/commands/cmd_clearcache.h
include/commands/cmd_commands.h
include/commands/cmd_connect.h
include/commands/cmd_die.h
include/commands/cmd_eline.h
include/commands/cmd_gline.h
include/commands/cmd_info.h
include/commands/cmd_invite.h
include/commands/cmd_ison.h
include/commands/cmd_join.h
include/commands/cmd_kick.h
include/commands/cmd_kill.h
include/commands/cmd_kline.h
include/commands/cmd_links.h
include/commands/cmd_list.h
include/commands/cmd_loadmodule.h
include/commands/cmd_lusers.h
include/commands/cmd_map.h
include/commands/cmd_mode.h
include/commands/cmd_modules.h
include/commands/cmd_motd.h
include/commands/cmd_names.h
include/commands/cmd_nick.h
include/commands/cmd_notice.h
include/commands/cmd_oper.h
include/commands/cmd_part.h
include/commands/cmd_pass.h
include/commands/cmd_ping.h
include/commands/cmd_pong.h
include/commands/cmd_privmsg.h
include/commands/cmd_qline.h
include/commands/cmd_quit.h
include/commands/cmd_rehash.h
include/commands/cmd_reloadmodule.h
include/commands/cmd_restart.h
include/commands/cmd_rules.h
include/commands/cmd_server.h
include/commands/cmd_squit.h
include/commands/cmd_stats.h
include/commands/cmd_time.h
include/commands/cmd_topic.h
include/commands/cmd_trace.h
include/commands/cmd_unloadmodule.h
include/commands/cmd_user.h
include/commands/cmd_userhost.h
include/commands/cmd_version.h
include/commands/cmd_wallops.h
include/commands/cmd_who.h
include/commands/cmd_whois.h
include/commands/cmd_whowas.h
include/commands/cmd_zline.h
include/configreader.h
include/connection.h
include/ctables.h
include/cull_list.h
include/hashcomp.h
include/inspircd.h
include/mode.h
include/modes/cmode_b.h
include/modes/cmode_h.h
include/modes/cmode_i.h
include/modes/cmode_k.h
include/modes/cmode_l.h
include/modes/cmode_m.h
include/modes/cmode_n.h
include/modes/cmode_o.h
include/modes/cmode_p.h
include/modes/cmode_s.h
include/modes/cmode_t.h
include/modes/cmode_v.h
include/modes/umode_i.h
include/modes/umode_n.h
include/modes/umode_o.h
include/modes/umode_s.h
include/modes/umode_w.h
include/modules.h
include/socket.h
include/typedefs.h
include/u_listmode.h
include/users.h
include/xline.h
src/channels.cpp
src/cmd_admin.cpp
src/cmd_away.cpp
src/cmd_clearcache.cpp
src/cmd_commands.cpp
src/cmd_connect.cpp
src/cmd_die.cpp
src/cmd_eline.cpp
src/cmd_gline.cpp
src/cmd_info.cpp
src/cmd_invite.cpp
src/cmd_ison.cpp
src/cmd_join.cpp
src/cmd_kick.cpp
src/cmd_kill.cpp
src/cmd_kline.cpp
src/cmd_links.cpp
src/cmd_list.cpp
src/cmd_loadmodule.cpp
src/cmd_lusers.cpp
src/cmd_map.cpp
src/cmd_mode.cpp
src/cmd_modules.cpp
src/cmd_motd.cpp
src/cmd_names.cpp
src/cmd_nick.cpp
src/cmd_notice.cpp
src/cmd_oper.cpp
src/cmd_part.cpp
src/cmd_pass.cpp
src/cmd_ping.cpp
src/cmd_pong.cpp
src/cmd_privmsg.cpp
src/cmd_qline.cpp
src/cmd_quit.cpp
src/cmd_rehash.cpp
src/cmd_reloadmodule.cpp
src/cmd_restart.cpp
src/cmd_rules.cpp
src/cmd_server.cpp
src/cmd_squit.cpp
src/cmd_stats.cpp
src/cmd_time.cpp
src/cmd_topic.cpp
src/cmd_trace.cpp
src/cmd_unloadmodule.cpp
src/cmd_user.cpp
src/cmd_userhost.cpp
src/cmd_version.cpp
src/cmd_wallops.cpp
src/cmd_who.cpp
src/cmd_whois.cpp
src/cmd_whowas.cpp
src/cmd_zline.cpp
src/command_parse.cpp
src/commands.cpp
src/configreader.cpp
src/cull_list.cpp
src/helperfuncs.cpp
src/inspircd.cpp
src/mode.cpp
src/modes/cmode_b.cpp
src/modes/cmode_h.cpp
src/modes/cmode_i.cpp
src/modes/cmode_k.cpp
src/modes/cmode_l.cpp
src/modes/cmode_m.cpp
src/modes/cmode_n.cpp
src/modes/cmode_o.cpp
src/modes/cmode_p.cpp
src/modes/cmode_s.cpp
src/modes/cmode_t.cpp
src/modes/cmode_v.cpp
src/modes/umode_i.cpp
src/modes/umode_n.cpp
src/modes/umode_o.cpp
src/modes/umode_s.cpp
src/modes/umode_w.cpp
src/modules.cpp
src/modules/extra/m_filter_pcre.cpp
src/modules/extra/m_httpclienttest.cpp
src/modules/extra/m_mysql.cpp
src/modules/extra/m_pgsql.cpp
src/modules/extra/m_sqlauth.cpp
src/modules/extra/m_sqlite3.cpp
src/modules/extra/m_sqllog.cpp
src/modules/extra/m_sqloper.cpp
src/modules/extra/m_sqlutils.cpp
src/modules/extra/m_sqlutils.h
src/modules/extra/m_ssl_gnutls.cpp
src/modules/extra/m_ssl_openssl.cpp
src/modules/extra/m_ssl_oper_cert.cpp
src/modules/extra/m_sslinfo.cpp
src/modules/extra/m_ziplink.cpp
src/modules/m_alias.cpp
src/modules/m_alltime.cpp
src/modules/m_antibear.cpp
src/modules/m_antibottler.cpp
src/modules/m_auditorium.cpp
src/modules/m_banexception.cpp
src/modules/m_banredirect.cpp
src/modules/m_blockamsg.cpp
src/modules/m_blockcaps.cpp
src/modules/m_blockcolor.cpp
src/modules/m_botmode.cpp
src/modules/m_cban.cpp
src/modules/m_censor.cpp
src/modules/m_cgiirc.cpp
src/modules/m_chancreate.cpp
src/modules/m_chanfilter.cpp
src/modules/m_chanprotect.cpp
src/modules/m_check.cpp
src/modules/m_chghost.cpp
src/modules/m_chgident.cpp
src/modules/m_chgname.cpp
src/modules/m_cloaking.cpp
src/modules/m_clones.cpp
src/modules/m_close.cpp
src/modules/m_commonchans.cpp
src/modules/m_conn_join.cpp
src/modules/m_conn_umodes.cpp
src/modules/m_conn_waitpong.cpp
src/modules/m_connflood.cpp
src/modules/m_customtitle.cpp
src/modules/m_cycle.cpp
src/modules/m_dccallow.cpp
src/modules/m_deaf.cpp
src/modules/m_denychans.cpp
src/modules/m_devoice.cpp
src/modules/m_dnsbl.cpp
src/modules/m_filter.cpp
src/modules/m_filter.h
src/modules/m_foobar.cpp
src/modules/m_globalload.cpp
src/modules/m_globops.cpp
src/modules/m_helpop.cpp
src/modules/m_hidechans.cpp
src/modules/m_hideoper.cpp
src/modules/m_hostchange.cpp
src/modules/m_httpd_stats.cpp
src/modules/m_ident.cpp
src/modules/m_invisible.cpp
src/modules/m_inviteexception.cpp
src/modules/m_joinflood.cpp
src/modules/m_jumpserver.cpp
src/modules/m_kicknorejoin.cpp
src/modules/m_knock.cpp
src/modules/m_lockserv.cpp
src/modules/m_messageflood.cpp
src/modules/m_namesx.cpp
src/modules/m_nickflood.cpp
src/modules/m_nicklock.cpp
src/modules/m_noctcp.cpp
src/modules/m_noinvite.cpp
src/modules/m_nokicks.cpp
src/modules/m_nonicks.cpp
src/modules/m_nonotice.cpp
src/modules/m_oper_hash.cpp
src/modules/m_operchans.cpp
src/modules/m_operflood.cpp
src/modules/m_operjoin.cpp
src/modules/m_operlevels.cpp
src/modules/m_operlog.cpp
src/modules/m_opermodes.cpp
src/modules/m_opermotd.cpp
src/modules/m_override.cpp
src/modules/m_randquote.cpp
src/modules/m_redirect.cpp
src/modules/m_regonlycreate.cpp
src/modules/m_remove.cpp
src/modules/m_restrictbanned.cpp
src/modules/m_restrictchans.cpp
src/modules/m_restrictmsg.cpp
src/modules/m_safelist.cpp
src/modules/m_sajoin.cpp
src/modules/m_samode.cpp
src/modules/m_sanick.cpp
src/modules/m_sapart.cpp
src/modules/m_saquit.cpp
src/modules/m_securelist.cpp
src/modules/m_seenicks.cpp
src/modules/m_services.cpp
src/modules/m_services_account.cpp
src/modules/m_servprotect.cpp
src/modules/m_sethost.cpp
src/modules/m_setident.cpp
src/modules/m_setidle.cpp
src/modules/m_setname.cpp
src/modules/m_showwhois.cpp
src/modules/m_silence.cpp
src/modules/m_silence_ext.cpp
src/modules/m_spanningtree/main.cpp
src/modules/m_spanningtree/main.h
src/modules/m_spanningtree/override_admin.cpp
src/modules/m_spanningtree/override_map.cpp
src/modules/m_spanningtree/override_modules.cpp
src/modules/m_spanningtree/override_motd.cpp
src/modules/m_spanningtree/override_squit.cpp
src/modules/m_spanningtree/override_stats.cpp
src/modules/m_spanningtree/override_time.cpp
src/modules/m_spanningtree/override_whois.cpp
src/modules/m_spanningtree/postcommand.cpp
src/modules/m_spanningtree/precommand.cpp
src/modules/m_spanningtree/rconnect.cpp
src/modules/m_spanningtree/rconnect.h
src/modules/m_spanningtree/rsquit.cpp
src/modules/m_spanningtree/rsquit.h
src/modules/m_spanningtree/treeserver.cpp
src/modules/m_spanningtree/treesocket.h
src/modules/m_spanningtree/treesocket1.cpp
src/modules/m_spanningtree/treesocket2.cpp
src/modules/m_spanningtree/utils.cpp
src/modules/m_spanningtree/utils.h
src/modules/m_spy.cpp
src/modules/m_ssl_dummy.cpp
src/modules/m_sslmodes.cpp
src/modules/m_stripcolor.cpp
src/modules/m_svshold.cpp
src/modules/m_swhois.cpp
src/modules/m_taxonomy.cpp
src/modules/m_testcommand.cpp
src/modules/m_timedbans.cpp
src/modules/m_tline.cpp
src/modules/m_uhnames.cpp
src/modules/m_uninvite.cpp
src/modules/m_userip.cpp
src/modules/m_vhost.cpp
src/modules/m_watch.cpp
src/modules/m_xmlsocket.cpp
src/snomasks.cpp
src/socket.cpp
src/userprocess.cpp
src/users.cpp
src/xline.cpp

index faea391a38c4b50587cd43de18a3a02de1aae240..4f5cc2e3ed90bed376da047cf0bd2befbafe3ee6 100644 (file)
@@ -52,7 +52,7 @@ class CoreExport classbase
        virtual ~classbase() { }
 };
 
-/** class Extensible is the parent class of many classes such as userrec and chanrec.
+/** class Extensible is the parent class of many classes such as User and Channel.
  * class Extensible implements a system which allows modules to 'extend' the class by attaching data within
  * a map associated with the object. In this way modules can store their own custom information within user
  * objects, channel objects and server objects, without breaking other modules (this is more sensible than using
index b5dd38ef0e63015c57af58f4508c220c0a973b6d..5cf08905a41e947e706d64915c817189927ad81b 100644 (file)
  * according to the number of parameters it takes, e.g. caller0, caller1, caller2.
  * These have been generated from zero parameters to eight.
  *
- * If you want to declare a functor which takes two parameters, a userrec and a chanrec,
+ * If you want to declare a functor which takes two parameters, a User and a Channel,
  * and returns bool, simply create it like this:
  *
- * caller2<bool, userrec*, chanrec*> MyFunction;
+ * caller2<bool, User*, Channel*> MyFunction;
  *
  * and initialize it correctly, when placed into a class you will be able to call it:
  *
index b4fa1ca3064d430f3aeb67eb1e4a40260c198ec1..0f947ac226a780f058bb898a21aaba601de8cd1c 100644 (file)
@@ -35,8 +35,8 @@ enum ChannelModes {
 };
 
 /* Forward declarations - needed */
-class userrec;
-class chanrec;
+class User;
+class Channel;
 
 /** Holds an entry for a ban list, exemption list, or invite list.
  * This class contains a single element in a channel list, such as a banlist.
@@ -70,7 +70,7 @@ typedef std::vector<BanItem>  BanList;
 
 /** A list of users on a channel
  */
-typedef std::map<userrec*,std::string> CUList;
+typedef std::map<User*,std::string> CUList;
 
 /** Shorthand for CUList::iterator
  */
@@ -106,13 +106,13 @@ typedef std::vector<prefixtype> pfxcontainer;
 
 /** A list of users with zero or more prefixes set on them
  */
-typedef std::map<userrec*, std::vector<prefixtype> > prefixlist;
+typedef std::map<User*, std::vector<prefixtype> > prefixlist;
 
 /** Holds all relevent information for a channel.
  * This class represents a channel, and contains its name, modes, time created, topic, topic set time,
  * etc, and an instance of the BanList type.
  */
-class CoreExport chanrec : public Extensible
+class CoreExport Channel : public Extensible
 {
  private:
 
@@ -120,9 +120,9 @@ class CoreExport chanrec : public Extensible
         */
        InspIRCd* ServerInstance;
 
-       /** Connect a chanrec to a userrec
+       /** Connect a Channel to a User
         */
-       static chanrec* ForceChan(InspIRCd* Instance, chanrec* Ptr, userrec* user, const std::string &privs);
+       static Channel* ForceChan(InspIRCd* Instance, Channel* Ptr, User* user, const std::string &privs);
 
        /** Set default modes for the channel on creation
         */
@@ -194,7 +194,7 @@ class CoreExport chanrec : public Extensible
        time_t created;
 
        /** Time topic was set.
-        * If no topic was ever set, this will be equal to chanrec::created
+        * If no topic was ever set, this will be equal to Channel::created
         */
        time_t topicset;
 
@@ -264,67 +264,67 @@ class CoreExport chanrec : public Extensible
         * an arbitary pointer compared to other users by its memory address,
         * as this is a very fast 32 or 64 bit integer comparison.
         */
-       void AddUser(userrec* user);
+       void AddUser(User* user);
 
        /** Add a user pointer to the internal reference list of opped users
         * @param user The user to add
         */
-       void AddOppedUser(userrec* user);
+       void AddOppedUser(User* user);
 
        /** Add a user pointer to the internal reference list of halfopped users
         * @param user The user to add
         */
-       void AddHalfoppedUser(userrec* user);
+       void AddHalfoppedUser(User* user);
 
        /** Add a user pointer to the internal reference list of voiced users
         * @param user The user to add
         */
-       void AddVoicedUser(userrec* user);
+       void AddVoicedUser(User* user);
 
        /** Delete a user pointer to the internal reference list
         * @param user The user to delete
         * @return number of users left on the channel after deletion of the user
         */
-       unsigned long DelUser(userrec* user);
+       unsigned long DelUser(User* user);
 
        /** Delete a user pointer to the internal reference list of opped users
         * @param user The user to delete
         */
-       void DelOppedUser(userrec* user);
+       void DelOppedUser(User* user);
 
        /** Delete a user pointer to the internal reference list of halfopped users
         * @param user The user to delete
         */
-       void DelHalfoppedUser(userrec* user);
+       void DelHalfoppedUser(User* user);
 
        /** Delete a user pointer to the internal reference list of voiced users
         * @param user The user to delete
         */
-       void DelVoicedUser(userrec* user);
+       void DelVoicedUser(User* user);
 
        /** Obtain the internal reference list
-        * The internal reference list contains a list of userrec*.
+        * The internal reference list contains a list of User*.
         * These are used for rapid comparison to determine
         * channel membership for PRIVMSG, NOTICE, QUIT, PART etc.
         * The resulting pointer to the vector should be considered
         * readonly and only modified via AddUser and DelUser.
         *
-        * @return This function returns pointer to a map of userrec pointers (CUList*).
+        * @return This function returns pointer to a map of User pointers (CUList*).
         */
        CUList* GetUsers();
 
        /** Obtain the internal reference list of opped users
-        * @return This function returns pointer to a map of userrec pointers (CUList*).
+        * @return This function returns pointer to a map of User pointers (CUList*).
         */
        CUList* GetOppedUsers();
 
        /** Obtain the internal reference list of halfopped users
-        * @return This function returns pointer to a map of userrec pointers (CUList*).
+        * @return This function returns pointer to a map of User pointers (CUList*).
         */
        CUList* GetHalfoppedUsers();
 
        /** Obtain the internal reference list of voiced users
-        * @return This function returns pointer to a map of userrec pointers (CUList*).
+        * @return This function returns pointer to a map of User pointers (CUList*).
         */
        CUList* GetVoicedUsers();
 
@@ -332,63 +332,63 @@ class CoreExport chanrec : public Extensible
         * @param The user to look for
         * @return True if the user is on this channel
         */
-       bool HasUser(userrec* user);
+       bool HasUser(User* user);
 
        /** Creates a channel record and initialises it with default values
         * @throw Nothing at present.
         */
-       chanrec(InspIRCd* Instance);
+       Channel(InspIRCd* Instance);
 
        /** Make src kick user from this channel with the given reason.
         * @param src The source of the kick
         * @param user The user being kicked (must be on this channel)
         * @param reason The reason for the kick
         * @return The number of users left on the channel. If this is zero
-        * when the method returns, you MUST delete the chanrec immediately!
+        * when the method returns, you MUST delete the Channel immediately!
         */
-       long KickUser(userrec *src, userrec *user, const char* reason);
+       long KickUser(User *src, User *user, const char* reason);
 
        /** Make the server kick user from this channel with the given reason.
         * @param user The user being kicked (must be on this channel)
         * @param reason The reason for the kick
         * @param triggerevents True if you wish this kick to trigger module events
         * @return The number of users left on the channel. If this is zero
-        * when the method returns, you MUST delete the chanrec immediately!
+        * when the method returns, you MUST delete the Channel immediately!
         */
-       long ServerKickUser(userrec* user, const char* reason, bool triggerevents);
+       long ServerKickUser(User* user, const char* reason, bool triggerevents);
 
        /** Part a user from this channel with the given reason.
         * If the reason field is NULL, no reason will be sent.
         * @param user The user who is parting (must be on this channel)
         * @param reason The (optional) part reason
         * @return The number of users left on the channel. If this is zero
-        * when the method returns, you MUST delete the chanrec immediately!
+        * when the method returns, you MUST delete the Channel immediately!
         */
-       long PartUser(userrec *user, const char* reason = NULL);
+       long PartUser(User *user, const char* reason = NULL);
 
        /* Join a user to a channel. May be a channel that doesnt exist yet.
         * @param user The user to join to the channel.
         * @param cn The channel name to join to. Does not have to exist.
         * @param key The key of the channel, if given
         * @param override If true, override all join restrictions such as +bkil
-        * @return A pointer to the chanrec the user was joined to. A new chanrec may have
+        * @return A pointer to the Channel the user was joined to. A new Channel may have
         * been created if the channel did not exist before the user was joined to it.
         * If the user could not be joined to a channel, the return value may be NULL.
         */
-       static chanrec* JoinUser(InspIRCd* ServerInstance, userrec *user, const char* cn, bool override, const char* key, time_t TS = 0);
+       static Channel* JoinUser(InspIRCd* ServerInstance, User *user, const char* cn, bool override, const char* key, time_t TS = 0);
 
        /** Write to a channel, from a user, using va_args for text
         * @param user User whos details to prefix the line with
         * @param text A printf-style format string which builds the output line without prefix
         * @param ... Zero or more POD types
         */
-       void WriteChannel(userrec* user, char* text, ...);
+       void WriteChannel(User* user, char* text, ...);
 
        /** Write to a channel, from a user, using std::string for text
         * @param user User whos details to prefix the line with
         * @param text A std::string containing the output line without prefix
         */
-       void WriteChannel(userrec* user, const std::string &text);
+       void WriteChannel(User* user, const std::string &text);
 
        /** Write to a channel, from a server, using va_args for text
         * @param ServName Server name to prefix the line with
@@ -412,7 +412,7 @@ class CoreExport chanrec : public Extensible
         * @param text A printf-style format string which builds the output line without prefix
         * @param ... Zero or more POD type
         */
-       void WriteAllExceptSender(userrec* user, bool serversource, char status, char* text, ...);
+       void WriteAllExceptSender(User* user, bool serversource, char status, char* text, ...);
 
        /** Write to all users on a channel except a list of users, using va_args for text
         * @param user User whos details to prefix the line with, and to omit from receipt of the message
@@ -423,7 +423,7 @@ class CoreExport chanrec : public Extensible
         * @param text A printf-style format string which builds the output line without prefix
         * @param ... Zero or more POD type
         */
-       void WriteAllExcept(userrec* user, bool serversource, char status, CUList &except_list, char* text, ...);
+       void WriteAllExcept(User* user, bool serversource, char status, CUList &except_list, char* text, ...);
 
        /** Write to all users on a channel except a specific user, using std::string for text.
         * Internally, this calls WriteAllExcept().
@@ -433,7 +433,7 @@ class CoreExport chanrec : public Extensible
         * @param status The status of the users to write to, e.g. '@' or '%'. Use a value of 0 to write to everyone
         * @param text A std::string containing the output line without prefix
         */
-       void WriteAllExceptSender(userrec* user, bool serversource, char status, const std::string& text);
+       void WriteAllExceptSender(User* user, bool serversource, char status, const std::string& text);
 
        /** Write to all users on a channel except a list of users, using std::string for text
         * @param user User whos details to prefix the line with, and to omit from receipt of the message
@@ -443,7 +443,7 @@ class CoreExport chanrec : public Extensible
         * @param except_list A list of users NOT to send the text to
         * @param text A std::string containing the output line without prefix
         */
-       void WriteAllExcept(userrec* user, bool serversource, char status, CUList &except_list, const std::string& text);
+       void WriteAllExcept(User* user, bool serversource, char status, CUList &except_list, const std::string& text);
 
        /** Returns the maximum number of bans allowed to be set on this channel
         * @return The maximum number of bans allowed
@@ -462,7 +462,7 @@ class CoreExport chanrec : public Extensible
         * @param ulist The user list to send, NULL to use the
         * channel's default names list of everyone
         */
-       void UserList(userrec *user, CUList* ulist = NULL);
+       void UserList(User *user, CUList* ulist = NULL);
 
        /** Get the number of invisible users on this channel
         * @return Number of invisible users
@@ -473,13 +473,13 @@ class CoreExport chanrec : public Extensible
         * @param user The user to look up
         * @return One of STATUS_OP, STATUS_HOP, STATUS_VOICE, or zero.
         */
-       int GetStatus(userrec *user);
+       int GetStatus(User *user);
 
        /** Get a users status on this channel in a bitmask
         * @param user The user to look up
         * @return A bitmask containing zero or more of STATUS_OP, STATUS_HOP, STATUS_VOICE
         */
-       int GetStatusFlags(userrec *user);
+       int GetStatusFlags(User *user);
 
        /** Get a users prefix on this channel in a string.
         * @param user The user to look up
@@ -492,7 +492,7 @@ class CoreExport chanrec : public Extensible
         * character you can get, you can deal with it in a 'proprtional' manner
         * compared to known prefixes, using GetPrefixValue().
         */
-       const char* GetPrefixChar(userrec *user);
+       const char* GetPrefixChar(User *user);
 
        /** Return all of a users mode prefixes into a char* string.
         * @param user The user to look up
@@ -500,7 +500,7 @@ class CoreExport chanrec : public Extensible
         * be in rank order, greatest first, as certain IRC clients require
         * this when multiple prefixes are used names lists.
         */
-       const char* GetAllPrefixChars(userrec* user);
+       const char* GetAllPrefixChars(User* user);
 
        /** Get the value of a users prefix on this channel.
         * @param user The user to look up
@@ -513,14 +513,14 @@ class CoreExport chanrec : public Extensible
         * is a prefix of greater 'worth' than ops, and a value less than
         * VOICE_VALUE is of lesser 'worth' than a voice.
         */
-       unsigned int GetPrefixValue(userrec* user);
+       unsigned int GetPrefixValue(User* user);
 
        /** This method removes all prefix characters from a user.
         * It will not inform the user or the channel of the removal of prefixes,
         * and should be used when the user parts or quits.
         * @param user The user to remove all prefixes from
         */
-       void RemoveAllPrefixes(userrec* user);
+       void RemoveAllPrefixes(User* user);
 
        /** Add a prefix character to a user.
         * Only the core should call this method, usually  from
@@ -531,21 +531,21 @@ class CoreExport chanrec : public Extensible
         * @param prefix_rank The rank (value) of this prefix character
         * @param adding True if adding the prefix, false when removing
         */
-       void SetPrefix(userrec* user, char prefix, unsigned int prefix_rank, bool adding);
+       void SetPrefix(User* user, char prefix, unsigned int prefix_rank, bool adding);
 
        /** Check if a user is banned on this channel
         * @param user A user to check against the banlist
         * @returns True if the user given is banned
         */
-       bool IsBanned(userrec* user);
+       bool IsBanned(User* user);
 
        /** Clears the cached max bans value
         */
        void ResetMaxBans();
 
-       /** Destructor for chanrec
+       /** Destructor for Channel
         */
-       virtual ~chanrec() { /* stub */ }
+       virtual ~Channel() { /* stub */ }
 };
 
 #endif
index be3ea89ff3ca870e7dbeaeb747d1ae3a6234ed95..be18db4f983d01fd61b15a3c45be75e0fc9358c9 100644 (file)
@@ -54,7 +54,7 @@ class CoreExport CommandParser : public classbase
         * @param user The user to parse the command for
         * @param cmd The command string to process
         */
-       void ProcessCommand(userrec *user, std::string &cmd);
+       void ProcessCommand(User *user, std::string &cmd);
 
        /** Finds the init_command symbol in a .so file
         * @param v A function pointer to be initialized
@@ -93,7 +93,7 @@ class CoreExport CommandParser : public classbase
         * @return True if the command was reloaded, false if it could not be found
         * or another error occured
         */
-       bool ReloadCommand(const char* cmd, userrec* user);
+       bool ReloadCommand(const char* cmd, User* user);
 
        /** Default constructor.
         * @param Instance The creator of this class
@@ -111,7 +111,7 @@ class CoreExport CommandParser : public classbase
         * command simply did not exist at all or the wrong number of parameters were given, or the user
         * was not privilaged enough to execute the command.
         */
-       CmdResult CallHandler(const std::string &commandname,const char** parameters, int pcnt, userrec *user);
+       CmdResult CallHandler(const std::string &commandname,const char** parameters, int pcnt, User *user);
 
        /** Get the handler function for a command.
         * @param commandname The command required. Always use uppercase for this parameter.
@@ -127,7 +127,7 @@ class CoreExport CommandParser : public classbase
         * equal to or greater than the minimum number of parameters to the given command, then this
         * function will return true, otherwise it will return false.
         */
-       bool IsValidCommand(const std::string &commandname, int pcnt, userrec * user);
+       bool IsValidCommand(const std::string &commandname, int pcnt, User * user);
        
        /** LoopCall is used to call a command classes handler repeatedly based on the contents of a comma seperated list.
         * There are two overriden versions of this method, one of which takes two potential lists and the other takes one.
@@ -150,7 +150,7 @@ class CoreExport CommandParser : public classbase
         * @return This function will return 1 when there are no more parameters to process. When this occurs, its
         * caller should return without doing anything, otherwise it should continue into its main section of code.
         */
-       int LoopCall(userrec* user, Command* CommandObj, const char** parameters, int pcnt, unsigned int splithere, unsigned int extra);
+       int LoopCall(User* user, Command* CommandObj, const char** parameters, int pcnt, unsigned int splithere, unsigned int extra);
 
        /** LoopCall is used to call a command classes handler repeatedly based on the contents of a comma seperated list.
         * There are two overriden versions of this method, one of which takes two potential lists and the other takes one.
@@ -173,13 +173,13 @@ class CoreExport CommandParser : public classbase
         * @return This function will return 1 when there are no more parameters to process. When this occurs, its
         * caller should return without doing anything, otherwise it should continue into its main section of code.
         */
-       int LoopCall(userrec* user, Command* CommandObj, const char** parameters, int pcnt, unsigned int splithere);
+       int LoopCall(User* user, Command* CommandObj, const char** parameters, int pcnt, unsigned int splithere);
 
        /** Take a raw input buffer from a recvq, and process it on behalf of a user.
         * @param buffer The buffer line to process
         * @param user The user to whom this line belongs
         */
-       void ProcessBuffer(std::string &buffer,userrec *user);
+       void ProcessBuffer(std::string &buffer,User *user);
 
        /** Remove all commands relating to module 'source'.
         * @param source A module name which has introduced new commands
@@ -201,7 +201,7 @@ class CoreExport CommandParser : public classbase
         * @param user User to spool errors to, or if NULL, when an error occurs spool the errors to
         * stdout then exit with EXIT_STATUS_HANDLER.
         */
-       void SetupCommandTable(userrec* user);
+       void SetupCommandTable(User* user);
 
        /** Translate nicknames in a string into UIDs, based on the TranslationType given.
         * @param to The translation type to use for the process.
@@ -223,7 +223,7 @@ class cmd_reload : public Command
        cmd_reload (InspIRCd* Instance) : Command(Instance,"RELOAD",'o',1) { syntax = "<core-command>"; }
        /** Handle RELOAD
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 /** A lookup table of values for multiplier characters used by
index 049d230b06e1e24111ce06d8316b2acc4c6207dc..8b85a3e95f684ad553dd797234fd3512b9e3755c 100644 (file)
@@ -34,7 +34,7 @@ class cmd_admin : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 269c548aaf52cd4b51047b2fc5570befee9aa69b..29255d936ae7fefd2827bdeb1b54d1fa528a90c1 100644 (file)
@@ -36,7 +36,7 @@ class cmd_away : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index b89029a30f8801879a3ffffe28469734bc5c0cad..0af086609472f4deb37c6dfdfd78d589b57768e0 100644 (file)
@@ -35,7 +35,7 @@ class cmd_clearcache : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index a796d4ebd1ce38332c74a11fd3af82fb119528a1..03a6c08ba5de6ac0738145a543cb61d7a156a963 100644 (file)
@@ -36,7 +36,7 @@ class cmd_commands : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index b621cab77a7deefdc6d3da48ad2a6dcf7377eaaf..97096acb6326d93e6e4c63999de1a6e8be4b7072 100644 (file)
@@ -36,7 +36,7 @@ class cmd_connect : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index cae2637e932bfac86c21810f50ab32e942ba5a81..2eb9f7a6db06628fa4fc6746e32b47d665f496d1 100644 (file)
@@ -36,7 +36,7 @@ class cmd_die : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 36b22ce79dd3f5fd65ba18f03cec11aa3c873ea9..25c403be42edb70e25c644f7fbd36950c78e52d2 100644 (file)
@@ -36,7 +36,7 @@ class cmd_eline : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index caf703009796de6e7f0b29aba8043bc58847f2ae..3a398995f13240d5624f7431d593b89b891271be 100644 (file)
@@ -36,7 +36,7 @@ class cmd_gline : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index c84a03adfbbcd4d349f328ff1f72f5dff0551b79..578a832179aac4db1997136e32d8eb529320d7cf 100644 (file)
@@ -36,7 +36,7 @@ class cmd_info : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 95391e829a5b05d18887da91d314269de49be343..ad78869b203017b48fa1194130ba84274ace3d17 100644 (file)
@@ -36,7 +36,7 @@ class cmd_invite : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 3b914d62e5b07824a9ad294304d8a392883080db..e0ac4cc93697b037e45d868e945999cd82ab9dbb 100644 (file)
@@ -36,7 +36,7 @@ class cmd_ison : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index cf678e4eac4224f324e60218a043fa668e709ea8..6889b71fe6b9991b72822bd41c96f571d2c40d24 100644 (file)
@@ -36,7 +36,7 @@ class cmd_join : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 3a58d4203f3f17fa93cc65b82b08f05b10dfa9ca..769ab316e80e91cecd294822468c0d319bc53247 100644 (file)
@@ -36,7 +36,7 @@ class cmd_kick : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 1e1835f0091bfc13e17229eec123af85adfd1b58..1f80cded9db345e97564a8b66c4d2208aa4c7539 100644 (file)
@@ -36,7 +36,7 @@ class cmd_kill : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index edaa8a8bc7d6f16019e173defe63b316f48a7398..897c5402f1183c284858baa3a0535fdf64ada7b6 100644 (file)
@@ -36,7 +36,7 @@ class cmd_kline : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 74b6164011ee60570e8454e3ded34c9e7d15fb75..6c5d521f12ad31854aede12bb3144da888ea6c17 100644 (file)
@@ -36,7 +36,7 @@ class cmd_links : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index f99111fa0fb61fe88282e34ec00e5fd4fa34cb0c..fabe50fca04197c6ea3e3a3b83aae630c9313328 100644 (file)
@@ -36,7 +36,7 @@ class cmd_list : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 4288eb4c6e6805464abc9aabe1de4c567b7f6dd7..4e640b938a3caa7358c897f597833a56bdf99d01 100644 (file)
@@ -36,7 +36,7 @@ class cmd_loadmodule : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 76ebf567460561e3ab3bd319597fecfeda02aca7..d4bebca18716fa5e4d47a5e78ddaaa82ad821d7b 100644 (file)
@@ -36,7 +36,7 @@ class cmd_lusers : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 1ae324309c1e10e88cd57f77198858437ab7fab6..e3f546d7be4e7d9fadf4a9ed8c23a2dafbec4428 100644 (file)
@@ -36,7 +36,7 @@ class cmd_map : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 9231f2c611ecacd9949fa209cf1e65eb0ebd0d67..ddaeb69fbc2ab9bc05a1596e10a60b24db644317 100644 (file)
@@ -35,7 +35,7 @@ class cmd_mode : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 73a6074d1ff2f07cbdcdc06875c683f91027e358..5dd3fab2b828f18ed6fb80e7100a210f141c9fa2 100644 (file)
@@ -36,7 +36,7 @@ class cmd_modules : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index e6f5092b241269f8c5ec24fccb62a81a88d8b780..c79d22efbf82c85d92fd2d92eafdd4c81030b258 100644 (file)
@@ -39,7 +39,7 @@ class cmd_motd : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index b65fdeda801d40c115f9f15025b1359dfc96d433..82c25f569bde45912533536f71e69a4178fe380e 100644 (file)
@@ -36,7 +36,7 @@ class cmd_names : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 849b59c224f8ed5c94de75ad647e8a29a22c7792..f02522e9b2ea431f63b16cad807b2bb8d3d2d208 100644 (file)
@@ -37,7 +37,7 @@ class cmd_nick : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 
        /** Handle internal command
         * @param id Used to indicate if invalid nick changes are allowed.
index 20c34b6bfc7299bfcf0ccbdf9f7ddc3fe1e969c5..377aa4aba0f4181b1e2f71b234493c127bb1e536 100644 (file)
@@ -36,7 +36,7 @@ class cmd_notice : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 17d71dbe3c94bee12221a246b64046fcfe4a2ab6..581cfea1657cc254b8f1ae4c4bec4d29962d49b0 100644 (file)
@@ -38,7 +38,7 @@ class cmd_oper : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index c419fb7981327b97521eb02d87b38c9dbfed13da..0965a5031c955bece7753ca0aabc3978f8f40a14 100644 (file)
@@ -36,7 +36,7 @@ class cmd_part : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 0edd17a97b8a995f645aa183b4e8c5ab20051218..26e360923091d4a23ffcb7dbc4d37a1f3a3d60ef 100644 (file)
@@ -39,7 +39,7 @@ class cmd_pass : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 6e856fa3addfee2240d3a2a69c8f05e8e9b46ef7..326342e7b03a1dd13c68086569dd8fc3cf50f566 100644 (file)
@@ -36,7 +36,7 @@ class cmd_ping : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index f050a4ee826e002564326a0841387b2ebdf0003d..91b87bfb0a3d5661357ce3c7e4e99503a72bc8db 100644 (file)
@@ -37,7 +37,7 @@ class cmd_pong : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 604093851c708ba9921a2ff5eb035d2bc9e04805..12f1c0756ff2d027b6db091b0c6a456c9851ea53 100644 (file)
@@ -36,7 +36,7 @@ class cmd_privmsg : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index fb9e8804873a1beae453527df0b6b113f073a0db..7ea7643f17b70325b5d40e3d3a6ad7f893b1008b 100644 (file)
@@ -36,7 +36,7 @@ class cmd_qline : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 06c564ac00a54b7e8a0f5d7e02ff4599157c2a1b..23da5481c47740296421ab0753b3a89566236d8e 100644 (file)
@@ -36,7 +36,7 @@ class cmd_quit : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 684ffee9c5d9386cd6170582f9125708fdc63ba0..4012479728b918e2614fc69f30f3eb7cf16b1411 100644 (file)
@@ -36,7 +36,7 @@ class cmd_rehash : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 67281628993a550da5305a000c94a85e47bac5d2..cdf053062418c029f825f9576c478312fd9e19b6 100644 (file)
@@ -36,7 +36,7 @@ class cmd_reloadmodule : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 0834bf61b478a38f68812c114e04413cab64dcae..f85a00a825a30cd6d757a26a412eb186f8e15416 100644 (file)
@@ -39,7 +39,7 @@ class cmd_restart : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 5313dae3237fde807bb11ca018b19c119bdb1ded..adfab7e1739038a3f0fa668a37e74aaf0fc24460 100644 (file)
@@ -39,7 +39,7 @@ class cmd_rules : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index e3383e5c72689ac09f205a3df5d6c9234548b779..2b25e406d93c274a6a19608d899260fbf472df67 100644 (file)
@@ -36,7 +36,7 @@ class cmd_server : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index faef49dff4d7d87d548fa363a6815a3ca2f90a18..f1270ef4cbe6246b8434b1df1473e1b536a8e6b2 100644 (file)
@@ -39,7 +39,7 @@ class cmd_squit : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 2931a27e0637e2c4841c0b012aa1428c23cfd107..69e15113558bc9b85905531d226e3f9729145186 100644 (file)
@@ -20,7 +20,7 @@
 #include "users.h"
 #include "channels.h"
 
-DllExport void DoStats(InspIRCd* Instance, char statschar, userrec* user, string_list &results);
+DllExport void DoStats(InspIRCd* Instance, char statschar, User* user, string_list &results);
 
 /** Handle /STATS. These command handlers can be reloaded by the core,
  * and handle basic RFC1459 commands. Commands within modules work
@@ -39,7 +39,7 @@ class cmd_stats : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 24423c46ed3b38771b3a5a51c206777bcaa1e841..b6d353c890d4429ee458c3da44da9d42bed5cc82 100644 (file)
@@ -36,7 +36,7 @@ class cmd_time : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 0e75df750f8b14251d2d9fb0f2f7e1d05e28f62d..3375c164100263c822c269d964c89fbab873c64e 100644 (file)
@@ -36,7 +36,7 @@ class cmd_topic : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 6f5aecf0069d567d8df51051c7b0a7d2d495c1f2..1f551f1ebe0d564c6ea80f6f0deea84a9b82509c 100644 (file)
@@ -36,7 +36,7 @@ class cmd_trace : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 962c7dcb6de9641c44a5110defff3d78f743153b..2afd84168a8db4877b76d4394fc9bf152db61940 100644 (file)
@@ -36,7 +36,7 @@ class cmd_unloadmodule : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index dc4e0e3aaa7885327208fff5200fab1340f77cf1..186269d9a193d23dff181f6c1ba4f7a2136ef46a 100644 (file)
@@ -36,7 +36,7 @@ class cmd_user : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index bd19219de78c6d93837ad8c0b1482b1162f84f74..65b358e47218b19b29f9c120527e584cbc831272 100644 (file)
@@ -36,7 +36,7 @@ class cmd_userhost : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 2163bc1cf7430374241e28e023d188a78de1e727..a70e033df21010e98b29495cd5d084c34a6e0771 100644 (file)
@@ -36,7 +36,7 @@ class cmd_version : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 6c09989fe7140203226aa1f36dafcece7945b48d..c4ab9973f23886ec49ffbb562bc8b93ba09ab643 100644 (file)
@@ -36,7 +36,7 @@ class cmd_wallops : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index f89137c0a4632a3495cd7fe5cf9eb0ef9354ef9e..7d1bab9332447ef97bd380bcc9ce799abadac014 100644 (file)
@@ -26,7 +26,7 @@
  */
 class cmd_who : public Command
 {
-       bool CanView(chanrec* chan, userrec* user);
+       bool CanView(Channel* chan, User* user);
        bool opt_viewopersonly;
        bool opt_showrealhost;
        bool opt_unlimit;
@@ -42,15 +42,15 @@ class cmd_who : public Command
        /** Constructor for who.
         */
        cmd_who (InspIRCd* Instance) : Command(Instance,"WHO",0,1) { syntax = "<server>|<nickname>|<channel>|<realname>|<host>|0 [ohurmMiaplf]"; }
-       void SendWhoLine(userrec* user, const std::string &initial, chanrec* ch, userrec* u, std::vector<std::string> &whoresults);
+       void SendWhoLine(User* user, const std::string &initial, Channel* ch, User* u, std::vector<std::string> &whoresults);
        /** Handle command.
         * @param parameters The parameters to the comamnd
         * @param pcnt The number of parameters passed to teh command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
-       bool whomatch(userrec* user, const char* matchtext);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
+       bool whomatch(User* user, const char* matchtext);
 };
 
 #endif
index 6aec85e0a0d8e2fff9665dd732fe3f4192df7d82..b83fe8e5fc405bac0554e38edf804603829d8e30 100644 (file)
@@ -20,7 +20,7 @@
 #include "channels.h"
 
 const char* Spacify(char* n);
-DllExport void do_whois(InspIRCd* Instance, userrec* user, userrec* dest,unsigned long signon, unsigned long idle, const char* nick);
+DllExport void do_whois(InspIRCd* Instance, User* user, User* dest,unsigned long signon, unsigned long idle, const char* nick);
 
 /** Handle /WHOIS. These command handlers can be reloaded by the core,
  * and handle basic RFC1459 commands. Commands within modules work
@@ -39,7 +39,7 @@ class cmd_whois : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 50f5ffd0f2d5c9abd3c60b7437928e80774aedbf..c8f3671164fe7c35fc7134acd7280bebeb7c7110 100644 (file)
@@ -79,7 +79,7 @@ class cmd_whowas : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
     /** Handle an internal request from another command, the core, or a module
      * @param Command ID
      * @param Zero or more parameters, whos form is specified by the command ID.
@@ -88,7 +88,7 @@ class cmd_whowas : public Command
      * return CMD_LOCALONLY.
      */
        CmdResult HandleInternal(const unsigned int id, const std::deque<classbase*> &parameters);
-       void AddToWhoWas(userrec* user);
+       void AddToWhoWas(User* user);
        void GetStats(Extensible* ext);
        void PruneWhoWas(time_t t);
        void MaintainWhoWas(time_t t);
@@ -121,7 +121,7 @@ class WhoWasGroup : public classbase
 
        /** Initialize this WhoQasFroup with a user
         */
-       WhoWasGroup(userrec* user);
+       WhoWasGroup(User* user);
        /** Destructor
         */
        ~WhoWasGroup();
index 114de31b19b9e5089a0857252d44126922fcf066..e3ad7b727dc02c4f799b85ec2b5829b13ed3deab 100644 (file)
@@ -36,7 +36,7 @@ class cmd_zline : public Command
         * @param user The user issuing the command
         * @return A value from CmdResult to indicate command success or failure.
         */
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user);
+       CmdResult Handle(const char** parameters, int pcnt, User *user);
 };
 
 #endif
index 8b031012d43f728453d33f70d4d6fe08aa369264..86441d3448f50fd1d7288b703315ab5014cae15d 100644 (file)
@@ -235,7 +235,7 @@ class CoreExport ServerConfig : public Extensible
 
        /** Check that there is only one of each configuration item
         */
-       bool CheckOnce(char* tag, bool bail, userrec* user);
+       bool CheckOnce(char* tag, bool bail, User* user);
   
   public:
 
@@ -628,13 +628,13 @@ class CoreExport ServerConfig : public Extensible
 
        /** Send the 005 numerics (ISUPPORT) to a user
         */
-       void Send005(userrec* user);
+       void Send005(User* user);
 
        /** Read the entire configuration into memory
         * and initialize this class. All other methods
         * should be used only by the core.
         */
-       void Read(bool bail, userrec* user);
+       void Read(bool bail, User* user);
 
        /** Read a file into a file_cache object
         */
@@ -646,7 +646,7 @@ class CoreExport ServerConfig : public Extensible
         * this user as SNOTICEs.
         * If the parameter is NULL, the messages are spooled to all users via WriteOpers as SNOTICEs.
         */
-       void ReportConfigError(const std::string &errormessage, bool bail, userrec* user);
+       void ReportConfigError(const std::string &errormessage, bool bail, User* user);
 
        /** Load 'filename' into 'target', with the new config parser everything is parsed into
         * tag/key/value at load-time rather than at read-value time.
index 65d3424478a7d8ccd8b79a7cefc950c5c8208127..f476c39a5039f06ab2f7ff19289ca4fe1ca6d3d2 100644 (file)
@@ -19,7 +19,7 @@
 #include "base.h"
 #include "socketengine.h"
 
-/** connection is the base class of userrec, and holds basic user properties.
+/** connection is the base class of User, and holds basic user properties.
  * This can be extended for holding other user-like objects in the future.
  */
 class CoreExport connection : public EventHandler
@@ -50,7 +50,7 @@ class CoreExport connection : public EventHandler
         */
        bool haspassed;
 
-       /** Used by userrec to indicate the registration status of the connection
+       /** Used by User to indicate the registration status of the connection
         * It is a bitfield of the REG_NICK, REG_USER and REG_ALL bits to indicate
         * the connection state.
         */
index abfc740daabc329779c9739d9d76bf4f9bd77b95..0c2802baa982120349e4285016dd7b1b31557dcf 100644 (file)
@@ -20,7 +20,7 @@
 #include "base.h"
 
 /* Forward declarations - required */
-class userrec;
+class User;
 class InspIRCd;
 
 /** Used to indicate command success codes
@@ -119,7 +119,7 @@ class CoreExport Command : public Extensible
         * If the command succeeds but should remain local to this server,
         * return CMD_LOCALONLY.
         */
-       virtual CmdResult Handle(const char** parameters, int pcnt, userrec* user) = 0;
+       virtual CmdResult Handle(const char** parameters, int pcnt, User* user) = 0;
 
        /** Handle an internal request from another command, the core, or a module
         * @param Command ID
index 129f0d43db9e1bd46a0d9e29de7f01e3030713aa..c5daab5dd5befac31a0e4544b6788033f8d0df7d 100644 (file)
@@ -35,7 +35,7 @@ class CoreExport CullItem : public classbase
        /** Holds a pointer to the user,
         * must be valid and can be a local or remote user.
         */
-       userrec* user;
+       User* user;
        /** Holds the quit reason to use for this user.
         */
        std::string reason;
@@ -53,7 +53,7 @@ class CoreExport CullItem : public classbase
        * @param r The quit reason of the added user
        * @param ro The quit reason to show to opers only
        */
-       CullItem(userrec* u, std::string &r, const char* ro = "");
+       CullItem(User* u, std::string &r, const char* ro = "");
        /** Constrcutor.
         * Initializes the CullItem with a user pointer
         * and their quit reason
@@ -61,7 +61,7 @@ class CoreExport CullItem : public classbase
         * @param r The quit reason of the added user
         * @param ro The quit reason to show to opers only
         */
-       CullItem(userrec* u, const char* r, const char* ro = "");
+       CullItem(User* u, const char* r, const char* ro = "");
 
        /** Make the quit silent a module is dealing with
         * displaying this users quit, so we shouldn't
@@ -80,7 +80,7 @@ class CoreExport CullItem : public classbase
 
        /** Returns a pointer to the user
        */
-       userrec* GetUser();
+       User* GetUser();
        /** Returns the user's quit reason
        */
        std::string& GetReason();
@@ -111,7 +111,7 @@ class CoreExport CullList : public classbase
 
        /** Holds a list of users already added for quick lookup
         */
-       std::map<userrec*, userrec*> exempt;
+       std::map<User*, User*> exempt;
 
        /** Holds a list of users being quit.
         * See the information for CullItem for
@@ -133,7 +133,7 @@ class CoreExport CullList : public classbase
         * @param reason The quit reason of the user being added
         * @param o_reason The quit reason to show only to opers
         */
-       void AddItem(userrec* user, std::string &reason, const char* o_reason = "");
+       void AddItem(User* user, std::string &reason, const char* o_reason = "");
 
        /** Adds a user to the cull list for later
         * removal via QUIT.
@@ -141,11 +141,11 @@ class CoreExport CullList : public classbase
         * @param reason The quit reason of the user being added
         * @param o_reason The quit reason to show only to opers
         */
-       void AddItem(userrec* user, const char* reason, const char* o_reason = "");
+       void AddItem(User* user, const char* reason, const char* o_reason = "");
 
        /* Turn an item into a silent item (don't send out QUIT for this user)
         */
-       void MakeSilent(userrec* user);
+       void MakeSilent(User* user);
 
        /** Applies the cull list, quitting all the users
         * on the list with their quit reasons all at once.
index 033003f71acc14620d96a9d3124a7129159d9ccd..78792d1abda1d5bb38a2d6ac64b171e2e793a1e9 100644 (file)
@@ -438,8 +438,8 @@ namespace irc
         * To use this class, you must derive from it.
         * This is because each derived instance has its own freebits array
         * which can determine what bitfields are allocated on a TYPE BY TYPE
-        * basis, e.g. an irc::dynamicbitmask type for userrecs, and one for
-        * chanrecs, etc. You should inheret it in a very simple way as follows.
+        * basis, e.g. an irc::dynamicbitmask type for Users, and one for
+        * Channels, etc. You should inheret it in a very simple way as follows.
         * The base class will resize and maintain freebits as required, you are
         * just required to make the pointer static and specific to this class
         * type.
index 7aa5a5ec3f1a625d4b2e6242d8313796449e7275..afa4db7f4c39023afe947d7ff1d08e89213bde25 100644 (file)
@@ -231,11 +231,11 @@ typedef std::map<irc::string, unsigned int> clonemap;
 
 class InspIRCd;
 
-DEFINE_HANDLER1(ProcessUserHandler, void, userrec*);
+DEFINE_HANDLER1(ProcessUserHandler, void, User*);
 DEFINE_HANDLER1(IsNickHandler, bool, const char*);
 DEFINE_HANDLER1(IsIdentHandler, bool, const char*);
-DEFINE_HANDLER1(FindDescriptorHandler, userrec*, int);
-DEFINE_HANDLER1(FloodQuitUserHandler, void, userrec*);
+DEFINE_HANDLER1(FindDescriptorHandler, User*, int);
+DEFINE_HANDLER1(FloodQuitUserHandler, void, User*);
 
 /* Forward declaration - required */
 class XLineManager;
@@ -287,7 +287,7 @@ class CoreExport InspIRCd : public classbase
         * @param user The user to verify
         * @return True if all modules have finished checking this user
         */
-       bool AllModulesReportReady(userrec* user);
+       bool AllModulesReportReady(User* user);
 
        /** Logfile pathname specified on the commandline, or empty string
         */
@@ -348,12 +348,12 @@ class CoreExport InspIRCd : public classbase
        /** Globally accessible fake user record. This is used to force mode changes etc across s2s, etc.. bit ugly, but.. better than how this was done in 1.1
         * Reason for it:
         * kludge alert!
-        * SendMode expects a userrec* to send the numeric replies
+        * SendMode expects a User* to send the numeric replies
         * back to, so we create it a fake user that isnt in the user
         * hash and set its descriptor to FD_MAGIC_NUMBER so the data
         * falls into the abyss :p
         */
-       userrec *FakeClient;
+       User *FakeClient;
 
        /** Returns the next available UID for this server.
         */
@@ -363,13 +363,13 @@ class CoreExport InspIRCd : public classbase
         * @param nick The nickname to find
         * @return A pointer to the user, or NULL if the user does not exist
         */
-       userrec *FindUUID(const std::string &);
+       User *FindUUID(const std::string &);
 
        /** Find a user in the UUID hash
         * @param nick The nickname to find
         * @return A pointer to the user, or NULL if the user does not exist
         */
-       userrec *FindUUID(const char *);
+       User *FindUUID(const char *);
 
        /** Build the ISUPPORT string by triggering all modules On005Numeric events
         */
@@ -427,7 +427,7 @@ class CoreExport InspIRCd : public classbase
        user_hash* clientlist;
 
        /** Client list stored by UUID. Contains all clients, and is updated
-        * automatically by the constructor and destructor of userrec.
+        * automatically by the constructor and destructor of User.
         */
        user_hash* uuidlist;
 
@@ -437,11 +437,11 @@ class CoreExport InspIRCd : public classbase
 
        /** Local client list, a vector containing only local clients
         */
-       std::vector<userrec*> local_users;
+       std::vector<User*> local_users;
 
        /** Oper list, a vector containing all local and remote opered users
         */
-       std::list<userrec*> all_opers;
+       std::list<User*> all_opers;
 
        /** Map of local ip addresses for clone counting
         */
@@ -490,12 +490,12 @@ class CoreExport InspIRCd : public classbase
        /** Add a user to the local clone map
         * @param user The user to add
         */
-       void AddLocalClone(userrec* user);
+       void AddLocalClone(User* user);
 
        /** Add a user to the global clone map
         * @param user The user to add
         */
-       void AddGlobalClone(userrec* user);
+       void AddGlobalClone(User* user);
        
        /** Number of users with a certain mode set on them
         */
@@ -511,7 +511,7 @@ class CoreExport InspIRCd : public classbase
         * @return There is no actual return value, however upon exit, the user 'cu' may have been
         * marked for deletion in the global CullList.
         */
-       caller1<void, userrec*> ProcessUser;
+       caller1<void, User*> ProcessUser;
 
        /** Bind all ports specified in the configuration file.
         * @param bail True if the function should bail back to the shell on failure
@@ -534,7 +534,7 @@ class CoreExport InspIRCd : public classbase
        void AddServerName(const std::string &servername);
 
        /** Finds a cached char* pointer of a server name,
-        * This is used to optimize userrec by storing only the pointer to the name
+        * This is used to optimize User by storing only the pointer to the name
         * @param The servername to find
         * @return A pointer to this name, gauranteed to never become invalid
         */
@@ -571,34 +571,34 @@ class CoreExport InspIRCd : public classbase
         * @param nick The nickname to find
         * @return A pointer to the user, or NULL if the user does not exist
         */
-       userrec* FindNick(const std::string &nick);
+       User* FindNick(const std::string &nick);
 
        /** Find a user in the nick hash.
         * If the user cant be found in the nick hash check the uuid hash
         * @param nick The nickname to find
         * @return A pointer to the user, or NULL if the user does not exist
         */
-       userrec* FindNick(const char* nick);
+       User* FindNick(const char* nick);
 
        /** Find a user in the nick hash ONLY
         */
-       userrec* FindNickOnly(const char* nick);
+       User* FindNickOnly(const char* nick);
 
        /** Find a user in the nick hash ONLY
         */
-       userrec* FindNickOnly(const std::string &nick);
+       User* FindNickOnly(const std::string &nick);
 
        /** Find a channel in the channels hash
         * @param chan The channel to find
         * @return A pointer to the channel, or NULL if the channel does not exist
         */
-       chanrec* FindChan(const std::string &chan);
+       Channel* FindChan(const std::string &chan);
 
        /** Find a channel in the channels hash
         * @param chan The channel to find
         * @return A pointer to the channel, or NULL if the channel does not exist
         */
-       chanrec* FindChan(const char* chan);
+       Channel* FindChan(const char* chan);
 
        /** Check for a 'die' tag in the config file, and abort if found
         * @return Depending on the configuration, this function may never return
@@ -733,7 +733,7 @@ class CoreExport InspIRCd : public classbase
         * @param socket The file descriptor of a user
         * @return A pointer to the user if the user exists locally on this descriptor
         */
-       caller1<userrec*, int> FindDescriptor;
+       caller1<User*, int> FindDescriptor;
 
        /** Add a new mode to this server's mode parser
         * @param mh The modehandler to add
@@ -785,7 +785,7 @@ class CoreExport InspIRCd : public classbase
         * @param pcnt The number of items you have given in the first parameter
         * @param user The user to send error messages to
         */
-       void SendMode(const char **parameters, int pcnt, userrec *user);
+       void SendMode(const char **parameters, int pcnt, User *user);
 
        /** Match two strings using pattern matching.
         * This operates identically to the global function match(),
@@ -803,7 +803,7 @@ class CoreExport InspIRCd : public classbase
         * @param user The user to execute the command as
         * @return True if the command handler was called successfully
         */
-       CmdResult CallCommandHandler(const std::string &commandname, const char** parameters, int pcnt, userrec* user);
+       CmdResult CallCommandHandler(const std::string &commandname, const char** parameters, int pcnt, User* user);
 
        /** Return true if the command is a module-implemented command and the given parameters are valid for it
         * @param parameters The mode parameters
@@ -811,7 +811,7 @@ class CoreExport InspIRCd : public classbase
         * @param user The user to test-execute the command as
         * @return True if the command handler is a module command, and there are enough parameters and the user has permission to the command
         */
-       bool IsValidModuleCommand(const std::string &commandname, int pcnt, userrec* user);
+       bool IsValidModuleCommand(const std::string &commandname, int pcnt, User* user);
 
        /** Add a gline and apply it
         * @param duration How long the line should last
@@ -897,35 +897,35 @@ class CoreExport InspIRCd : public classbase
         * @param The index number of the channel to fetch
         * @return A channel record, or NUll if index < 0 or index >= InspIRCd::ChannelCount()
         */
-       chanrec* GetChannelIndex(long index);
+       Channel* GetChannelIndex(long index);
 
        /** Dump text to a user target, splitting it appropriately to fit
         * @param User the user to dump the text to
         * @param LinePrefix text to prefix each complete line with
         * @param TextStream the text to send to the user
         */
-       void DumpText(userrec* User, const std::string &LinePrefix, stringstream &TextStream);
+       void DumpText(User* User, const std::string &LinePrefix, stringstream &TextStream);
 
        /** Check if the given nickmask matches too many users, send errors to the given user
         * @param nick A nickmask to match against
         * @param user A user to send error text to
         * @return True if the nick matches too many users
         */
-       bool NickMatchesEveryone(const std::string &nick, userrec* user);
+       bool NickMatchesEveryone(const std::string &nick, User* user);
 
        /** Check if the given IP mask matches too many users, send errors to the given user
         * @param ip An ipmask to match against
         * @param user A user to send error text to
         * @return True if the ip matches too many users
         */
-       bool IPMatchesEveryone(const std::string &ip, userrec* user);
+       bool IPMatchesEveryone(const std::string &ip, User* user);
 
        /** Check if the given hostmask matches too many users, send errors to the given user
         * @param mask A hostmask to match against
         * @param user A user to send error text to
         * @return True if the host matches too many users
         */
-       bool HostMatchesEveryone(const std::string &mask, userrec* user);
+       bool HostMatchesEveryone(const std::string &mask, User* user);
 
        /** Calculate a duration in seconds from a string in the form 1y2w3d4h6m5s
         * @param str A string containing a time in the form 1y2w3d4h6m5s
@@ -1004,7 +1004,7 @@ class CoreExport InspIRCd : public classbase
         * @param numeric Numeric to send
         * @param text Text of the numeric
         */
-       void SendWhoisLine(userrec* user, userrec* dest, int numeric, const std::string &text);
+       void SendWhoisLine(User* user, User* dest, int numeric, const std::string &text);
 
        /** Send a line of WHOIS data to a user.
         * @param user user to send the line to
@@ -1013,13 +1013,13 @@ class CoreExport InspIRCd : public classbase
         * @param format Format string for the numeric
         * @param ... Parameters for the format string
         */
-       void SendWhoisLine(userrec* user, userrec* dest, int numeric, const char* format, ...);
+       void SendWhoisLine(User* user, User* dest, int numeric, const char* format, ...);
 
        /** Quit a user for excess flood, and if they are not
         * fully registered yet, temporarily zline their IP.
         * @param current user to quit
         */
-       caller1<void, userrec*> FloodQuitUser;
+       caller1<void, User*> FloodQuitUser;
 
        /** Restart the server.
         * This function will not return. If an error occurs,
index c8a315cce85df14b129a002a472061fce56f055c..2524c11ddf3f583afcfb89d3a888d7fe43efb47c 100644 (file)
@@ -58,7 +58,7 @@ enum ModeMasks
 
 /**
  * These fixed values can be used to proportionally compare module-defined prefixes to known values.
- * For example, if your module queries a chanrec, and is told that user 'joebloggs' has the prefix
+ * For example, if your module queries a Channel, and is told that user 'joebloggs' has the prefix
  * '$', and you dont know what $ means, then you can compare it to these three values to determine
  * its worth against them. For example if '$' had a value of 15000, you would know it is of higher
  * status than voice, but lower status than halfop.
@@ -186,7 +186,7 @@ class CoreExport ModeHandler : public Extensible
         * Get the 'value' of this modes prefix.
         * determines which to display when there are multiple.
         * The mode with the highest value is ranked first. See the
-        * PrefixModeValue enum and chanrec::GetPrefixValue() for
+        * PrefixModeValue enum and Channel::GetPrefixValue() for
         * more information.
         */
        virtual unsigned int GetPrefixRank();
@@ -223,21 +223,21 @@ class CoreExport ModeHandler : public Extensible
         * @param adding This value is true when the mode is being set, or false when it is being unset.
         * @return MODEACTION_ALLOW to allow the mode, or MODEACTION_DENY to prevent the mode, also see the description of 'parameter'.
         */
-       virtual ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding); /* Can change the mode parameter as its a ref */
+       virtual ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding); /* Can change the mode parameter as its a ref */
        /**
         * If your mode is a listmode, then this method will be called for displaying an item list, e.g. on MODE #channel +modechar
         * without any parameter or other modes in the command.
         * @param user The user issuing the command
         * @param channel The channel they're requesting an item list of (e.g. a banlist, or an exception list etc)
         */
-       virtual void DisplayList(userrec* user, chanrec* channel);
+       virtual void DisplayList(User* user, Channel* channel);
 
        /**
         * If your mode is a listmode, this method will be called to display an empty list (just the end of list numeric)
         * @param user The user issuing the command
         * @param channel The channel tehy're requesting an item list of (e.g. a banlist, or an exception list etc)
         */
-       virtual void DisplayEmptyList(userrec* user, chanrec* channel);
+       virtual void DisplayEmptyList(User* user, Channel* channel);
 
        /**
         * If your mode needs special action during a server sync to determine which side wins when comparing timestamps,
@@ -251,7 +251,7 @@ class CoreExport ModeHandler : public Extensible
         * @param channel The channel we are checking against
         * @return True if the other side wins the merge, false if we win the merge for this mode.
         */
-       virtual bool CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, chanrec* channel);
+       virtual bool CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, Channel* channel);
 
        /**
         * When a remote server needs to bounce a set of modes, it will call this method for every mode
@@ -266,7 +266,7 @@ class CoreExport ModeHandler : public Extensible
         * the current setting for this mode set locally, when the bool is true, or, the parameter given.
         * This allows the local server to enforce our locally set parameters back to a remote server.
         */
-       virtual ModePair ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter);
+       virtual ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter);
 
        /**
         * When a MODETYPE_USER mode handler is being removed, the server will call this method for every user on the server.
@@ -276,7 +276,7 @@ class CoreExport ModeHandler : public Extensible
         * your mode properly from each user.
         * @param user The user which the server wants to remove your mode from
         */
-       virtual void RemoveMode(userrec* user);
+       virtual void RemoveMode(User* user);
 
        /**
         * When a MODETYPE_CHANNEL mode handler is being removed, the server will call this method for every channel on the server.
@@ -286,7 +286,7 @@ class CoreExport ModeHandler : public Extensible
         * your mode properly from each channel. Note that in the case of listmodes, you should remove the entire list of items.
         * @param channel The channel which the server wants to remove your mode from
         */
-       virtual void RemoveMode(chanrec* channel);
+       virtual void RemoveMode(Channel* channel);
 };
 
 /**
@@ -345,7 +345,7 @@ class CoreExport ModeWatcher : public Extensible
         * @return True to allow the mode change to go ahead, false to abort it. If you abort the
         * change, the mode handler (and ModeWatcher::AfterMode()) will never see the mode change.
         */
-       virtual bool BeforeMode(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding, ModeType type);
+       virtual bool BeforeMode(User* source, User* dest, Channel* channel, std::string &parameter, bool adding, ModeType type);
        /**
         * After the mode character has been processed by the ModeHandler, this method will be called.
         * @param source The sender of the mode
@@ -356,7 +356,7 @@ class CoreExport ModeWatcher : public Extensible
         * @param adding True if the mode is being added and false if it is being removed
         * @type The mode type, either MODETYPE_USER or MODETYPE_CHANNEL
         */
-       virtual void AfterMode(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter, bool adding, ModeType type);
+       virtual void AfterMode(User* source, User* dest, Channel* channel, const std::string &parameter, bool adding, ModeType type);
 };
 
 typedef std::vector<ModeWatcher*>::iterator ModeWatchIter;
@@ -387,7 +387,7 @@ class CoreExport ModeParser : public classbase
        /** Displays the current modes of a channel or user.
         * Used by ModeParser::Process.
         */
-       void DisplayCurrentModes(userrec *user, userrec* targetuser, chanrec* targetchannel, const char* text);
+       void DisplayCurrentModes(User *user, User* targetuser, Channel* targetchannel, const char* text);
 
        /** The string representing the last set of modes to be parsed.
         * Use GetLastParse() to get this value, to be used for  display purposes.
@@ -403,13 +403,13 @@ class CoreExport ModeParser : public classbase
        /** Used to check if user 'd' should be allowed to do operation 'MASK' on channel 'chan'.
         * for example, should 'user A' be able to 'op' on 'channel B'.
         */
-       userrec* SanityChecks(userrec *user,const char *dest,chanrec *chan,int status);
+       User* SanityChecks(User *user,const char *dest,Channel *chan,int status);
        /** Grant a built in privilage (e.g. ops, halfops, voice) to a user on a channel
         */
-       const char* Grant(userrec *d,chanrec *chan,int MASK);
+       const char* Grant(User *d,Channel *chan,int MASK);
        /** Revoke a built in privilage (e.g. ops, halfops, voice) to a user on a channel
         */
-       const char* Revoke(userrec *d,chanrec *chan,int MASK);
+       const char* Revoke(User *d,Channel *chan,int MASK);
        /** Tidy a banmask. This makes a banmask 'acceptable' if fields are left out.
         * E.g.
         *
@@ -466,11 +466,11 @@ class CoreExport ModeParser : public classbase
         * they would be from a MODE command.
         * @param pcnt The number of items in the parameters array
         * @param user The user setting or removing the modes. When the modes are set
-        * by a server, an 'uninitialized' userrec is used, where *user::nick == NULL
+        * by a server, an 'uninitialized' User is used, where *user::nick == NULL
         * and *user->server == NULL.
         * @param servermode True if a server is setting the mode.
         */
-       void Process(const char** parameters, int pcnt, userrec *user, bool servermode);
+       void Process(const char** parameters, int pcnt, User *user, bool servermode);
 
        /** Find the mode handler for a given mode and type.
         * @param modeletter mode letter to search for
@@ -520,7 +520,7 @@ class CoreExport ModeParser : public classbase
         * @param channel The channel name to look up the privilages of the user for
         * @return The mode string.
         */
-       std::string ModeString(userrec* user, chanrec* channel);
+       std::string ModeString(User* user, Channel* channel);
 };
 
 #endif
index 417480777d0b95a54f2cd1a03f97e4333f8eaa21..c7d349541971f62ed2a78f5e71315ff66cf7ece2 100644 (file)
@@ -24,13 +24,13 @@ class ModeChannelBan : public ModeHandler
        BanItem b;
  public:
        ModeChannelBan(InspIRCd* Instance);
-       ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding);
-       std::string& AddBan(userrec *user,std::string& dest,chanrec *chan,int status);
-       std::string& DelBan(userrec *user,std::string& dest,chanrec *chan,int status);
-       void DisplayList(userrec* user, chanrec* channel);
-       void DisplayEmptyList(userrec* user, chanrec* channel);
-       ModePair ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter);
-       void RemoveMode(userrec* user);
-       void RemoveMode(chanrec* channel);
+       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding);
+       std::string& AddBan(User *user,std::string& dest,Channel *chan,int status);
+       std::string& DelBan(User *user,std::string& dest,Channel *chan,int status);
+       void DisplayList(User* user, Channel* channel);
+       void DisplayEmptyList(User* user, Channel* channel);
+       ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter);
+       void RemoveMode(User* user);
+       void RemoveMode(Channel* channel);
 };
 
index 77d1d57ae432a4c780c6ceb8e8c3772c5d9b8315..cd524196ecf669a4d9e68527f064dd22c5c5be2d 100644 (file)
@@ -23,12 +23,12 @@ class ModeChannelHalfOp : public ModeHandler
  private:
  public:
        ModeChannelHalfOp(InspIRCd* Instance);
-       ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding);
-       std::string AddHalfOp(userrec *user,const char *dest,chanrec *chan,int status);
-       std::string DelHalfOp(userrec *user,const char *dest,chanrec *chan,int status);
-       ModePair ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter);
+       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding);
+       std::string AddHalfOp(User *user,const char *dest,Channel *chan,int status);
+       std::string DelHalfOp(User *user,const char *dest,Channel *chan,int status);
+       ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter);
        unsigned int GetPrefixRank();
-       void RemoveMode(chanrec* channel);
-       void RemoveMode(userrec* user);
+       void RemoveMode(Channel* channel);
+       void RemoveMode(User* user);
 };
 
index fb177dc0f85712aa6c1391b8c01e4cb04486f0e5..560c7dc140419c8cc4cc981aced1d1f35271633f 100644 (file)
@@ -21,5 +21,5 @@ class ModeChannelInviteOnly : public ModeHandler
 {
  public:
        ModeChannelInviteOnly(InspIRCd* Instance);
-       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);
 };
index 51e8ffcaa00fb6d92dff8c45689f6a594de388d9..c8a1fc20e03512d64ccc0e3f64ee3ee483be286a 100644 (file)
@@ -21,9 +21,9 @@ class ModeChannelKey : public ModeHandler
 {
  public:
        ModeChannelKey(InspIRCd* Instance);
-       ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding);
-       ModePair ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter);
-       bool CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, chanrec* channel);
-       void RemoveMode(chanrec* channel);
-       void RemoveMode(userrec* user);
+       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding);
+       ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter);
+       bool CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, Channel* channel);
+       void RemoveMode(Channel* channel);
+       void RemoveMode(User* user);
 };
index 63b4a1ef11c2a75151e30164581630521578b6da..06d53069a69cf6c9bca908e6f08de3a7cdf6cfc7 100644 (file)
@@ -21,7 +21,7 @@ class ModeChannelLimit : public ModeHandler
 {
  public:
        ModeChannelLimit(InspIRCd* Instance);
-       ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding);
-       ModePair ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter);
-       bool CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, chanrec* channel);
+       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding);
+       ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter);
+       bool CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, Channel* channel);
 };
index 52288de4c7a017cb085fa167e772e8b9ff5cdbc7..eb3844fadc8d13830d1d89fcc3d8338a7d8a23c3 100644 (file)
@@ -21,5 +21,5 @@ class ModeChannelModerated : public ModeHandler
 {
  public:
        ModeChannelModerated(InspIRCd* Instance);
-       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);
 };
index 953e0d6717b27d91410f75686018f533aa98c141..6e51cdd6967f905184765ee287b7a03cd75f3f9e 100644 (file)
@@ -21,5 +21,5 @@ class ModeChannelNoExternal : public ModeHandler
 {
  public:
        ModeChannelNoExternal(InspIRCd* Instance);
-       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);
 };
index c86fb4586d4c66e98c64328aa4d2a8c389719452..cc0b295db29496ea3ad6417a429aafcf3c799de5 100644 (file)
@@ -23,12 +23,12 @@ class ModeChannelOp : public ModeHandler
  private:
  public:
        ModeChannelOp(InspIRCd* Instance);
-       ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding);
-       std::string AddOp(userrec *user,const char *dest,chanrec *chan,int status);
-       std::string DelOp(userrec *user,const char *dest,chanrec *chan,int status);
-       ModePair ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter);
+       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding);
+       std::string AddOp(User *user,const char *dest,Channel *chan,int status);
+       std::string DelOp(User *user,const char *dest,Channel *chan,int status);
+       ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter);
        unsigned int GetPrefixRank();
-       void RemoveMode(chanrec* channel);
-       void RemoveMode(userrec* user);
+       void RemoveMode(Channel* channel);
+       void RemoveMode(User* user);
 };
 
index ad3f3ae89326d5a03eb2a5b2e43d6d5bde484118..d2a67f975ff42795fa0fa8da1e142350f4362a19 100644 (file)
@@ -21,5 +21,5 @@ class ModeChannelPrivate : public ModeHandler
 {
  public:
        ModeChannelPrivate(InspIRCd* Instance);
-       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);
 };
index 0bc229c37cc4e8e521fbd715f60b4517608a5c97..0a9f709d6296e7b7948131d2d035612577280bb5 100644 (file)
@@ -21,5 +21,5 @@ class ModeChannelSecret : public ModeHandler
 {
  public:
        ModeChannelSecret(InspIRCd* Instance);
-       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);
 };
index 8a7517ee336b1628f00643173c51f33fc9dc31d6..049cb60d32aa738008d74201d164b7554cad8c7c 100644 (file)
@@ -21,5 +21,5 @@ class ModeChannelTopicOps : public ModeHandler
 {
  public:
        ModeChannelTopicOps(InspIRCd* Instance);
-       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);
 };
index 75420a6d557f15a25e77a67c32eca0f8d6f67919..e6666311d0e78a19eac3716bc7f94200aa0cfbc5 100644 (file)
@@ -23,12 +23,12 @@ class ModeChannelVoice : public ModeHandler
  private:
  public:
        ModeChannelVoice(InspIRCd* Instance);
-       ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding);
-       std::string AddVoice(userrec *user,const char *dest,chanrec *chan,int status);
-       std::string DelVoice(userrec *user,const char *dest,chanrec *chan,int status);
-       ModePair ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter);
+       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding);
+       std::string AddVoice(User *user,const char *dest,Channel *chan,int status);
+       std::string DelVoice(User *user,const char *dest,Channel *chan,int status);
+       ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter);
        unsigned int GetPrefixRank();
-       void RemoveMode(userrec* user);
-       void RemoveMode(chanrec* channel);
+       void RemoveMode(User* user);
+       void RemoveMode(Channel* channel);
 };
 
index cc7d15102b104dca573dbbf4e7d54ff8efb319ad..e6a27d8c7c8a1008b8951ca5e324990b5b825ba4 100644 (file)
@@ -21,6 +21,6 @@ class ModeUserInvisible : public ModeHandler
 {
  public:
        ModeUserInvisible(InspIRCd* Instance);
-       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);
        unsigned int GetCount();
 };
index cd1275accbcd46d6a61606a990a1147827b86d17..d75b843c320884a460684223cf35e6cfb4d1105f 100644 (file)
@@ -21,5 +21,5 @@ class ModeUserServerNoticeMask : public ModeHandler
 {
  public:
        ModeUserServerNoticeMask(InspIRCd* Instance);
-       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);
 };
index 7dfdb41280e2eff1217818ba301ba8d898bb141d..57b3e8ac800929fe1d069f1287905deb0bf1d565 100644 (file)
@@ -21,6 +21,6 @@ class ModeUserOperator : public ModeHandler
 {
  public:
        ModeUserOperator(InspIRCd* Instance);
-       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);
        unsigned int GetCount();
 };
index cda223eee1572c596855a2b323cf5510f8ec05e5..aa788b35344e80dc9abf6bca407fc4d985600dd8 100644 (file)
@@ -21,6 +21,6 @@ class ModeUserServerNotice : public ModeHandler
 {
  public:
        ModeUserServerNotice(InspIRCd* Instance);
-       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);
        unsigned int GetCount();
 };
index 271e959c4a2522f5c51e88eb5b2e6dc16ca35a97..d6f2c0ca7343b08ac4326db2ed860ca5d89b5fd9 100644 (file)
@@ -21,6 +21,6 @@ class ModeUserWallops : public ModeHandler
 {
  public:
        ModeUserWallops(InspIRCd* Instance);
-       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);
        unsigned int GetCount();
 };
index 0aaa06c34183f0bc0f312fa5e0962400b1adf505..025f35bf33c9cfbcbafa515d01857790e07b7917 100644 (file)
@@ -449,43 +449,43 @@ class CoreExport Module : public Extensible
        virtual Priority Prioritize();
 
        /** Called when a user connects.
-        * The details of the connecting user are available to you in the parameter userrec *user
+        * The details of the connecting user are available to you in the parameter User *user
         * @param user The user who is connecting
         */
-       virtual void OnUserConnect(userrec* user);
+       virtual void OnUserConnect(User* user);
 
        /** Called when a user quits.
-        * The details of the exiting user are available to you in the parameter userrec *user
+        * The details of the exiting user are available to you in the parameter User *user
         * This event is only called when the user is fully registered when they quit. To catch
         * raw disconnections, use the OnUserDisconnect method.
         * @param user The user who is quitting
         * @param message The user's quit message (as seen by non-opers)
         * @param oper_message The user's quit message (as seen by opers)
         */
-       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);
 
        /** Called whenever a user's socket is closed.
-        * The details of the exiting user are available to you in the parameter userrec *user
+        * The details of the exiting user are available to you in the parameter User *user
         * This event is called for all users, registered or not, as a cleanup method for modules
         * which might assign resources to user, such as dns lookups, objects and sockets.
         * @param user The user who is disconnecting
         */
-       virtual void OnUserDisconnect(userrec* user);
+       virtual void OnUserDisconnect(User* user);
 
        /** Called whenever a channel is deleted, either by QUIT, KICK or PART.
         * @param chan The channel being deleted
         */
-       virtual void OnChannelDelete(chanrec* chan);
+       virtual void OnChannelDelete(Channel* chan);
 
        /** Called when a user joins a channel.
-        * The details of the joining user are available to you in the parameter userrec *user,
-        * and the details of the channel they have joined is available in the variable chanrec *channel
+        * The details of the joining user are available to you in the parameter User *user,
+        * and the details of the channel they have joined is available in the variable Channel *channel
         * @param user The user who is joining
         * @param channel The channel being joined
         * @param silent Change this to true if you want to conceal the JOIN command from the other users
         * of the channel (useful for modules such as auditorium)
         */
-       virtual void OnUserJoin(userrec* user, chanrec* channel, bool &silent);
+       virtual void OnUserJoin(User* user, Channel* channel, bool &silent);
 
        /** Called after a user joins a channel
         * Identical to OnUserJoin, but called immediately afterwards, when any linking module has
@@ -493,18 +493,18 @@ class CoreExport Module : public Extensible
         * @param user The user who is joining
         * @param channel The channel being joined
         */
-       virtual void OnPostJoin(userrec* user, chanrec* channel);
+       virtual void OnPostJoin(User* user, Channel* channel);
 
        /** Called when a user parts a channel.
-        * The details of the leaving user are available to you in the parameter userrec *user,
-        * and the details of the channel they have left is available in the variable chanrec *channel
+        * The details of the leaving user are available to you in the parameter User *user,
+        * and the details of the channel they have left is available in the variable Channel *channel
         * @param user The user who is parting
         * @param channel The channel being parted
         * @param partmessage The part message, or an empty string
         * @param silent Change this to true if you want to conceal the PART command from the other users
         * of the channel (useful for modules such as auditorium)
         */
-       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);
 
        /** Called on rehash.
         * This method is called prior to a /REHASH or when a SIGHUP is received from the operating
@@ -515,20 +515,20 @@ class CoreExport Module : public Extensible
         * value of this variable will be NULL.
         * @param parameter The (optional) parameter given to REHASH from the user.
         */
-       virtual void OnRehash(userrec* user, const std::string &parameter);
+       virtual void OnRehash(User* user, const std::string &parameter);
 
        /** Called when a raw command is transmitted or received.
         * This method is the lowest level of handler available to a module. It will be called with raw
         * data which is passing through a connected socket. If you wish, you may munge this data by changing
         * the string parameter "raw". If you do this, after your function exits it will immediately be
         * cut down to 510 characters plus a carriage return and linefeed. For INBOUND messages only (where
-        * inbound is set to true) the value of user will be the userrec of the connection sending the
+        * inbound is set to true) the value of user will be the User of the connection sending the
         * data. This is not possible for outbound data because the data may be being routed to multiple targets.
         * @param raw The raw string in RFC1459 format
         * @param inbound A flag to indicate wether the data is coming into the daemon or going out to the user
         * @param user The user record sending the text, when inbound == true.
         */
-       virtual void OnServerRaw(std::string &raw, bool inbound, userrec* user);
+       virtual void OnServerRaw(std::string &raw, bool inbound, User* user);
 
        /** Called whenever a user is about to join a channel, before any processing is done.
         * Returning a value of 1 from this function stops the process immediately, causing no
@@ -539,7 +539,7 @@ class CoreExport Module : public Extensible
         * IMPORTANT NOTE!
         *
         * If the user joins a NEW channel which does not exist yet, OnUserPreJoin will be called BEFORE the channel
-        * record is created. This will cause chanrec* chan to be NULL. There is very little you can do in form of
+        * record is created. This will cause Channel* chan to be NULL. There is very little you can do in form of
         * processing on the actual channel record at this point, however the channel NAME will still be passed in
         * char* cname, so that you could for example implement a channel blacklist or whitelist, etc.
         * @param user The user joining the channel
@@ -549,7 +549,7 @@ class CoreExport Module : public Extensible
         * You may alter this string to alter the user's modes on the channel.
         * @return 1 To prevent the join, 0 to allow it.
         */
-       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);
        
        /** Called whenever a user is about to be kicked.
         * Returning a value of 1 from this function stops the process immediately, causing no
@@ -561,7 +561,7 @@ class CoreExport Module : public Extensible
         * @param reason The kick reason
         * @return 1 to prevent the kick, 0 to continue normally, -1 to explicitly allow the kick regardless of normal operation
         */
-       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);
 
        /** Called whenever a user is kicked.
         * If this method is called, the kick is already underway and cannot be prevented, so
@@ -573,15 +573,15 @@ class CoreExport Module : public Extensible
         * @param silent Change this to true if you want to conceal the PART command from the other users
         * of the channel (useful for modules such as auditorium)
         */
-       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);
 
        /** Called whenever a user opers locally.
-        * The userrec will contain the oper mode 'o' as this function is called after any modifications
+        * The User will contain the oper mode 'o' as this function is called after any modifications
         * are made to the user's structure by the core.
         * @param user The user who is opering up
         * @param opertype The opers type name
         */
-       virtual void OnOper(userrec* user, const std::string &opertype);
+       virtual void OnOper(User* user, const std::string &opertype);
 
        /** Called after a user opers locally.
         * This is identical to Module::OnOper(), except it is called after OnOper so that other modules
@@ -590,10 +590,10 @@ class CoreExport Module : public Extensible
         * @param user The user who is opering up
         * @param opertype The opers type name
         */
-       virtual void OnPostOper(userrec* user, const std::string &opertype);
+       virtual void OnPostOper(User* user, const std::string &opertype);
        
        /** Called whenever a user types /INFO.
-        * The userrec will contain the information of the user who typed the command. Modules may use this
+        * The User will contain the information of the user who typed the command. Modules may use this
         * method to output their own credits in /INFO (which is the ircd's version of an about box).
         * It is purposefully not possible to modify any info that has already been output, or halt the list.
         * You must write a 371 numeric to the user, containing your info in the following format:
@@ -602,7 +602,7 @@ class CoreExport Module : public Extensible
         *
         * @param user The user issuing /INFO
         */
-       virtual void OnInfo(userrec* user);
+       virtual void OnInfo(User* user);
        
        /** Called whenever a /WHOIS is performed on a local user.
         * The source parameter contains the details of the user who issued the WHOIS command, and
@@ -610,7 +610,7 @@ class CoreExport Module : public Extensible
         * @param source The user issuing the WHOIS command
         * @param dest The user who is being WHOISed
         */
-       virtual void OnWhois(userrec* source, userrec* dest);
+       virtual void OnWhois(User* source, User* dest);
        
        /** Called whenever a user is about to invite another user into a channel, before any processing is done.
         * Returning 1 from this function stops the process immediately, causing no
@@ -621,7 +621,7 @@ class CoreExport Module : public Extensible
         * @param channel The channel the user is being invited to
         * @return 1 to deny the invite, 0 to allow
         */
-       virtual int OnUserPreInvite(userrec* source,userrec* dest,chanrec* channel);
+       virtual int OnUserPreInvite(User* source,User* dest,Channel* channel);
        
        /** Called after a user has been successfully invited to a channel.
         * You cannot prevent the invite from occuring using this function, to do that,
@@ -630,17 +630,17 @@ class CoreExport Module : public Extensible
         * @param dest The user being invited
         * @param channel The channel the user is being invited to
         */
-       virtual void OnUserInvite(userrec* source,userrec* dest,chanrec* channel);
+       virtual void OnUserInvite(User* source,User* dest,Channel* channel);
        
        /** Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done.
         * Returning any nonzero value from this function stops the process immediately, causing no
         * output to be sent to the user by the core. If you do this you must produce your own numerics,
         * notices etc. This is useful for modules which may want to filter or redirect messages.
         * target_type can be one of TYPE_USER or TYPE_CHANNEL. If the target_type value is a user,
-        * you must cast dest to a userrec* otherwise you must cast it to a chanrec*, this is the details
+        * you must cast dest to a User* otherwise you must cast it to a Channel*, this is the details
         * of where the message is destined to be sent.
         * @param user The user sending the message
-        * @param dest The target of the message (chanrec* or userrec*)
+        * @param dest The target of the message (Channel* or User*)
         * @param target_type The type of target (TYPE_USER or TYPE_CHANNEL)
         * @param text Changeable text being sent by the user
         * @param status The status being used, e.g. PRIVMSG @#chan has status== '@', 0 to send to everyone.
@@ -648,20 +648,20 @@ class CoreExport Module : public Extensible
         * It will be ignored for private messages.
         * @return 1 to deny the NOTICE, 0 to allow it
         */
-       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);
 
        /** Called whenever a user is about to NOTICE A user or a channel, before any processing is done.
         * Returning any nonzero value from this function stops the process immediately, causing no
         * output to be sent to the user by the core. If you do this you must produce your own numerics,
         * notices etc. This is useful for modules which may want to filter or redirect messages.
         * target_type can be one of TYPE_USER or TYPE_CHANNEL. If the target_type value is a user,
-        * you must cast dest to a userrec* otherwise you must cast it to a chanrec*, this is the details
+        * you must cast dest to a User* otherwise you must cast it to a Channel*, this is the details
         * of where the message is destined to be sent.
         * You may alter the message text as you wish before relinquishing control to the next module
         * in the chain, and if no other modules block the text this altered form of the text will be sent out
         * to the user and possibly to other servers.
         * @param user The user sending the message
-        * @param dest The target of the message (chanrec* or userrec*)
+        * @param dest The target of the message (Channel* or User*)
         * @param target_type The type of target (TYPE_USER or TYPE_CHANNEL)
         * @param text Changeable text being sent by the user
         * @param status The status being used, e.g. PRIVMSG @#chan has status== '@', 0 to send to everyone.
@@ -669,7 +669,7 @@ class CoreExport Module : public Extensible
         * It will be ignored for private notices.
         * @return 1 to deny the NOTICE, 0 to allow it
         */
-       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);
 
        /** Called whenever the server wants to build the exemption list for a channel, but is not directly doing a PRIVMSG or NOTICE.
         * For example, the spanningtree protocol will call this event when passing a privmsg on (but not processing it directly).
@@ -680,11 +680,11 @@ class CoreExport Module : public Extensible
         * @param exempt_list The exempt list to be populated
         * @param text The original message text causing the exempt list to be built
         */
-       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);
        
        /** Called before any nickchange, local or remote. This can be used to implement Q-lines etc.
         * Please note that although you can see remote nickchanges through this function, you should
-        * NOT make any changes to the userrec if the user is a remote user as this may cause a desnyc.
+        * NOT make any changes to the User if the user is a remote user as this may cause a desnyc.
         * check user->server before taking any action (including returning nonzero from the method).
         * If your method returns nonzero, the nickchange is silently forbidden, and it is down to your
         * module to generate some meaninful output.
@@ -692,10 +692,10 @@ class CoreExport Module : public Extensible
         * @param newnick Their new nickname
         * @return 1 to deny the change, 0 to allow
         */
-       virtual int OnUserPreNick(userrec* user, const std::string &newnick);
+       virtual int OnUserPreNick(User* user, const std::string &newnick);
 
        /** Called after any PRIVMSG sent from a user.
-        * The dest variable contains a userrec* if target_type is TYPE_USER and a chanrec*
+        * The dest variable contains a User* if target_type is TYPE_USER and a Channel*
         * if target_type is TYPE_CHANNEL.
         * @param user The user sending the message
         * @param dest The target of the message
@@ -703,10 +703,10 @@ class CoreExport Module : public Extensible
         * @param text the text being sent by the user
         * @param status The status being used, e.g. PRIVMSG @#chan has status== '@', 0 to send to everyone.
         */
-       virtual void OnUserMessage(userrec* 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);
 
        /** Called after any NOTICE sent from a user.
-        * The dest variable contains a userrec* if target_type is TYPE_USER and a chanrec*
+        * The dest variable contains a User* if target_type is TYPE_USER and a Channel*
         * if target_type is TYPE_CHANNEL.
         * @param user The user sending the message
         * @param dest The target of the message
@@ -714,18 +714,18 @@ class CoreExport Module : public Extensible
         * @param text the text being sent by the user
         * @param status The status being used, e.g. NOTICE @#chan has status== '@', 0 to send to everyone.
         */
-       virtual void OnUserNotice(userrec* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list);
+       virtual void OnUserNotice(User* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list);
 
        /** Called after every MODE command sent from a user
-        * The dest variable contains a userrec* if target_type is TYPE_USER and a chanrec*
+        * The dest variable contains a User* if target_type is TYPE_USER and a Channel*
         * if target_type is TYPE_CHANNEL. The text variable contains the remainder of the
         * mode string after the target, e.g. "+wsi" or "+ooo nick1 nick2 nick3".
         * @param user The user sending the MODEs
-        * @param dest The target of the modes (userrec* or chanrec*)
+        * @param dest The target of the modes (User* or Channel*)
         * @param target_type The type of target (TYPE_USER or TYPE_CHANNEL)
         * @param text The actual modes and their parameters if any
         */
-       virtual void OnMode(userrec* user, void* dest, int target_type, const std::string &text);
+       virtual void OnMode(User* user, void* dest, int target_type, const std::string &text);
 
        /** Allows modules to alter or create server descriptions
         * Whenever a module requires a server description, for example for display in
@@ -749,7 +749,7 @@ class CoreExport Module : public Extensible
         * @param proto A pointer to the module handling network protocol
         * @param opaque An opaque pointer set by the protocol module, should not be modified!
         */
-       virtual void OnSyncUser(userrec* user, Module* proto, void* opaque);
+       virtual void OnSyncUser(User* user, Module* proto, void* opaque);
 
        /** Allows modules to synchronize data which relates to channels during a netburst.
         * When this function is called, it will be called from the module which implements
@@ -766,11 +766,11 @@ class CoreExport Module : public Extensible
         * @param proto A pointer to the module handling network protocol
         * @param opaque An opaque pointer set by the protocol module, should not be modified!
         */
-       virtual void OnSyncChannel(chanrec* chan, Module* proto, void* opaque);
+       virtual void OnSyncChannel(Channel* chan, Module* proto, void* opaque);
 
        /* Allows modules to syncronize metadata related to channels over the network during a netburst.
         * Whenever the linking module wants to send out data, but doesnt know what the data
-        * represents (e.g. it is Extensible metadata, added to a userrec or chanrec by a module) then
+        * represents (e.g. it is Extensible metadata, added to a User or Channel by a module) then
         * this method is called.You should use the ProtoSendMetaData function after you've
         * correctly decided how the data should be represented, to send the metadata on its way if it belongs
         * to your module. For a good example of how to use this method, see src/modules/m_swhois.cpp.
@@ -781,11 +781,11 @@ class CoreExport Module : public Extensible
         * @param displayable If this value is true, the data is going to be displayed to a user,
         * and not sent across the network. Use this to determine wether or not to show sensitive data.
         */
-       virtual void OnSyncChannelMetaData(chanrec* chan, Module* proto,void* opaque, const std::string &extname, bool displayable = false);
+       virtual void OnSyncChannelMetaData(Channel* chan, Module* proto,void* opaque, const std::string &extname, bool displayable = false);
 
        /* Allows modules to syncronize metadata related to users over the network during a netburst.
         * Whenever the linking module wants to send out data, but doesnt know what the data
-        * represents (e.g. it is Extensible metadata, added to a userrec or chanrec by a module) then
+        * represents (e.g. it is Extensible metadata, added to a User or Channel by a module) then
         * this method is called. You should use the ProtoSendMetaData function after you've
         * correctly decided how the data should be represented, to send the metadata on its way if
         * if it belongs to your module.
@@ -796,11 +796,11 @@ class CoreExport Module : public Extensible
         * @param displayable If this value is true, the data is going to be displayed to a user,
         * and not sent across the network. Use this to determine wether or not to show sensitive data.
         */
-       virtual void OnSyncUserMetaData(userrec* user, Module* proto,void* opaque, const std::string &extname, bool displayable = false);
+       virtual void OnSyncUserMetaData(User* user, Module* proto,void* opaque, const std::string &extname, bool displayable = false);
 
        /* Allows modules to syncronize metadata not related to users or channels, over the network during a netburst.
         * Whenever the linking module wants to send out data, but doesnt know what the data
-        * represents (e.g. it is Extensible metadata, added to a userrec or chanrec by a module) then
+        * represents (e.g. it is Extensible metadata, added to a User or Channel by a module) then
         * this method is called. You should use the ProtoSendMetaData function after you've
         * correctly decided how the data should be represented, to send the metadata on its way if
         * if it belongs to your module.
@@ -814,7 +814,7 @@ class CoreExport Module : public Extensible
        /** Allows module data, sent via ProtoSendMetaData, to be decoded again by a receiving module.
         * Please see src/modules/m_swhois.cpp for a working example of how to use this method call.
         * @param target_type The type of item to decode data for, TYPE_USER or TYPE_CHANNEL
-        * @param target The chanrec* or userrec* that data should be added to
+        * @param target The Channel* or User* that data should be added to
         * @param extname The extension name which is being sent
         * @param extdata The extension data, encoded at the other end by an identical module through OnSyncChannelMetaData or OnSyncUserMetaData
         */
@@ -830,7 +830,7 @@ class CoreExport Module : public Extensible
         *
         * @param opaque An opaque pointer set by the protocol module, should not be modified!
         * @param target_type The type of item to decode data for, TYPE_USER or TYPE_CHANNEL
-        * @param target The chanrec* or userrec* that modes should be sent for
+        * @param target The Channel* or User* that modes should be sent for
         * @param modeline The modes and parameters to be sent
         */
        virtual void ProtoSendMode(void* opaque, int target_type, void* target, const std::string &modeline);
@@ -845,7 +845,7 @@ class CoreExport Module : public Extensible
         * how to use this function.
         * @param opaque An opaque pointer set by the protocol module, should not be modified!
         * @param target_type The type of item to decode data for, TYPE_USER or TYPE_CHANNEL
-        * @param target The chanrec* or userrec* that metadata should be sent for
+        * @param target The Channel* or User* that metadata should be sent for
         * @param extname The extension name to send metadata for
         * @param extdata Encoded data for this extension name, which will be encoded at the oppsite end by an identical module using OnDecodeMetaData
         */
@@ -855,21 +855,21 @@ class CoreExport Module : public Extensible
         * @param user The user sending the WALLOPS
         * @param text The content of the WALLOPS message
         */
-       virtual void OnWallops(userrec* user, const std::string &text);
+       virtual void OnWallops(User* user, const std::string &text);
 
        /** Called whenever a user's hostname is changed.
         * This event triggers after the host has been set.
         * @param user The user whos host is being changed
         * @param newhost The new hostname being set
         */
-       virtual void OnChangeHost(userrec* user, const std::string &newhost);
+       virtual void OnChangeHost(User* user, const std::string &newhost);
 
        /** Called whenever a user's GECOS (realname) is changed.
         * This event triggers after the name has been set.
         * @param user The user who's GECOS is being changed
         * @param gecos The new GECOS being set on the user
         */
-       virtual void OnChangeName(userrec* user, const std::string &gecos);
+       virtual void OnChangeName(User* user, const std::string &gecos);
 
        /** Called whenever a gline is added by a local user.
         * This method is triggered after the line is added.
@@ -878,7 +878,7 @@ class CoreExport Module : public Extensible
         * @param reason The reason text to be displayed
         * @param hostmask The hostmask to add
         */
-       virtual void OnAddGLine(long duration, userrec* source, const std::string &reason, const std::string &hostmask);
+       virtual void OnAddGLine(long duration, User* source, const std::string &reason, const std::string &hostmask);
 
        /** Called whenever a zline is added by a local user.
         * This method is triggered after the line is added.
@@ -887,7 +887,7 @@ class CoreExport Module : public Extensible
         * @param reason The reason text to be displayed
         * @param ipmask The hostmask to add
         */
-       virtual void OnAddZLine(long duration, userrec* source, const std::string &reason, const std::string &ipmask);
+       virtual void OnAddZLine(long duration, User* source, const std::string &reason, const std::string &ipmask);
 
        /** Called whenever a kline is added by a local user.
         * This method is triggered after the line is added.
@@ -896,7 +896,7 @@ class CoreExport Module : public Extensible
         * @param reason The reason text to be displayed
         * @param hostmask The hostmask to add
         */
-       virtual void OnAddKLine(long duration, userrec* source, const std::string &reason, const std::string &hostmask);
+       virtual void OnAddKLine(long duration, User* source, const std::string &reason, const std::string &hostmask);
 
        /** Called whenever a qline is added by a local user.
         * This method is triggered after the line is added.
@@ -905,7 +905,7 @@ class CoreExport Module : public Extensible
         * @param reason The reason text to be displayed
         * @param nickmask The hostmask to add
         */
-       virtual void OnAddQLine(long duration, userrec* source, const std::string &reason, const std::string &nickmask);
+       virtual void OnAddQLine(long duration, User* source, const std::string &reason, const std::string &nickmask);
 
        /** Called whenever a eline is added by a local user.
         * This method is triggered after the line is added.
@@ -914,49 +914,49 @@ class CoreExport Module : public Extensible
         * @param reason The reason text to be displayed
         * @param hostmask The hostmask to add
         */
-       virtual void OnAddELine(long duration, userrec* source, const std::string &reason, const std::string &hostmask);
+       virtual void OnAddELine(long duration, User* source, const std::string &reason, const std::string &hostmask);
 
        /** Called whenever a gline is deleted.
         * This method is triggered after the line is deleted.
         * @param source The user removing the line
         * @param hostmask The hostmask to delete
         */
-       virtual void OnDelGLine(userrec* source, const std::string &hostmask);
+       virtual void OnDelGLine(User* source, const std::string &hostmask);
 
        /** Called whenever a zline is deleted.
         * This method is triggered after the line is deleted.
         * @param source The user removing the line
         * @param hostmask The hostmask to delete
         */
-       virtual void OnDelZLine(userrec* source, const std::string &ipmask);
+       virtual void OnDelZLine(User* source, const std::string &ipmask);
 
        /** Called whenever a kline is deleted.
         * This method is triggered after the line is deleted.
         * @param source The user removing the line
         * @param hostmask The hostmask to delete
         */
-       virtual void OnDelKLine(userrec* source, const std::string &hostmask);
+       virtual void OnDelKLine(User* source, const std::string &hostmask);
        
        /** Called whenever a qline is deleted.
         * This method is triggered after the line is deleted.
         * @param source The user removing the line
         * @param hostmask The hostmask to delete
         */
-       virtual void OnDelQLine(userrec* source, const std::string &nickmask);
+       virtual void OnDelQLine(User* source, const std::string &nickmask);
 
        /** Called whenever a eline is deleted.
         * This method is triggered after the line is deleted.
         * @param source The user removing the line
         * @param hostmask The hostmask to delete
         */
-       virtual void OnDelELine(userrec* source, const std::string &hostmask);
+       virtual void OnDelELine(User* source, const std::string &hostmask);
 
        /** Called before your module is unloaded to clean up Extensibles.
         * This method is called once for every user and channel on the network,
         * so that when your module unloads it may clear up any remaining data
         * in the form of Extensibles added using Extensible::Extend().
         * If the target_type variable is TYPE_USER, then void* item refers to
-        * a userrec*, otherwise it refers to a chanrec*.
+        * a User*, otherwise it refers to a Channel*.
         * @param target_type The type of item being cleaned
         * @param item A pointer to the item's class
         */
@@ -964,14 +964,14 @@ class CoreExport Module : public Extensible
 
        /** Called after any nickchange, local or remote. This can be used to track users after nickchanges
         * have been applied. Please note that although you can see remote nickchanges through this function, you should
-        * NOT make any changes to the userrec if the user is a remote user as this may cause a desnyc.
+        * NOT make any changes to the User if the user is a remote user as this may cause a desnyc.
         * check user->server before taking any action (including returning nonzero from the method).
         * Because this method is called after the nickchange is taken place, no return values are possible
         * to indicate forbidding of the nick change. Use OnUserPreNick for this.
         * @param user The user changing their nick
         * @param oldnick The old nickname of the user before the nickchange
         */
-       virtual void OnUserPostNick(userrec* user, const std::string &oldnick);
+       virtual void OnUserPostNick(User* user, const std::string &oldnick);
 
        /** Called before an action which requires a channel privilage check.
         * This function is called before many functions which check a users status on a channel, for example
@@ -998,7 +998,7 @@ class CoreExport Module : public Extensible
         * @param channel The channel which is being checked
         * @param access_type See above
         */
-       virtual int OnAccessCheck(userrec* source,userrec* dest,chanrec* channel,int access_type);
+       virtual int OnAccessCheck(User* source,User* dest,Channel* channel,int access_type);
 
        /** Called when a 005 numeric is about to be output.
         * The module should modify the 005 numeric if needed to indicate its features.
@@ -1019,14 +1019,14 @@ class CoreExport Module : public Extensible
         * @param reason The kill reason
         * @return 1 to prevent the kill, 0 to allow
         */
-       virtual int OnKill(userrec* source, userrec* dest, const std::string &reason);
+       virtual int OnKill(User* source, User* dest, const std::string &reason);
 
        /** Called when an oper wants to disconnect a remote user via KILL
         * @param source The user sending the KILL
         * @param dest The user being killed
         * @param reason The kill reason
         */
-       virtual void OnRemoteKill(userrec* source, userrec* dest, const std::string &reason, const std::string &operreason);
+       virtual void OnRemoteKill(User* source, User* dest, const std::string &reason, const std::string &operreason);
 
        /** Called whenever a module is loaded.
         * mod will contain a pointer to the module, and string will contain its name,
@@ -1081,7 +1081,7 @@ class CoreExport Module : public Extensible
         * @param original_line The entire original line as passed to the parser from the user
         * @return 1 to block the command, 0 to allow
         */
-       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);
 
        /** Called after any command has been executed.
         * This event occurs for all registered commands, wether they are registered in the core,
@@ -1095,7 +1095,7 @@ class CoreExport Module : public Extensible
         * @param result The return code given by the command handler, one of CMD_SUCCESS or CMD_FAILURE
         * @param original_line The entire original line as passed to the parser from the user
         */
-       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);
 
        /** Called to check if a user who is connecting can now be allowed to register
         * If any modules return false for this function, the user is held in the waiting
@@ -1107,7 +1107,7 @@ class CoreExport Module : public Extensible
         * @param user The user to check
         * @return true to indicate readiness, false if otherwise
         */
-       virtual bool OnCheckReady(userrec* user);
+       virtual bool OnCheckReady(User* user);
 
        /** Called whenever a user is about to register their connection (e.g. before the user
         * is sent the MOTD etc). Modules can use this method if they are performing a function
@@ -1118,7 +1118,7 @@ class CoreExport Module : public Extensible
         * @param user The user registering
         * @return 1 to indicate user quit, 0 to continue
         */
-       virtual int OnUserRegister(userrec* user);
+       virtual int OnUserRegister(User* user);
 
        /** Called whenever a user joins a channel, to determine if invite checks should go ahead or not.
         * This method will always be called for each join, wether or not the channel is actually +i, and
@@ -1128,7 +1128,7 @@ class CoreExport Module : public Extensible
         * @param chan The channel being joined
         * @return 1 to explicitly allow the join, 0 to proceed as normal
         */
-       virtual int OnCheckInvite(userrec* user, chanrec* chan);
+       virtual int OnCheckInvite(User* user, Channel* chan);
 
        /** Called whenever a user joins a channel, to determine if key checks should go ahead or not.
         * This method will always be called for each join, wether or not the channel is actually +k, and
@@ -1139,7 +1139,7 @@ class CoreExport Module : public Extensible
         * @param chan The channel being joined
         * @return 1 to explicitly allow the join, 0 to proceed as normal
         */
-       virtual int OnCheckKey(userrec* user, chanrec* chan, const std::string &keygiven);
+       virtual int OnCheckKey(User* user, Channel* chan, const std::string &keygiven);
 
        /** Called whenever a user joins a channel, to determine if channel limit checks should go ahead or not.
         * This method will always be called for each join, wether or not the channel is actually +l, and
@@ -1149,7 +1149,7 @@ class CoreExport Module : public Extensible
         * @param chan The channel being joined
         * @return 1 to explicitly allow the join, 0 to proceed as normal
         */
-       virtual int OnCheckLimit(userrec* user, chanrec* chan);
+       virtual int OnCheckLimit(User* user, Channel* chan);
 
        /** Called whenever a user joins a channel, to determine if banlist checks should go ahead or not.
         * This method will always be called for each join, wether or not the user actually matches a channel ban, and
@@ -1159,7 +1159,7 @@ class CoreExport Module : public Extensible
         * @param chan The channel being joined
         * @return 1 to explicitly allow the join, 0 to proceed as normal
         */
-       virtual int OnCheckBan(userrec* user, chanrec* chan);
+       virtual int OnCheckBan(User* user, Channel* chan);
 
        /** Called on all /STATS commands
         * This method is triggered for all /STATS use, including stats symbols handled by the core.
@@ -1170,7 +1170,7 @@ class CoreExport Module : public Extensible
         * work when remote STATS queries are received.
         * @return 1 to block the /STATS from being processed by the core, 0 to allow it
         */
-       virtual int OnStats(char symbol, userrec* user, string_list &results);
+       virtual int OnStats(char symbol, User* user, string_list &results);
 
        /** Called whenever a change of a local users displayed host is attempted.
         * Return 1 to deny the host change, or 0 to allow it.
@@ -1178,7 +1178,7 @@ class CoreExport Module : public Extensible
         * @param newhost The new hostname
         * @return 1 to deny the host change, 0 to allow
         */
-       virtual int OnChangeLocalUserHost(userrec* user, const std::string &newhost);
+       virtual int OnChangeLocalUserHost(User* user, const std::string &newhost);
 
        /** Called whenever a change of a local users GECOS (fullname field) is attempted.
         * return 1 to deny the name change, or 0 to allow it.
@@ -1186,7 +1186,7 @@ class CoreExport Module : public Extensible
         * @param newhost The new GECOS
         * @return 1 to deny the GECOS change, 0 to allow
         */
-       virtual int OnChangeLocalUserGECOS(userrec* user, const std::string &newhost); 
+       virtual int OnChangeLocalUserGECOS(User* user, const std::string &newhost); 
 
        /** Called whenever a topic is changed by a local user.
         * Return 1 to deny the topic change, or 0 to allow it.
@@ -1195,7 +1195,7 @@ class CoreExport Module : public Extensible
         * @param topic The actual topic text
         * @param 1 to block the topic change, 0 to allow
         */
-       virtual int OnLocalTopicChange(userrec* user, chanrec* chan, const std::string &topic);
+       virtual int OnLocalTopicChange(User* user, Channel* chan, const std::string &topic);
 
        /** Called whenever a local topic has been changed.
         * To block topic changes you must use OnLocalTopicChange instead.
@@ -1203,7 +1203,7 @@ class CoreExport Module : public Extensible
         * @param chan The channels who's topic is being changed
         * @param topic The actual topic text
         */
-       virtual void OnPostLocalTopicChange(userrec* user, chanrec* chan, const std::string &topic);
+       virtual void OnPostLocalTopicChange(User* user, Channel* chan, const std::string &topic);
 
        /** Called whenever an Event class is sent to all module by another module.
         * Please see the documentation of Event::Send() for further information. The Event sent can
@@ -1240,7 +1240,7 @@ class CoreExport Module : public Extensible
         * servermodes out to reverse mode changes.
         * @param user The user who is opering
         */
-       virtual void OnGlobalOper(userrec* user);
+       virtual void OnGlobalOper(User* user);
 
        /** Called after a user has fully connected and all modules have executed OnUserConnect
         * This event is informational only. You should not change any user information in this
@@ -1248,7 +1248,7 @@ class CoreExport Module : public Extensible
         * This is called for both local and remote users.
         * @param user The user who is connecting
         */
-       virtual void OnPostConnect(userrec* user);
+       virtual void OnPostConnect(User* user);
 
        /** Called whenever a ban is added to a channel's list.
         * Return a non-zero value to 'eat' the mode change and prevent the ban from being added.
@@ -1257,7 +1257,7 @@ class CoreExport Module : public Extensible
         * @param banmask The ban mask being added
         * @return 1 to block the ban, 0 to continue as normal
         */
-       virtual int OnAddBan(userrec* source, chanrec* channel,const std::string &banmask);
+       virtual int OnAddBan(User* source, Channel* channel,const std::string &banmask);
 
        /** Called whenever a ban is removed from a channel's list.
         * Return a non-zero value to 'eat' the mode change and prevent the ban from being removed.
@@ -1266,7 +1266,7 @@ class CoreExport Module : public Extensible
         * @param banmask The ban mask being deleted
         * @return 1 to block the unban, 0 to continue as normal
         */
-       virtual int OnDelBan(userrec* source, chanrec* channel,const std::string &banmask);
+       virtual int OnDelBan(User* source, Channel* channel,const std::string &banmask);
 
        /** Called immediately after any  connection is accepted. This is intended for raw socket
         * processing (e.g. modules which wrap the tcp connection within another library) and provides
@@ -1322,15 +1322,15 @@ class CoreExport Module : public Extensible
 
        /** Called whenever a user sets away.
         * This method has no parameter for the away message, as it is available in the
-        * user record as userrec::awaymsg.
+        * user record as User::awaymsg.
         * @param user The user setting away
         */
-       virtual void OnSetAway(userrec* user);
+       virtual void OnSetAway(User* user);
 
        /** Called when a user cancels their away state.
         * @param user The user returning from away
         */
-       virtual void OnCancelAway(userrec* user);
+       virtual void OnCancelAway(User* user);
 
        /** Called whenever a NAMES list is requested.
         * You can produce the nameslist yourself, overriding the current list,
@@ -1343,12 +1343,12 @@ class CoreExport Module : public Extensible
         * point the pointer at your copy)
         * @return 1 to prevent the user list being sent to the client, 0 to allow it
         */
-       virtual int OnUserList(userrec* user, chanrec* Ptr, CUList* &userlist);
+       virtual int OnUserList(User* user, Channel* Ptr, CUList* &userlist);
 
        /** Called whenever a line of WHOIS output is sent to a user.
         * You may change the numeric and the text of the output by changing
         * the values numeric and text, but you cannot change the user the
-        * numeric is sent to. You may however change the user's userrec values.
+        * numeric is sent to. You may however change the user's User values.
         * @param user The user the numeric is being sent to
         * @param dest The user being WHOISed
         * @param numeric The numeric of the line being sent
@@ -1356,7 +1356,7 @@ class CoreExport Module : public Extensible
         * @return nonzero to drop the line completely so that the user does not
         * receive it, or zero to allow the line to be sent.
         */
-       virtual int OnWhoisLine(userrec* user, userrec* dest, int &numeric, std::string &text);
+       virtual int OnWhoisLine(User* user, User* dest, int &numeric, std::string &text);
 
        /** Called at intervals for modules to garbage-collect any hashes etc.
         * Certain data types such as hash_map 'leak' buckets, which must be
@@ -1372,7 +1372,7 @@ class CoreExport Module : public Extensible
         * data which is being spooled in a controlled manner, e.g. LIST lines.
         * @param user The user who's buffer is now empty.
         */
-       virtual void OnBufferFlushed(userrec* user);
+       virtual void OnBufferFlushed(User* user);
 };
 
 
@@ -1496,7 +1496,7 @@ class CoreExport ConfigReader : public classbase
         * if bool is false AND user is false, the error report will be spooled to all opers
         * by means of a NOTICE to all opers.
         */
-       void DumpErrors(bool bail,userrec* user);
+       void DumpErrors(bool bail,User* user);
 
        /** Returns the number of items within a tag.
         * For example if the tag was &lt;test tag="blah" data="foo"&gt; then this
index 861acc1f10c8fb8e5b9d04c508f65dea5e4af369..832523ba719d125f6b71402fb17bf6afbe9e145d 100644 (file)
@@ -141,7 +141,7 @@ namespace irc
 }
 
 /** This class handles incoming connections on client ports.
- * It will create a new userrec for every valid connection
+ * It will create a new User for every valid connection
  * and assign it a file descriptor.
  */
 class CoreExport ListenSocket : public EventHandler
index f101e161557a388edb3ab8aaba4a9cc54bdc974e..359db50f5098fd8d52c392783e895052d7e8b4be 100644 (file)
 #ifndef WIN32
 /** User hash (POSIX systems with GCC)
  */
-typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> user_hash;
+typedef nspace::hash_map<std::string, User*, nspace::hash<string>, irc::StrHashComp> user_hash;
 /** Channel hash (POSIX systems with GCC)
  */
-typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp> chan_hash;
+typedef nspace::hash_map<std::string, Channel*, nspace::hash<string>, irc::StrHashComp> chan_hash;
 #else
 /** User hash (windows systems with visual studio)
  */
-typedef nspace::hash_map<std::string, userrec*, nspace::hash_compare<string, less<string> > > user_hash;
+typedef nspace::hash_map<std::string, User*, nspace::hash_compare<string, less<string> > > user_hash;
 /** Channel hash (windows systems with visual studio)
  */
-typedef nspace::hash_map<std::string, chanrec*, nspace::hash_compare<string, less<string> > > chan_hash;
+typedef nspace::hash_map<std::string, Channel*, nspace::hash_compare<string, less<string> > > chan_hash;
 #endif
 
 /** Server name cache
index 6b4fba8893b800547d0e8cff9f6494964c223d25..9d78fe64b568d792a89dd3342aea9f53a37e4611 100644 (file)
@@ -64,8 +64,8 @@ typedef std::vector<ListLimit> limitlist;
 class ListModeRequest : public Request
 {
  public:
-       userrec* user;
-       chanrec* chan;
+       User* user;
+       Channel* chan;
 
        /** Check if a user is on a channel's list.
         * The Event::Send() event returns true if the user is on the channel's list.
@@ -74,7 +74,7 @@ class ListModeRequest : public Request
         * @param u User to check against
         * @param c Channel to check against
         */
-       ListModeRequest(Module* sender, Module* target, userrec* u, chanrec* c) : Request(sender, target, "LM_CHECKLIST"), user(u), chan(c)
+       ListModeRequest(Module* sender, Module* target, User* u, Channel* c) : Request(sender, target, "LM_CHECKLIST"), user(u), chan(c)
        {
        }
 
@@ -132,7 +132,7 @@ class ListModeBase : public ModeHandler
 
        /** See mode.h 
         */
-       std::pair<bool,std::string> ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter)
+       std::pair<bool,std::string> ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter)
        {
                modelist* el;
                channel->GetExt(infokey, el);
@@ -153,7 +153,7 @@ class ListModeBase : public ModeHandler
         * @param user The user to send the list to
         * @param channel The channel the user is requesting the list for
         */
-       virtual void DisplayList(userrec* user, chanrec* channel)
+       virtual void DisplayList(User* user, Channel* channel)
        {
                modelist* el;
                channel->GetExt(infokey, el);
@@ -167,7 +167,7 @@ class ListModeBase : public ModeHandler
                user->WriteServ("%s %s %s :%s", endoflistnumeric.c_str(), user->nick, channel->name, endofliststring.c_str());
        }
 
-       virtual void DisplayEmptyList(userrec* user, chanrec* channel)
+       virtual void DisplayEmptyList(User* user, Channel* channel)
        {
                user->WriteServ("%s %s %s :%s", endoflistnumeric.c_str(), user->nick, channel->name, endofliststring.c_str());
        }
@@ -176,7 +176,7 @@ class ListModeBase : public ModeHandler
         * See mode.h
         * @param channel The channel to remove all instances of the mode from
         */
-       virtual void RemoveMode(chanrec* channel)
+       virtual void RemoveMode(Channel* channel)
        {
                modelist* el;
                channel->GetExt(infokey, el);
@@ -206,7 +206,7 @@ class ListModeBase : public ModeHandler
 
        /** See mode.h
         */
-       virtual void RemoveMode(userrec* user)
+       virtual void RemoveMode(User* user)
        {
                /* Listmodes dont get set on users */
        }
@@ -248,7 +248,7 @@ class ListModeBase : public ModeHandler
        /** Handle the list mode.
         * See mode.h
         */
-       virtual ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+       virtual ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
        {
                // Try and grab the list
                modelist* el;
@@ -375,7 +375,7 @@ class ListModeBase : public ModeHandler
         * See modules.h.
         * @param chan Channel being deleted
         */
-       virtual void DoChannelDelete(chanrec* chan)
+       virtual void DoChannelDelete(Channel* chan)
        {
                modelist* list;
                chan->GetExt(infokey, list);
@@ -393,7 +393,7 @@ class ListModeBase : public ModeHandler
         * @param proto Protocol module pointer
         * @param opaque Opaque connection handle
         */
-       virtual void DoSyncChannel(chanrec* chan, Module* proto, void* opaque)
+       virtual void DoSyncChannel(Channel* chan, Module* proto, void* opaque)
        {
                modelist* list;
                chan->GetExt(infokey, list);
@@ -429,7 +429,7 @@ class ListModeBase : public ModeHandler
         * @param parameter The actual parameter being added
         * @return true if the parameter is valid
         */
-       virtual bool ValidateParam(userrec* source, chanrec* channel, std::string &parameter)
+       virtual bool ValidateParam(User* source, Channel* channel, std::string &parameter)
        {
                return true;
        }
@@ -441,7 +441,7 @@ class ListModeBase : public ModeHandler
         * @param parameter The actual parameter being added
         * @return Ignored
         */
-       virtual bool TellListTooLong(userrec* source, chanrec* channel, std::string &parameter)
+       virtual bool TellListTooLong(User* source, Channel* channel, std::string &parameter)
        {
                return false;
        }
@@ -452,7 +452,7 @@ class ListModeBase : public ModeHandler
         * @param channel Channel the parameter is being added to
         * @param parameter The actual parameter being added
         */
-       virtual void TellAlreadyOnList(userrec* source, chanrec* channel, std::string &parameter)
+       virtual void TellAlreadyOnList(User* source, Channel* channel, std::string &parameter)
        {
        }
        
@@ -462,7 +462,7 @@ class ListModeBase : public ModeHandler
         * @param channel Channel the parameter is being removed from
         * @param parameter The actual parameter being removed
         */
-       virtual void TellNotSet(userrec* source, chanrec* channel, std::string &parameter)
+       virtual void TellNotSet(User* source, Channel* channel, std::string &parameter)
        {
        }
 };
index 28bc895a5bfd94e9fc844209174010a40306a924..915a23c0d8967c0738885423928116ad418e392a 100644 (file)
@@ -85,7 +85,7 @@ class CoreExport UserResolver : public Resolver
  private:
        /** User this class is 'attached' to.
         */
-       userrec* bound_user;
+       User* bound_user;
        /** File descriptor teh lookup is bound to
         */
        int bound_fd;
@@ -100,7 +100,7 @@ class CoreExport UserResolver : public Resolver
         * @param qt The query type
         * @param cache Modified by the constructor if the result was cached
         */
-       UserResolver(InspIRCd* Instance, userrec* user, std::string to_resolve, QueryType qt, bool &cache);
+       UserResolver(InspIRCd* Instance, User* user, std::string to_resolve, QueryType qt, bool &cache);
 
        /** Called on successful lookup
         * @param result Result string
@@ -395,7 +395,7 @@ typedef std::vector<ConnectClass> ClassVector;
 
 /** Typedef for the list of user-channel records for a user
  */
-typedef std::map<chanrec*, char> UserChanList;
+typedef std::map<Channel*, char> UserChanList;
 
 /** Shorthand for an iterator into a UserChanList
  */
@@ -403,10 +403,10 @@ typedef UserChanList::iterator UCListIter;
 
 /* Required forward declaration
  */
-class userrec;
+class User;
 
 /** Visibility data for a user.
- * If a user has a non-null instance of this class in their userrec,
+ * If a user has a non-null instance of this class in their User,
  * then it is used to determine if this user is visible to other users
  * or not.
  */
@@ -423,7 +423,7 @@ class CoreExport VisData
         * @param user The other user to compare to
         * @return true True if the user is visible to the other user, false if not
         */
-       virtual bool VisibleTo(userrec* user);
+       virtual bool VisibleTo(User* user);
 };
 
 /** Holds all information about a user
@@ -433,12 +433,12 @@ class CoreExport VisData
  * by nickname, or the FindDescriptor method of the InspIRCd class to find a specific user by their
  * file descriptor value.
  */
-class CoreExport userrec : public connection
+class CoreExport User : public connection
 {
  private:
        /** Pointer to creator.
         * This is required to make use of core functions
-        * from within the userrec class.
+        * from within the User class.
         */
        InspIRCd* ServerInstance;
 
@@ -485,14 +485,14 @@ class CoreExport userrec : public connection
  public:
        /** Resolvers for looking up this users IP address
         * This will occur if and when res_reverse completes.
-        * When this class completes its lookup, userrec::dns_done
+        * When this class completes its lookup, User::dns_done
         * will be set from false to true.
         */
        UserResolver* res_forward;
 
        /** Resolvers for looking up this users hostname
-        * This is instantiated by userrec::StartDNSLookup(),
-        * and on success, instantiates userrec::res_reverse.
+        * This is instantiated by User::StartDNSLookup(),
+        * and on success, instantiates User::res_reverse.
         */
        UserResolver* res_reverse;
 
@@ -506,7 +506,7 @@ class CoreExport userrec : public connection
 
        /** Starts a DNS lookup of the user's IP.
         * This will cause two UserResolver classes to be instantiated.
-        * When complete, these objects set userrec::dns_done to true.
+        * When complete, these objects set User::dns_done to true.
         */
        void StartDNSLookup();
 
@@ -529,7 +529,7 @@ class CoreExport userrec : public connection
        char ident[IDENTMAX+2];
 
        /** The host displayed to non-opers (used for cloaking etc).
-        * This usually matches the value of userrec::host.
+        * This usually matches the value of User::host.
         */
        char dhost[65];
 
@@ -542,7 +542,7 @@ class CoreExport userrec : public connection
         * this is an array of values in a similar way to channel modes.
         * A value of 1 in field (modeletter-65) indicates that the mode is
         * set, for example, to work out if mode +s is set, we  check the field
-        * userrec::modes['s'-65] != 0.
+        * User::modes['s'-65] != 0.
         * The following RFC characters o, w, s, i have constants defined via an
         * enum, such as UM_SERVERNOTICE and UM_OPETATOR.
         */
@@ -692,7 +692,7 @@ class CoreExport userrec : public connection
         * @param Instance Creator instance
         * @param uid User UUID, or empty to allocate one automatically
         */
-       userrec(InspIRCd* Instance, const std::string &uid = "");
+       User(InspIRCd* Instance, const std::string &uid = "");
 
        /** Returns the full displayed host of the user
         * This member function returns the hostname of the user as seen by other users
@@ -775,7 +775,7 @@ class CoreExport userrec : public connection
        virtual void RemoveInvite(const irc::string &channel);
 
        /** Returns true or false for if a user can execute a privilaged oper command.
-        * This is done by looking up their oper type from userrec::oper, then referencing
+        * This is done by looking up their oper type from User::oper, then referencing
         * this to their oper classes and checking the commands they can execute.
         * @param command A command (should be all CAPS)
         * @return True if this user can execute the command
@@ -885,7 +885,7 @@ class CoreExport userrec : public connection
         * @param oreason The quit reason to show to opers
         * @return Although this function has no return type, on exit the user provided will no longer exist.
         */
-       static void QuitUser(InspIRCd* Instance, userrec *user, const std::string &r, const char* oreason = "");
+       static void QuitUser(InspIRCd* Instance, User *user, const std::string &r, const char* oreason = "");
 
        /** Add the user to WHOWAS system
         */
@@ -910,9 +910,9 @@ class CoreExport userrec : public connection
         * You should not call this function directly. It is used by the core
         * to update the users hash entry on a nickchange.
         * @param New new user_hash key
-        * @return Pointer to userrec in hash (usually 'this')
+        * @return Pointer to User in hash (usually 'this')
         */
-       userrec* UpdateNickHash(const char* New);
+       User* UpdateNickHash(const char* New);
 
        /** Force a nickname change.
         * If the nickname change fails (for example, because the nick in question
@@ -924,7 +924,7 @@ class CoreExport userrec : public connection
        bool ForceNickChange(const char* newnick);
 
        /** Add a client to the system.
-        * This will create a new userrec, insert it into the user_hash,
+        * This will create a new User, insert it into the user_hash,
         * initialize it as not yet registered, and add it to the socket engine.
         * @param Instance a pointer to the server instance
         * @param socket The socket id (file descriptor) this user is on
@@ -952,7 +952,7 @@ class CoreExport userrec : public connection
 
        /** Remove all clone counts from the user, you should
         * use this if you change the user's IP address in
-        * userrec::ip after they have registered.
+        * User::ip after they have registered.
         */
        void RemoveCloneCounts();
 
@@ -982,27 +982,27 @@ class CoreExport userrec : public connection
         * @param user The user to prepend the :nick!user@host of
         * @param text A std::string to send to the user
         */
-       void WriteFrom(userrec *user, const std::string &text);
+       void WriteFrom(User *user, const std::string &text);
 
        /** Write text to this user, appending CR/LF and prepending :nick!user@host of the user provided in the first parameter.
         * @param user The user to prepend the :nick!user@host of
         * @param text The format string for text to send to the user
         * @param ... POD-type format arguments
         */
-       void WriteFrom(userrec *user, const char* text, ...);
+       void WriteFrom(User *user, const char* text, ...);
 
        /** Write text to the user provided in the first parameter, appending CR/LF, and prepending THIS user's :nick!user@host.
         * @param dest The user to route the message to
         * @param text A std::string to send to the user
         */
-       void WriteTo(userrec *dest, const std::string &data);
+       void WriteTo(User *dest, const std::string &data);
 
        /** Write text to the user provided in the first parameter, appending CR/LF, and prepending THIS user's :nick!user@host.
         * @param dest The user to route the message to
         * @param text The format string for text to send to the user
         * @param ... POD-type format arguments
         */
-       void WriteTo(userrec *dest, const char *data, ...);
+       void WriteTo(User *dest, const char *data, ...);
 
        /** Write to all users that can see this user (including this user in the list), appending CR/LF
         * @param text A std::string to send to the users
@@ -1026,7 +1026,7 @@ class CoreExport userrec : public connection
         */
        void WriteCommonExcept(const std::string &text);
 
-       /** Write a quit message to all common users, as in userrec::WriteCommonExcept but with a specific
+       /** Write a quit message to all common users, as in User::WriteCommonExcept but with a specific
         * quit message for opers only.
         * @param normal_text Normal user quit message
         * @param oper_text Oper only quit message
@@ -1050,10 +1050,10 @@ class CoreExport userrec : public connection
         * @param other The other user to compare the channel list against
         * @return True if the given user shares at least one channel with this user
         */
-       bool SharesChannelWith(userrec *other);
+       bool SharesChannelWith(User *other);
 
        /** Change the displayed host of a user.
-        * ALWAYS use this function, rather than writing userrec::dhost directly,
+        * ALWAYS use this function, rather than writing User::dhost directly,
         * as this triggers module events allowing the change to be syncronized to
         * remote servers. This will also emulate a QUIT and rejoin (where configured)
         * before setting their host field.
@@ -1063,7 +1063,7 @@ class CoreExport userrec : public connection
        bool ChangeDisplayedHost(const char* host);
 
        /** Change the ident (username) of a user.
-        * ALWAYS use this function, rather than writing userrec::ident directly,
+        * ALWAYS use this function, rather than writing User::ident directly,
         * as this correctly causes the user to seem to quit (where configured)
         * before setting their ident field.
         * @param host The new ident to set
@@ -1072,7 +1072,7 @@ class CoreExport userrec : public connection
        bool ChangeIdent(const char* newident);
 
        /** Change a users realname field.
-        * ALWAYS use this function, rather than writing userrec::fullname directly,
+        * ALWAYS use this function, rather than writing User::fullname directly,
         * as this triggers module events allowing the change to be syncronized to
         * remote servers.
         * @param gecos The user's new realname
@@ -1095,14 +1095,14 @@ class CoreExport userrec : public connection
         * @param The user to send the channel list to if it is not too long
         * @return This user's channel list
         */
-       std::string ChannelList(userrec* source);
+       std::string ChannelList(User* source);
 
        /** Split the channel list in cl which came from dest, and spool it to this user
         * Used internally by WHOIS
         * @param dest The user the original channel list came from
-        * @param cl The  channel list as a string obtained from userrec::ChannelList()
+        * @param cl The  channel list as a string obtained from User::ChannelList()
         */
-       void SplitChanList(userrec* dest, const std::string &cl);
+       void SplitChanList(User* dest, const std::string &cl);
 
        /** Remove this user from all channels they are on, and delete any that are now empty.
         * This is used by QUIT, and will not send part messages!
@@ -1142,7 +1142,7 @@ class CoreExport userrec : public connection
 
        /** Default destructor
         */
-       virtual ~userrec();
+       virtual ~User();
 };
 
 /* Configuration callbacks */
index bb59a97355bd2acea87cc74fe3d38680ccd5450d..5853e13c4ef47fc2000b06c63b1154e355485a86 100644 (file)
@@ -440,7 +440,7 @@ class CoreExport XLineManager
         * @param user The user to check against
         * @return The reason for the line if there is a match, or NULL if there is no match
         */
-       GLine* matches_gline(userrec* user, bool permonly = false);
+       GLine* matches_gline(User* user, bool permonly = false);
 
        /** Check if a IP matches a ZLine
         * @param ipaddr The IP to check against
@@ -452,13 +452,13 @@ class CoreExport XLineManager
         * @param user The user to check against
         * @return The reason for the line if there is a match, or NULL if there is no match
         */
-       KLine* matches_kline(userrec* user, bool permonly = false);
+       KLine* matches_kline(User* user, bool permonly = false);
 
        /** Check if a hostname matches a ELine
         * @param user The user to check against
         * @return The reason for the line if there is a match, or NULL if there is no match
         */
-       ELine* matches_exception(userrec* user, bool permonly = false);
+       ELine* matches_exception(User* user, bool permonly = false);
 
        /** Expire any pending non-permenant lines
         */
@@ -475,31 +475,31 @@ class CoreExport XLineManager
         * @param user The username making the query
         * @param results The string_list to receive the results
         */
-       void stats_k(userrec* user, string_list &results);
+       void stats_k(User* user, string_list &results);
 
        /** Handle /STATS G
         * @param user The username making the query
         * @param results The string_list to receive the results
         */
-       void stats_g(userrec* user, string_list &results);
+       void stats_g(User* user, string_list &results);
 
        /** Handle /STATS Q
         * @param user The username making the query
         * @param results The string_list to receive the results
         */
-       void stats_q(userrec* user, string_list &results);
+       void stats_q(User* user, string_list &results);
 
        /** Handle /STATS Z
         * @param user The username making the query
         * @param results The string_list to receive the results
         */
-       void stats_z(userrec* user, string_list &results);
+       void stats_z(User* user, string_list &results);
 
        /** Handle /STATS E
         * @param user The username making the query
         * @param results The string_list to receive the results
         */
-       void stats_e(userrec* user, string_list &results);
+       void stats_e(User* user, string_list &results);
 
        /** Change creation time of a GLine
         * @param host The hostname to change
index 5169fbf6372161a77b83541393fe0a05d14ac519..8f0d2d744bf0f5ceba8872aa4b59baafb4c66359 100644 (file)
@@ -16,7 +16,7 @@
 #include "wildcard.h"
 #include "mode.h"
 
-chanrec::chanrec(InspIRCd* Instance) : ServerInstance(Instance)
+Channel::Channel(InspIRCd* Instance) : ServerInstance(Instance)
 {
        *name = *topic = *setby = *key = 0;
        maxbans = created = topicset = limit = 0;
@@ -24,7 +24,7 @@ chanrec::chanrec(InspIRCd* Instance) : ServerInstance(Instance)
        age = ServerInstance->Time(true);
 }
 
-void chanrec::SetMode(char mode,bool mode_on)
+void Channel::SetMode(char mode,bool mode_on)
 {
        modes[mode-65] = mode_on;
        if (!mode_on)
@@ -32,7 +32,7 @@ void chanrec::SetMode(char mode,bool mode_on)
 }
 
 
-void chanrec::SetModeParam(char mode,const char* parameter,bool mode_on)
+void Channel::SetModeParam(char mode,const char* parameter,bool mode_on)
 {
        CustomModeList::iterator n = custom_mode_params.find(mode);     
 
@@ -51,12 +51,12 @@ void chanrec::SetModeParam(char mode,const char* parameter,bool mode_on)
        }
 }
 
-bool chanrec::IsModeSet(char mode)
+bool Channel::IsModeSet(char mode)
 {
        return modes[mode-65];
 }
 
-std::string chanrec::GetModeParameter(char mode)
+std::string Channel::GetModeParameter(char mode)
 {
        switch (mode)
        {
@@ -73,17 +73,17 @@ std::string chanrec::GetModeParameter(char mode)
        }
 }
 
-long chanrec::GetUserCounter()
+long Channel::GetUserCounter()
 {
        return (this->internal_userlist.size());
 }
 
-void chanrec::AddUser(userrec* user)
+void Channel::AddUser(User* user)
 {
        internal_userlist[user] = user->nick;
 }
 
-unsigned long chanrec::DelUser(userrec* user)
+unsigned long Channel::DelUser(User* user)
 {
        CUListIter a = internal_userlist.find(user);
        
@@ -99,17 +99,17 @@ unsigned long chanrec::DelUser(userrec* user)
        return internal_userlist.size();
 }
 
-bool chanrec::HasUser(userrec* user)
+bool Channel::HasUser(User* user)
 {
        return (internal_userlist.find(user) != internal_userlist.end());
 }
 
-void chanrec::AddOppedUser(userrec* user)
+void Channel::AddOppedUser(User* user)
 {
        internal_op_userlist[user] = user->nick;
 }
 
-void chanrec::DelOppedUser(userrec* user)
+void Channel::DelOppedUser(User* user)
 {
        CUListIter a = internal_op_userlist.find(user);
        if (a != internal_op_userlist.end())
@@ -119,12 +119,12 @@ void chanrec::DelOppedUser(userrec* user)
        }
 }
 
-void chanrec::AddHalfoppedUser(userrec* user)
+void Channel::AddHalfoppedUser(User* user)
 {
        internal_halfop_userlist[user] = user->nick;
 }
 
-void chanrec::DelHalfoppedUser(userrec* user)
+void Channel::DelHalfoppedUser(User* user)
 {
        CUListIter a = internal_halfop_userlist.find(user);
 
@@ -134,12 +134,12 @@ void chanrec::DelHalfoppedUser(userrec* user)
        }
 }
 
-void chanrec::AddVoicedUser(userrec* user)
+void Channel::AddVoicedUser(User* user)
 {
        internal_voice_userlist[user] = user->nick;
 }
 
-void chanrec::DelVoicedUser(userrec* user)
+void Channel::DelVoicedUser(User* user)
 {
        CUListIter a = internal_voice_userlist.find(user);
        
@@ -149,27 +149,27 @@ void chanrec::DelVoicedUser(userrec* user)
        }
 }
 
-CUList* chanrec::GetUsers()
+CUList* Channel::GetUsers()
 {
        return &internal_userlist;
 }
 
-CUList* chanrec::GetOppedUsers()
+CUList* Channel::GetOppedUsers()
 {
        return &internal_op_userlist;
 }
 
-CUList* chanrec::GetHalfoppedUsers()
+CUList* Channel::GetHalfoppedUsers()
 {
        return &internal_halfop_userlist;
 }
 
-CUList* chanrec::GetVoicedUsers()
+CUList* Channel::GetVoicedUsers()
 {
        return &internal_voice_userlist;
 }
 
-void chanrec::SetDefaultModes()
+void Channel::SetDefaultModes()
 {
        irc::spacesepstream list(ServerInstance->Config->DefaultModes);
        std::string modeseq;
@@ -196,7 +196,7 @@ void chanrec::SetDefaultModes()
  * add a channel to a user, creating the record for it if needed and linking
  * it to the user record 
  */
-chanrec* chanrec::JoinUser(InspIRCd* Instance, userrec *user, const char* cn, bool override, const char* key, time_t TS)
+Channel* Channel::JoinUser(InspIRCd* Instance, User *user, const char* cn, bool override, const char* key, time_t TS)
 {
        if (!user || !cn)
                return NULL;
@@ -204,7 +204,7 @@ chanrec* chanrec::JoinUser(InspIRCd* Instance, userrec *user, const char* cn, bo
        char cname[MAXBUF];
        int MOD_RESULT = 0;
        std::string privs;
-       chanrec *Ptr;
+       Channel *Ptr;
 
        /*
         * We don't restrict the number of channels that remote users or users that are override-joining may be in.
@@ -254,7 +254,7 @@ chanrec* chanrec::JoinUser(InspIRCd* Instance, userrec *user, const char* cn, bo
                if (!IS_LOCAL(user))
                {
                        if (!TS)
-                               Instance->Log(DEBUG,"*** BUG *** chanrec::JoinUser called for REMOTE user '%s' on channel '%s' but no TS given!", user->nick, cn);
+                               Instance->Log(DEBUG,"*** BUG *** Channel::JoinUser called for REMOTE user '%s' on channel '%s' but no TS given!", user->nick, cn);
                }
                else
                {
@@ -270,7 +270,7 @@ chanrec* chanrec::JoinUser(InspIRCd* Instance, userrec *user, const char* cn, bo
                }
 
                /* create a new one */
-               Ptr = new chanrec(Instance);
+               Ptr = new Channel(Instance);
                (*(Instance->chanlist))[cname] = Ptr;
 
                strlcpy(Ptr->name, cname,CHANMAX);
@@ -357,10 +357,10 @@ chanrec* chanrec::JoinUser(InspIRCd* Instance, userrec *user, const char* cn, bo
                }
        }
 
-       return chanrec::ForceChan(Instance, Ptr, user, privs);
+       return Channel::ForceChan(Instance, Ptr, user, privs);
 }
 
-chanrec* chanrec::ForceChan(InspIRCd* Instance, chanrec* Ptr, userrec* user, const std::string &privs)
+Channel* Channel::ForceChan(InspIRCd* Instance, Channel* Ptr, User* user, const std::string &privs)
 {
        std::string nick = user->nick;
        bool silent = false;
@@ -427,7 +427,7 @@ chanrec* chanrec::ForceChan(InspIRCd* Instance, chanrec* Ptr, userrec* user, con
        return Ptr;
 }
 
-bool chanrec::IsBanned(userrec* user)
+bool Channel::IsBanned(User* user)
 {
        char mask[MAXBUF];
        int MOD_RESULT = 0;
@@ -450,11 +450,11 @@ bool chanrec::IsBanned(userrec* user)
        return false;
 }
 
-/* chanrec::PartUser
+/* Channel::PartUser
  * remove a channel from a users record, and return the number of users left.
- * Therefore, if this function returns 0 the caller should delete the chanrec.
+ * Therefore, if this function returns 0 the caller should delete the Channel.
  */
-long chanrec::PartUser(userrec *user, const char* reason)
+long Channel::PartUser(User *user, const char* reason)
 {
        bool silent = false;
 
@@ -488,7 +488,7 @@ long chanrec::PartUser(userrec *user, const char* reason)
        return this->GetUserCounter();
 }
 
-long chanrec::ServerKickUser(userrec* user, const char* reason, bool triggerevents)
+long Channel::ServerKickUser(User* user, const char* reason, bool triggerevents)
 {
        bool silent = false;
 
@@ -534,7 +534,7 @@ long chanrec::ServerKickUser(userrec* user, const char* reason, bool triggereven
        return this->GetUserCounter();
 }
 
-long chanrec::KickUser(userrec *src, userrec *user, const char* reason)
+long Channel::KickUser(User *src, User *user, const char* reason)
 {
        bool silent = false;
 
@@ -612,7 +612,7 @@ long chanrec::KickUser(userrec *src, userrec *user, const char* reason)
        return this->GetUserCounter();
 }
 
-void chanrec::WriteChannel(userrec* user, char* text, ...)
+void Channel::WriteChannel(User* user, char* text, ...)
 {
        char textbuffer[MAXBUF];
        va_list argsPtr;
@@ -627,7 +627,7 @@ void chanrec::WriteChannel(userrec* user, char* text, ...)
        this->WriteChannel(user, std::string(textbuffer));
 }
 
-void chanrec::WriteChannel(userrec* user, const std::string &text)
+void Channel::WriteChannel(User* user, const std::string &text)
 {
        CUList *ulist = this->GetUsers();
        char tb[MAXBUF];
@@ -645,7 +645,7 @@ void chanrec::WriteChannel(userrec* user, const std::string &text)
        }
 }
 
-void chanrec::WriteChannelWithServ(const char* ServName, const char* text, ...)
+void Channel::WriteChannelWithServ(const char* ServName, const char* text, ...)
 {
        char textbuffer[MAXBUF];
        va_list argsPtr;
@@ -660,7 +660,7 @@ void chanrec::WriteChannelWithServ(const char* ServName, const char* text, ...)
        this->WriteChannelWithServ(ServName, std::string(textbuffer));
 }
 
-void chanrec::WriteChannelWithServ(const char* ServName, const std::string &text)
+void Channel::WriteChannelWithServ(const char* ServName, const std::string &text)
 {
        CUList *ulist = this->GetUsers();
        char tb[MAXBUF];
@@ -677,7 +677,7 @@ void chanrec::WriteChannelWithServ(const char* ServName, const std::string &text
 
 /* write formatted text from a source user to all users on a channel except
  * for the sender (for privmsg etc) */
-void chanrec::WriteAllExceptSender(userrec* user, bool serversource, char status, char* text, ...)
+void Channel::WriteAllExceptSender(User* user, bool serversource, char status, char* text, ...)
 {
        char textbuffer[MAXBUF];
        va_list argsPtr;
@@ -692,7 +692,7 @@ void chanrec::WriteAllExceptSender(userrec* user, bool serversource, char status
        this->WriteAllExceptSender(user, serversource, status, std::string(textbuffer));
 }
 
-void chanrec::WriteAllExcept(userrec* user, bool serversource, char status, CUList &except_list, char* text, ...)
+void Channel::WriteAllExcept(User* user, bool serversource, char status, CUList &except_list, char* text, ...)
 {
        char textbuffer[MAXBUF];
        va_list argsPtr;
@@ -707,7 +707,7 @@ void chanrec::WriteAllExcept(userrec* user, bool serversource, char status, CULi
        this->WriteAllExcept(user, serversource, status, except_list, std::string(textbuffer));
 }
 
-void chanrec::WriteAllExcept(userrec* user, bool serversource, char status, CUList &except_list, const std::string &text)
+void Channel::WriteAllExcept(User* user, bool serversource, char status, CUList &except_list, const std::string &text)
 {
        CUList *ulist;
        char tb[MAXBUF];
@@ -743,7 +743,7 @@ void chanrec::WriteAllExcept(userrec* user, bool serversource, char status, CULi
        }
 }
 
-void chanrec::WriteAllExceptSender(userrec* user, bool serversource, char status, const std::string& text)
+void Channel::WriteAllExceptSender(User* user, bool serversource, char status, const std::string& text)
 {
        CUList except_list;
        except_list[user] = user->nick;
@@ -754,7 +754,7 @@ void chanrec::WriteAllExceptSender(userrec* user, bool serversource, char status
  * return a count of the users on a specific channel accounting for
  * invisible users who won't increase the count. e.g. for /LIST
  */
-int chanrec::CountInvisible()
+int Channel::CountInvisible()
 {
        int count = 0;
        CUList *ulist= this->GetUsers();
@@ -767,7 +767,7 @@ int chanrec::CountInvisible()
        return count;
 }
 
-char* chanrec::ChanModes(bool showkey)
+char* Channel::ChanModes(bool showkey)
 {
        static char scratch[MAXBUF];
        static char sparam[MAXBUF];
@@ -777,7 +777,7 @@ char* chanrec::ChanModes(bool showkey)
        *scratch = '\0';
        *sparam = '\0';
 
-       /* This was still iterating up to 190, chanrec::modes is only 64 elements -- Om */
+       /* This was still iterating up to 190, Channel::modes is only 64 elements -- Om */
        for(int n = 0; n < 64; n++)
        {
                if(this->modes[n])
@@ -821,7 +821,7 @@ char* chanrec::ChanModes(bool showkey)
 /* compile a userlist of a channel into a string, each nick seperated by
  * spaces and op, voice etc status shown as @ and +, and send it to 'user'
  */
-void chanrec::UserList(userrec *user, CUList *ulist)
+void Channel::UserList(User *user, CUList *ulist)
 {
        char list[MAXBUF];
        size_t dlen, curlen;
@@ -893,7 +893,7 @@ void chanrec::UserList(userrec *user, CUList *ulist)
        user->WriteServ("366 %s %s :End of /NAMES list.", user->nick, this->name);
 }
 
-long chanrec::GetMaxBans()
+long Channel::GetMaxBans()
 {
        /* Return the cached value if there is one */
        if (this->maxbans)
@@ -914,7 +914,7 @@ long chanrec::GetMaxBans()
        return this->maxbans;
 }
 
-void chanrec::ResetMaxBans()
+void Channel::ResetMaxBans()
 {
        this->maxbans = 0;
 }
@@ -923,7 +923,7 @@ void chanrec::ResetMaxBans()
  * % for halfop etc. If the user has several modes set, the highest mode
  * the user has must be returned.
  */
-const char* chanrec::GetPrefixChar(userrec *user)
+const char* Channel::GetPrefixChar(User *user)
 {
        static char pf[2] = {0, 0};
        
@@ -946,7 +946,7 @@ const char* chanrec::GetPrefixChar(userrec *user)
        return pf;
 }
 
-const char* chanrec::GetAllPrefixChars(userrec* user)
+const char* Channel::GetAllPrefixChars(User* user)
 {
        static char prefix[MAXBUF];
        int ctr = 0;
@@ -966,7 +966,7 @@ const char* chanrec::GetAllPrefixChars(userrec* user)
        return prefix;
 }
 
-unsigned int chanrec::GetPrefixValue(userrec* user)
+unsigned int Channel::GetPrefixValue(User* user)
 {
        prefixlist::iterator n = prefixes.find(user);
        if (n != prefixes.end())
@@ -977,7 +977,7 @@ unsigned int chanrec::GetPrefixValue(userrec* user)
        return 0;
 }
 
-int chanrec::GetStatusFlags(userrec *user)
+int Channel::GetStatusFlags(User *user)
 {
        UCListIter i = user->chans.find(this);
        if (i != user->chans.end())
@@ -987,7 +987,7 @@ int chanrec::GetStatusFlags(userrec *user)
        return 0;
 }
 
-int chanrec::GetStatus(userrec *user)
+int Channel::GetStatus(User *user)
 {
        if (ServerInstance->ULine(user->server))
                return STATUS_OP;
@@ -1012,7 +1012,7 @@ int chanrec::GetStatus(userrec *user)
        return STATUS_NORMAL;
 }
 
-void chanrec::SetPrefix(userrec* user, char prefix, unsigned int prefix_value, bool adding)
+void Channel::SetPrefix(User* user, char prefix, unsigned int prefix_value, bool adding)
 {
        prefixlist::iterator n = prefixes.find(user);
        prefixtype pfx = std::make_pair(prefix,prefix_value);
@@ -1035,7 +1035,7 @@ void chanrec::SetPrefix(userrec* user, char prefix, unsigned int prefix_value, b
                {
                        pfxcontainer one;
                        one.push_back(pfx);
-                       prefixes.insert(std::make_pair<userrec*,pfxcontainer>(user, one));
+                       prefixes.insert(std::make_pair<User*,pfxcontainer>(user, one));
                }
        }
        else
@@ -1049,7 +1049,7 @@ void chanrec::SetPrefix(userrec* user, char prefix, unsigned int prefix_value, b
        }
 }
 
-void chanrec::RemoveAllPrefixes(userrec* user)
+void Channel::RemoveAllPrefixes(User* user)
 {
        prefixlist::iterator n = prefixes.find(user);
        if (n != prefixes.end())
index a7a72c0f8551c67405bf388b9eed7c87610b478a..427342cfb039cd1ecada872a5f07403bc4a2f584 100644 (file)
@@ -22,7 +22,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** Handle /ADMIN
  */
-CmdResult cmd_admin::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_admin::Handle (const char** parameters, int pcnt, User *user)
 {
        user->WriteServ("256 %s :Administrative info for %s",user->nick,ServerInstance->Config->ServerName);
        if (*ServerInstance->Config->AdminName)
index c27ce222a38dd8d2f2812a22d2d1bfc83e21d5ec..c237a94fdfce7f265f823b3111dc1e6a4aa642e9 100644 (file)
@@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** Handle /AWAY
  */
-CmdResult cmd_away::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_away::Handle (const char** parameters, int pcnt, User *user)
 {
        if ((pcnt) && (*parameters[0]))
        {
index 0a08498e8ab10dcb44f3f4085117ee23629f97f8..aed05c093ff620aeedbe12d5301e61cff558c768 100644 (file)
@@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** Handle /CLEARCACHE
  */
-CmdResult cmd_clearcache::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_clearcache::Handle (const char** parameters, int pcnt, User *user)
 {
        int n = ServerInstance->Res->ClearCache();
        user->WriteServ("NOTICE %s :*** Cleared DNS cache of %d items.", user->nick, n);
index 41f68690ee1d97e3994da579aea6664fe67224c5..bfdafb6ad9e34f95d68ce4fb1cd1d5745604ea0b 100644 (file)
@@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_commands(Instance);
 }
 
-CmdResult cmd_commands::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_commands::Handle (const char** parameters, int pcnt, User *user)
 {
        for (Commandable::iterator i = ServerInstance->Parser->cmdlist.begin(); i != ServerInstance->Parser->cmdlist.end(); i++)
        {
index 63afa02a21cf08e5dac403d9a6944de52931cfda..eff8a23f0fd6c1ee04238a23b185d42fa0ba3ecf 100644 (file)
@@ -25,7 +25,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** Handle /CONNECT
  */
-CmdResult cmd_connect::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_connect::Handle (const char** parameters, int pcnt, User *user)
 {
        user->WriteServ( "NOTICE %s :Look into loading a linking module (like m_spanningtree) if you want this to do anything useful.", user->nick);
        return CMD_SUCCESS;
index 4772c9d173cb11ead90ca57820e687c53f8c235f..3193a19e1d557688b64cc375abe082c3de6af0ed 100644 (file)
@@ -22,7 +22,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** Handle /DIE
  */
-CmdResult cmd_die::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_die::Handle (const char** parameters, int pcnt, User *user)
 {
        if (!strcmp(parameters[0],ServerInstance->Config->diepass))
        {
index d28f72418ecac3cafca8819c465af20780cfb60d..6a4db99dd3e80c987b717f2fcb7d03fc85e7e6e7 100644 (file)
@@ -22,7 +22,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** Handle /ELINE
  */
-CmdResult cmd_eline::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_eline::Handle (const char** parameters, int pcnt, User *user)
 {
        if (pcnt >= 3)
        {
index 2dff4902e3949f150d7aa15b4ecec4617de00011..1cd4bcb48247c71bb0b0e87b1b95a20450720018 100644 (file)
@@ -22,7 +22,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** Handle /GLINE
  */
-CmdResult cmd_gline::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_gline::Handle (const char** parameters, int pcnt, User *user)
 {
        if (pcnt >= 3)
        {
index 29085afb7486c0e15648c92bc98bbb9840768b06..447834a7f49a0758d20f69342c324dd12c024cc5 100644 (file)
@@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** Handle /INFO
  */
-CmdResult cmd_info::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_info::Handle (const char** parameters, int pcnt, User *user)
 {
        user->WriteServ( "371 %s :                   -/\\- \2InspIRCd\2 -\\/-", user->nick);
        user->WriteServ( "371 %s :                 November 2002 - Present", user->nick);
index a1e3fb24b4a0fda7209e122f44bd41e54d83649b..49382deb8773cc9b1598a71b253a74df4902ebb6 100644 (file)
@@ -21,14 +21,14 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** Handle /INVITE
  */
-CmdResult cmd_invite::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_invite::Handle (const char** parameters, int pcnt, User *user)
 {
        int MOD_RESULT = 0;
 
        if (pcnt == 2)
        {
-               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))
                {
index 4c5542cd8788726b49018d282130c996db99b1cc..94221f15253b4ce45c0bee98c835a3a40646026b 100644 (file)
@@ -21,10 +21,10 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** Handle /ISON
  */
-CmdResult cmd_ison::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_ison::Handle (const char** parameters, int pcnt, User *user)
 {
-       std::map<userrec*,userrec*> ison_already;
-       userrec *u;
+       std::map<User*,User*> ison_already;
+       User *u;
        std::string reply = std::string("303 ") + user->nick + " :";
 
        for (int i = 0; i < pcnt; i++)
index 171f90bba3a381b8090ff65726aa492e6cd6282a..0c5c3f1570c1db34d9cba94f6b0844f1f35666e7 100644 (file)
@@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** Handle /JOIN
  */
-CmdResult cmd_join::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_join::Handle (const char** parameters, int pcnt, User *user)
 {
        if (pcnt > 1)
        {
@@ -30,7 +30,7 @@ CmdResult cmd_join::Handle (const char** parameters, int pcnt, userrec *user)
 
                if (ServerInstance->IsChannel(parameters[0]))
                {
-                       chanrec::JoinUser(ServerInstance, user, parameters[0], false, parameters[1]);
+                       Channel::JoinUser(ServerInstance, user, parameters[0], false, parameters[1]);
                        return CMD_SUCCESS;
                }
        }
@@ -41,7 +41,7 @@ CmdResult cmd_join::Handle (const char** parameters, int pcnt, userrec *user)
 
                if (ServerInstance->IsChannel(parameters[0]))
                {
-                       chanrec::JoinUser(ServerInstance, user, parameters[0], false, "");
+                       Channel::JoinUser(ServerInstance, user, parameters[0], false, "");
                        return CMD_SUCCESS;
                }
        }
index 78edb177d2e219ce90b62b71ad5dd82a7ddbeab5..c4eeaf6096b027fab1b8bd2bbe3a74a967f6a8b7 100644 (file)
@@ -21,11 +21,11 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** Handle /KICK
  */
-CmdResult cmd_kick::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_kick::Handle (const char** parameters, int pcnt, User *user)
 {
        char reason[MAXKICK];
-       chanrec* c = ServerInstance->FindChan(parameters[0]);
-       userrec* u = ServerInstance->FindNick(parameters[1]);
+       Channel* c = ServerInstance->FindChan(parameters[0]);
+       User* u = ServerInstance->FindNick(parameters[1]);
 
        if (!u || !c)
        {
@@ -49,7 +49,7 @@ CmdResult cmd_kick::Handle (const char** parameters, int pcnt, userrec *user)
        }
 
        if (!c->KickUser(user, u, reason))
-               /* Nobody left here, delete the chanrec */
+               /* Nobody left here, delete the Channel */
                delete c;
 
        return CMD_SUCCESS;
index a2e76ce458049948aaff0900919c4deada1d2edc..e137e1ab209f183a56a4f7e31d012ff6676c4c2f 100644 (file)
@@ -21,13 +21,13 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** Handle /KILL
  */
-CmdResult cmd_kill::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_kill::Handle (const char** parameters, int pcnt, User *user)
 {
        /* Allow comma seperated lists of users for /KILL (thanks w00t) */
        if (ServerInstance->Parser->LoopCall(user, this, parameters, pcnt, 0))
                return CMD_SUCCESS;
 
-       userrec *u = ServerInstance->FindNick(parameters[0]);
+       User *u = ServerInstance->FindNick(parameters[0]);
        char killreason[MAXBUF];
        int MOD_RESULT = 0;
 
@@ -103,7 +103,7 @@ CmdResult cmd_kill::Handle (const char** parameters, int pcnt, userrec *user)
                }
 
                // send the quit out
-               userrec::QuitUser(ServerInstance, u, killreason);
+               User::QuitUser(ServerInstance, u, killreason);
        }
        else
        {
index 75a8685773eefb5d9a82fad17b64ae70db219130..5dbdf2b2e584522f25110c4ccf0bd8c5f3ab310f 100644 (file)
@@ -22,7 +22,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** Handle /KLINE
  */
-CmdResult cmd_kline::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_kline::Handle (const char** parameters, int pcnt, User *user)
 {
        if (pcnt >= 3)
        {
index 2576b63e96911b29edb266cd6ec505acfae72a65..0bf8a19de3eabb181e80e086aa23aefaae88e056 100644 (file)
@@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** Handle /LINKS
  */
-CmdResult cmd_links::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_links::Handle (const char** parameters, int pcnt, User *user)
 {
        user->WriteServ("364 %s %s %s :0 %s",user->nick,ServerInstance->Config->ServerName,ServerInstance->Config->ServerName,ServerInstance->Config->ServerDesc);
        user->WriteServ("365 %s * :End of /LINKS list.",user->nick);
index e77feeb668a6d73bf008bb7adb6cd96f10320b0b..ff4715becf0f6f0699e9b91e29653d156648b98f 100644 (file)
@@ -22,7 +22,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_list(Instance);
 }
 
-CmdResult cmd_list::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_list::Handle (const char** parameters, int pcnt, User *user)
 {
        int minusers = 0, maxusers = 0;
 
index 0c5cb139b69a050511f50c0615692165ee0c4495..a16a587890abd3af49a8ddaf38624ae6b2c6365b 100644 (file)
@@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** Handle /LOADMODULE
  */
-CmdResult cmd_loadmodule::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_loadmodule::Handle (const char** parameters, int pcnt, User *user)
 {
        if (ServerInstance->Modules->Load(parameters[0]))
        {
index cc66ba435b095ce94541385b85ce4a25d6ec550c..1ea6f2f4280e45af9df84fc8eef8b58dea073d11 100644 (file)
@@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** Handle /LUSERS
  */
-CmdResult cmd_lusers::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_lusers::Handle (const char** parameters, int pcnt, User *user)
 {
        // this lusers command shows one server at all times because
        // a protocol module must override it to show those stats.
index 471f53a1aa1b0e505d641e6fc7de70b8f410e814..05bd0cbef03bac2501e8f04f3e0b634dfda7aaae 100644 (file)
@@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** Handle /MAP
  */
-CmdResult cmd_map::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_map::Handle (const char** parameters, int pcnt, User *user)
 {
        // as with /LUSERS this does nothing without a linking
        // module to override its behaviour and display something
index 5680e1b05934b2c7022ecc16178b9582c6fbcdd5..e5240b00d47be2cd148c2d28aa6e4d1e70a566ff 100644 (file)
@@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** Handle /MODE
  */
-CmdResult cmd_mode::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_mode::Handle (const char** parameters, int pcnt, User *user)
 {
        ServerInstance->Modes->Process(parameters, pcnt, user, false);
        return CMD_SUCCESS;
index 12697a68f8498138db244133ad87f79cfac9c578..fd86254e560278c695c4b75746d274a6c46982e9 100644 (file)
@@ -38,7 +38,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** Handle /MODULES
  */
-CmdResult cmd_modules::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_modules::Handle (const char** parameters, int pcnt, User *user)
 {
        for (unsigned int i = 0; i < ServerInstance->Config->module_names.size(); i++)
        {
index 53d140a9d41e397fddfc67daff535769ef2fe81e..019b132288a54e7409780632a2410f6e1e1872ba 100644 (file)
@@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** Handle /MOTD
  */
-CmdResult cmd_motd::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_motd::Handle (const char** parameters, int pcnt, User *user)
 {
        user->ShowMOTD();
        return CMD_SUCCESS;
index 21ab2f3edacc3672131769bfafa379483e603849..29d448f28cd7086266e26491e1540b814ce2e1a5 100644 (file)
@@ -21,9 +21,9 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** Handle /NAMES
  */
-CmdResult cmd_names::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_names::Handle (const char** parameters, int pcnt, User *user)
 {
-       chanrec* c;
+       Channel* c;
 
        if (!pcnt)
        {
index 6eb72349b09f9a4b035900e2625bbd4751abb146..d350b26b609e5ab43062bb2d4afe8f6a793a5d1b 100644 (file)
@@ -25,7 +25,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
  * for the client introduction code in here, youre in the wrong place.
  * You need to look in the spanningtree module for this!
  */
-CmdResult cmd_nick::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_nick::Handle (const char** parameters, int pcnt, User *user)
 {
        char oldnick[NICKMAX];
 
@@ -73,7 +73,7 @@ CmdResult cmd_nick::Handle (const char** parameters, int pcnt, userrec *user)
                 * the nickname too, we force a nickchange on the older user (Simply the one who was
                 * here first, no TS checks need to take place here)
                 */
-               userrec* InUse = ServerInstance->FindNickOnly(parameters[0]);
+               User* InUse = ServerInstance->FindNickOnly(parameters[0]);
                if (InUse && (InUse != user) && ((ServerInstance->IsNick(parameters[0]) || allowinvalid)))
                {
                        if (InUse->registered != REG_ALL)
index 7c0f06b4006602a3430da2324f44695b14f27c50..cf4d7b44acaf64322620d3d46abb79a6a8de10fd 100644 (file)
@@ -20,10 +20,10 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_notice(Instance);
 }
 
-CmdResult cmd_notice::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_notice::Handle (const char** parameters, int pcnt, User *user)
 {
-       userrec *dest;
-       chanrec *chan;
+       User *dest;
+       Channel *chan;
 
        CUList exempt_list;
 
index cc2ae6e65195b05ad3cb2cc2b3152542995ecdec..1af42fffaa98e0536fcd8d63b241d4d8cbd33734 100644 (file)
@@ -35,7 +35,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_oper(Instance);
 }
 
-CmdResult cmd_oper::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_oper::Handle (const char** parameters, int pcnt, User *user)
 {
        char LoginName[MAXBUF];
        char Password[MAXBUF];
index 9088ec21d406f7797931f78626dcd44f90826d50..18e8d19d941abf408e418cde6ff73d6a106cd4eb 100644 (file)
@@ -19,12 +19,12 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_part(Instance);
 }
 
-CmdResult cmd_part::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_part::Handle (const char** parameters, int pcnt, User *user)
 {
        if (ServerInstance->Parser->LoopCall(user, this, parameters, pcnt, 0))
                return CMD_SUCCESS;
 
-       chanrec* c = ServerInstance->FindChan(parameters[0]);
+       Channel* c = ServerInstance->FindChan(parameters[0]);
        
        if (c)
        {
index 78bf1a2cfa0f75b1826a5c214645cd290d57e19c..db84eb051227e18c165ec0150def72c1ad5092d8 100644 (file)
@@ -19,7 +19,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_pass(Instance);
 }
 
-CmdResult cmd_pass::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_pass::Handle (const char** parameters, int pcnt, User *user)
 {
        // Check to make sure they havnt registered -- Fix by FCS
        if (user->registered == REG_ALL)
index ff16f2e44c1f64497ac9cbf1cf121ff453dd8231..735f9c3bef983e93b984d65434a33a3c870b37f1 100644 (file)
@@ -19,7 +19,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_ping(Instance);
 }
 
-CmdResult cmd_ping::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_ping::Handle (const char** parameters, int pcnt, User *user)
 {
        user->WriteServ("PONG %s :%s",ServerInstance->Config->ServerName,parameters[0]);
        return CMD_SUCCESS;
index dab4de7203bfacc4b9c5b6e0c64f358700f26cd5..aca3170783ab818955d1de16c4588ac24d9c387f 100644 (file)
@@ -19,7 +19,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_pong(Instance);
 }
 
-CmdResult cmd_pong::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_pong::Handle (const char** parameters, int pcnt, User *user)
 {
        // set the user as alive so they survive to next ping
        user->lastping = 1;
index 2c54a770a81b1ff39f7b2473d07156aa2447a7cf..fddf810d2846ba01ffe2e74b358aa3f570672385 100644 (file)
@@ -20,10 +20,10 @@ extern "C" DllExport  Command* init_command(InspIRCd* Instance)
        return new cmd_privmsg(Instance);
 }
 
-CmdResult cmd_privmsg::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_privmsg::Handle (const char** parameters, int pcnt, User *user)
 {
-       userrec *dest;
-       chanrec *chan;
+       User *dest;
+       Channel *chan;
        CUList except_list;
 
        user->idle_lastmsg = ServerInstance->Time();
index 1d4f8d089e3b6f0d4bda9310b08e58414ef1b902..4f843cb5ebe4f9230ed40689ab9b5a9b44fd70ec 100644 (file)
@@ -22,7 +22,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_qline(Instance);
 }
 
-CmdResult cmd_qline::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_qline::Handle (const char** parameters, int pcnt, User *user)
 {
        if (pcnt >= 3)
        {
index 8626db1efe926dc4403595aedbf62a3ccd7c7c9e..ae3d6829607331db8c1b7ecc813116354eec8290 100644 (file)
@@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_quit(Instance);
 }
 
-CmdResult cmd_quit::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_quit::Handle (const char** parameters, int pcnt, User *user)
 {
 
        std::string quitmsg;
@@ -38,7 +38,7 @@ CmdResult cmd_quit::Handle (const char** parameters, int pcnt, userrec *user)
        else
                quitmsg = pcnt ? parameters[0] : "Client exited";
 
-       userrec::QuitUser(ServerInstance, user, quitmsg);
+       User::QuitUser(ServerInstance, user, quitmsg);
 
        return CMD_SUCCESS;
 }
index a1292f19f2b49971c19fad18bc04c47fc35cd1da..5612f59fa0588c47d54ad25e67c9360554f3c56d 100644 (file)
@@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_rehash(Instance);
 }
 
-CmdResult cmd_rehash::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_rehash::Handle (const char** parameters, int pcnt, User *user)
 {
        user->WriteServ("382 %s %s :Rehashing",user->nick,ServerConfig::CleanFilename(ServerInstance->ConfigFileName));
        std::string parameter;
index b1201ef6e3bcd859bc9b344953fdc7525652553a..a08dc7fec7e893c60551e5c6dc4db2ed06cfae28 100644 (file)
@@ -19,7 +19,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_reloadmodule(Instance);
 }
 
-CmdResult cmd_reloadmodule::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_reloadmodule::Handle (const char** parameters, int pcnt, User *user)
 {
        if (ServerInstance->Modules->Unload(parameters[0]))
        {
index 8da98f77e63e90a9cf799fcf334e358c13b22516..6880d5e28b11314bf08e5cdfb6a223f3745af30c 100644 (file)
@@ -19,7 +19,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_restart(Instance);
 }
 
-CmdResult cmd_restart::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_restart::Handle (const char** parameters, int pcnt, User *user)
 {
        ServerInstance->Log(DEFAULT,"Restart: %s",user->nick);
        if (!strcmp(parameters[0],ServerInstance->Config->restartpass))
index 7c47607db293d0b70a3b78e5901ad86663d06854..668a207b7182232991fd475d0702006f303c7c05 100644 (file)
@@ -19,7 +19,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_rules(Instance);
 }
 
-CmdResult cmd_rules::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_rules::Handle (const char** parameters, int pcnt, User *user)
 {
        user->ShowRULES();
        return CMD_SUCCESS;
index 837c9406739b4b66548062d1107b1fc0230f6dfe..7781d3331899aa4d94ec2a1fa17b01ed5b319268 100644 (file)
@@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_server(Instance);
 }
 
-CmdResult cmd_server::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_server::Handle (const char** parameters, int pcnt, User *user)
 {
        user->WriteServ("666 %s :You cannot identify as a server, you are a USER. IRC Operators informed.",user->nick);
        ServerInstance->WriteOpers("*** WARNING: %s attempted to issue a SERVER command and is registered as a user!",user->nick);
index a29ddbaef7b4dc8e5bb8d398bb73d1be1352a057..3f8175093bb335aa82c763f5869bbad4303ebf61 100644 (file)
@@ -24,7 +24,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_squit(Instance);
 }
 
-CmdResult cmd_squit::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_squit::Handle (const char** parameters, int pcnt, User *user)
 {
        user->WriteServ( "NOTICE %s :Look into loading a linking module (like m_spanningtree) if you want this to do anything useful.", user->nick);
        return CMD_FAILURE;
index 4b93d5f5f0457eba8fcb2df1aead7214ca5b499f..38cae03cf15ebf8a782254c8707daa3fc21506b3 100644 (file)
@@ -31,7 +31,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_stats(Instance);
 }
 
-CmdResult cmd_stats::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_stats::Handle (const char** parameters, int pcnt, User *user)
 {
        if (IS_LOCAL(user))
        {
@@ -44,7 +44,7 @@ CmdResult cmd_stats::Handle (const char** parameters, int pcnt, userrec *user)
        return CMD_SUCCESS;
 }
 
-DllExport void DoStats(InspIRCd* ServerInstance, char statschar, userrec* user, string_list &results)
+DllExport void DoStats(InspIRCd* ServerInstance, char statschar, User* user, string_list &results)
 {
        std::string sn = ServerInstance->Config->ServerName;
 
@@ -173,8 +173,8 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, userrec* user,
                case 'z':
                {
                        results.push_back(sn+" 240 "+user->nick+" :InspIRCd(CLASS) "+ConvToStr(sizeof(InspIRCd))+" bytes");
-                       results.push_back(sn+" 249 "+user->nick+" :Users(HASH_MAP) "+ConvToStr(ServerInstance->clientlist->size())+" ("+ConvToStr(ServerInstance->clientlist->size()*sizeof(userrec))+" bytes)");
-                       results.push_back(sn+" 249 "+user->nick+" :Channels(HASH_MAP) "+ConvToStr(ServerInstance->chanlist->size())+" ("+ConvToStr(ServerInstance->chanlist->size()*sizeof(chanrec))+" bytes)");
+                       results.push_back(sn+" 249 "+user->nick+" :Users(HASH_MAP) "+ConvToStr(ServerInstance->clientlist->size())+" ("+ConvToStr(ServerInstance->clientlist->size()*sizeof(User))+" bytes)");
+                       results.push_back(sn+" 249 "+user->nick+" :Channels(HASH_MAP) "+ConvToStr(ServerInstance->chanlist->size())+" ("+ConvToStr(ServerInstance->chanlist->size()*sizeof(Channel))+" bytes)");
                        results.push_back(sn+" 249 "+user->nick+" :Commands(VECTOR) "+ConvToStr(ServerInstance->Parser->cmdlist.size())+" ("+ConvToStr(ServerInstance->Parser->cmdlist.size()*sizeof(Command))+" bytes)");
 
                        if (!ServerInstance->Config->WhoWasGroupSize == 0 && !ServerInstance->Config->WhoWasMaxGroups == 0)
@@ -259,9 +259,9 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, userrec* user,
                /* stats l (show user I/O stats) */
                case 'l':
                        results.push_back(sn+" 211 "+user->nick+" :nick[ident@host] sendq cmds_out bytes_out cmds_in bytes_in time_open");
-                       for (std::vector<userrec*>::iterator n = ServerInstance->local_users.begin(); n != ServerInstance->local_users.end(); n++)
+                       for (std::vector<User*>::iterator n = ServerInstance->local_users.begin(); n != ServerInstance->local_users.end(); n++)
                        {
-                               userrec* i = *n;
+                               User* i = *n;
                                if (ServerInstance->IsNick(i->nick))
                                {
                                        results.push_back(sn+" 211 "+user->nick+" "+i->nick+"["+i->ident+"@"+i->dhost+"] "+ConvToStr(i->sendq.length())+" "+ConvToStr(i->cmds_out)+" "+ConvToStr(i->bytes_out)+" "+ConvToStr(i->cmds_in)+" "+ConvToStr(i->bytes_in)+" "+ConvToStr(ServerInstance->Time() - i->age));
@@ -272,9 +272,9 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, userrec* user,
        /* stats L (show user I/O stats with IP addresses) */
                case 'L':
                        results.push_back(sn+" 211 "+user->nick+" :nick[ident@ip] sendq cmds_out bytes_out cmds_in bytes_in time_open");
-                       for (std::vector<userrec*>::iterator n = ServerInstance->local_users.begin(); n != ServerInstance->local_users.end(); n++)
+                       for (std::vector<User*>::iterator n = ServerInstance->local_users.begin(); n != ServerInstance->local_users.end(); n++)
                        {
-                               userrec* i = *n;
+                               User* i = *n;
                                if (ServerInstance->IsNick(i->nick))
                                {
                                        results.push_back(sn+" 211 "+user->nick+" "+i->nick+"["+i->ident+"@"+i->GetIPString()+"] "+ConvToStr(i->sendq.length())+" "+ConvToStr(i->cmds_out)+" "+ConvToStr(i->bytes_out)+" "+ConvToStr(i->cmds_in)+" "+ConvToStr(i->bytes_in)+" "+ConvToStr(ServerInstance->Time() - i->age));
index 926d692041cf7ffb4eae5143fdf663ba25cada54..ddeb0b19044ec52e7af01d9ce73ebc76507d9536 100644 (file)
@@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_time(Instance);
 }
 
-CmdResult cmd_time::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_time::Handle (const char** parameters, int pcnt, User *user)
 {
        struct tm* timeinfo;
        time_t local = ServerInstance->Time();
index 3318972fb6b38f0e8699b6c87a83b7db1a5b30e2..b3034ba39c76441ff326a6bd38cef775dd9dd4aa 100644 (file)
@@ -20,9 +20,9 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_topic(Instance);
 }
 
-CmdResult cmd_topic::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_topic::Handle (const char** parameters, int pcnt, User *user)
 {
-       chanrec* Ptr;
+       Channel* Ptr;
 
        if (pcnt == 1)
        {
index a71bb42bfd9f2c80e28fb7f4462e305e70550f0c..5899c683221410e6420ba079cbced90f4f332ad3 100644 (file)
@@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** XXX: This is crap. someone fix this when you have time, to be more useful.
  */
-CmdResult cmd_trace::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_trace::Handle (const char** parameters, int pcnt, User *user)
 {
        for (user_hash::iterator i = ServerInstance->clientlist->begin(); i != ServerInstance->clientlist->end(); i++)
        {
index 5cb4109501b569fc0d9e30f1f02727409231d4b7..d0b35f69fe9aa77148063dae49c975a00d0da889 100644 (file)
@@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_unloadmodule(Instance);
 }
 
-CmdResult cmd_unloadmodule::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_unloadmodule::Handle (const char** parameters, int pcnt, User *user)
 {
        if (ServerInstance->Modules->Unload(parameters[0]))
        {
index f2240bb92f35cacdae237dc2a8d88104145f9f52..a3d10a7231a97a80035e16fa08006476e446e252 100644 (file)
@@ -19,7 +19,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_user(Instance);
 }
 
-CmdResult cmd_user::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_user::Handle (const char** parameters, int pcnt, User *user)
 {
        /* A user may only send the USER command once */
        if (!(user->registered & REG_USER))
index dd1a2d819a5406268c60ce8e11923c486ca07b25..78d435a3994f00287727edac7a890f63434b5290 100644 (file)
@@ -19,14 +19,14 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_userhost(Instance);
 }
 
-CmdResult cmd_userhost::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_userhost::Handle (const char** parameters, int pcnt, User *user)
 {
        std::string retbuf = std::string("302 ") + 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))
                {
index c355717f76f691bd1e414841f15e44a6ff804902..86fde3210455130857fda65d42ed46e5d7c822f8 100644 (file)
@@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_version(Instance);
 }
 
-CmdResult cmd_version::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_version::Handle (const char** parameters, int pcnt, User *user)
 {
        user->WriteServ("351 %s :%s",user->nick,ServerInstance->GetVersionString().c_str());
        ServerInstance->Config->Send005(user);
index 90a7d8bdebc969841f3da2b5775d3f23b7878ab9..14924e56be52306ea4627943091f12cde4b439d4 100644 (file)
@@ -21,7 +21,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_wallops(Instance);
 }
 
-CmdResult cmd_wallops::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_wallops::Handle (const char** parameters, int pcnt, User *user)
 {
        user->WriteWallOps(std::string(parameters[0]));
        FOREACH_MOD(I_OnWallops,OnWallops(user,parameters[0]));
index 91c651bcc99d030a7110eb8bf16a862e79776129..0ebe20d101805907588569f1a83e6e624ecf9722 100644 (file)
@@ -15,7 +15,7 @@
 #include "wildcard.h"
 #include "commands/cmd_who.h"
 
-static char *get_first_visible_channel(userrec *u)
+static char *get_first_visible_channel(User *u)
 {
        UCListIter i = u->chans.begin();
        if (i != u->chans.end())
@@ -27,7 +27,7 @@ static char *get_first_visible_channel(userrec *u)
        return "*";
 }
 
-bool cmd_who::whomatch(userrec* user, const char* matchtext)
+bool cmd_who::whomatch(User* user, const char* matchtext)
 {
        bool realhost = false;
        bool realname = false;
@@ -112,7 +112,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_who(Instance);
 }
 
-bool cmd_who::CanView(chanrec* chan, userrec* user)
+bool cmd_who::CanView(Channel* chan, User* user)
 {
        if (!user || !chan)
                return false;
@@ -132,10 +132,10 @@ bool cmd_who::CanView(chanrec* chan, userrec* user)
        return false;
 }
 
-void cmd_who::SendWhoLine(userrec* user, const std::string &initial, chanrec* ch, userrec* u, std::vector<std::string> &whoresults)
+void cmd_who::SendWhoLine(User* user, const std::string &initial, Channel* ch, User* u, std::vector<std::string> &whoresults)
 {
        std::string lcn = get_first_visible_channel(u);
-       chanrec* chlast = ServerInstance->FindChan(lcn);
+       Channel* chlast = ServerInstance->FindChan(lcn);
 
        /* Not visible to this user */
        if (u->Visibility && !u->Visibility->VisibleTo(user))
@@ -165,7 +165,7 @@ void cmd_who::SendWhoLine(userrec* user, const std::string &initial, chanrec* ch
        whoresults.push_back(wholine);
 }
 
-CmdResult cmd_who::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_who::Handle (const char** parameters, int pcnt, User *user)
 {
        /*
         * XXX - RFC says:
@@ -187,7 +187,7 @@ CmdResult cmd_who::Handle (const char** parameters, int pcnt, userrec *user)
        opt_local = false;
        opt_far = false;
 
-       chanrec *ch = NULL;
+       Channel *ch = NULL;
        std::vector<std::string> whoresults;
        std::string initial = "352 " + std::string(user->nick) + " ";
 
@@ -295,9 +295,9 @@ CmdResult cmd_who::Handle (const char** parameters, int pcnt, userrec *user)
                if (opt_viewopersonly)
                {
                        /* Showing only opers */
-                       for (std::list<userrec*>::iterator i = ServerInstance->all_opers.begin(); i != ServerInstance->all_opers.end(); i++)
+                       for (std::list<User*>::iterator i = ServerInstance->all_opers.begin(); i != ServerInstance->all_opers.end(); i++)
                        {
-                               userrec* oper = *i;
+                               User* oper = *i;
 
                                if (whomatch(oper, matchtext))
                                {
index 508200cb60eeebe57bc03b76ae0637e899874480..f861dde36ca6969684a06784a58869cfdc6d94f6 100644 (file)
@@ -15,7 +15,7 @@
 #include "commands/cmd_whois.h"
 #include "hashcomp.h"
 
-void do_whois(InspIRCd* ServerInstance, userrec* user, userrec* dest,unsigned long signon, unsigned long idle, const char* nick)
+void do_whois(InspIRCd* ServerInstance, User* user, User* dest,unsigned long signon, unsigned long idle, const char* nick)
 {
        if (dest->Visibility && !dest->Visibility->VisibleTo(user))
        {
@@ -91,9 +91,9 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_whois(Instance);
 }
 
-CmdResult cmd_whois::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_whois::Handle (const char** parameters, int pcnt, User *user)
 {
-       userrec *dest;
+       User *dest;
        int userindex = 0;
        unsigned long idle = 0, signon = 0;
 
index f982d48737ad740fb63faa5039ac6ded28630c3a..de13d5b267b2b59e5fa2b28e8885cd3db685faef 100644 (file)
@@ -29,7 +29,7 @@ cmd_whowas::cmd_whowas(InspIRCd* Instance)
        Instance->Timers->AddTimer(timer);
 }
 
-CmdResult cmd_whowas::Handle (const char** parameters, int pcnt, userrec* user)
+CmdResult cmd_whowas::Handle (const char** parameters, int pcnt, User* user)
 {
        /* if whowas disabled in config */
        if (ServerInstance->Config->WhoWasGroupSize == 0 || ServerInstance->Config->WhoWasMaxGroups == 0)
@@ -92,7 +92,7 @@ CmdResult cmd_whowas::HandleInternal(const unsigned int id, const std::deque<cla
        switch (id)
        {
                case WHOWAS_ADD:
-                       AddToWhoWas((userrec*)parameters[0]);
+                       AddToWhoWas((User*)parameters[0]);
                break;
 
                case WHOWAS_STATS:
@@ -131,7 +131,7 @@ void cmd_whowas::GetStats(Extensible* ext)
        ext->Extend("stats", stats.c_str());
 }
 
-void cmd_whowas::AddToWhoWas(userrec* user)
+void cmd_whowas::AddToWhoWas(User* user)
 {
        /* if whowas disabled */
        if (ServerInstance->Config->WhoWasGroupSize == 0 || ServerInstance->Config->WhoWasMaxGroups == 0)
@@ -316,7 +316,7 @@ cmd_whowas::~cmd_whowas()
        }
 }
 
-WhoWasGroup::WhoWasGroup(userrec* user) : host(NULL), dhost(NULL), ident(NULL), server(NULL), gecos(NULL), signon(user->signon)
+WhoWasGroup::WhoWasGroup(User* user) : host(NULL), dhost(NULL), ident(NULL), server(NULL), gecos(NULL), signon(user->signon)
 {
        this->host = strdup(user->host);
        this->dhost = strdup(user->dhost);
index cb0167f4e129fe75e97bcc755cd796bc29b2700b..a1d22e32adcbdff8986b03d0fd6d760ee6133f93 100644 (file)
@@ -22,7 +22,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
        return new cmd_zline(Instance);
 }
 
-CmdResult cmd_zline::Handle (const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_zline::Handle (const char** parameters, int pcnt, User *user)
 {
        if (pcnt >= 3)
        {
index 68555ec8b3c659addd76bb9b0ad83a19a34cb79c..462b50d883ab19487e2bfa30200cd59215fe618a 100644 (file)
@@ -112,7 +112,7 @@ long InspIRCd::Duration(const std::string &str)
  * The second version is much simpler and just has the one stream to read, and is used in NAMES, WHOIS, PRIVMSG etc.
  * Both will only parse until they reach ServerInstance->Config->MaxTargets number of targets, to stop abuse via spam.
  */
-int CommandParser::LoopCall(userrec* user, Command* CommandObj, const char** parameters, int pcnt, unsigned int splithere, unsigned int extra)
+int CommandParser::LoopCall(User* user, Command* CommandObj, const char** parameters, int pcnt, unsigned int splithere, unsigned int extra)
 {
        /* First check if we have more than one item in the list, if we don't we return zero here and the handler
         * which called us just carries on as it was.
@@ -161,7 +161,7 @@ int CommandParser::LoopCall(userrec* user, Command* CommandObj, const char** par
        return 1;
 }
 
-int CommandParser::LoopCall(userrec* user, Command* CommandObj, const char** parameters, int pcnt, unsigned int splithere)
+int CommandParser::LoopCall(User* user, Command* CommandObj, const char** parameters, int pcnt, unsigned int splithere)
 {
        /* First check if we have more than one item in the list, if we don't we return zero here and the handler
         * which called us just carries on as it was.
@@ -209,7 +209,7 @@ int CommandParser::LoopCall(userrec* user, Command* CommandObj, const char** par
        return 1;
 }
 
-bool CommandParser::IsValidCommand(const std::string &commandname, int pcnt, userrec * user)
+bool CommandParser::IsValidCommand(const std::string &commandname, int pcnt, User * user)
 {
        Commandable::iterator n = cmdlist.find(commandname);
 
@@ -244,7 +244,7 @@ Command* CommandParser::GetHandler(const std::string &commandname)
 
 // calls a handler function for a command
 
-CmdResult CommandParser::CallHandler(const std::string &commandname,const char** parameters, int pcnt, userrec *user)
+CmdResult CommandParser::CallHandler(const std::string &commandname,const char** parameters, int pcnt, User *user)
 {
        Commandable::iterator n = cmdlist.find(commandname);
 
@@ -280,7 +280,7 @@ CmdResult CommandParser::CallHandler(const std::string &commandname,const char**
        return CMD_INVALID;
 }
 
-void CommandParser::ProcessCommand(userrec *user, std::string &cmd)
+void CommandParser::ProcessCommand(User *user, std::string &cmd)
 {
        const char *command_p[MAXPARAMETERS];
        int items = 0;
@@ -409,7 +409,7 @@ void CommandParser::RemoveCommand(Commandable::iterator safei, const char* sourc
        }
 }
 
-void CommandParser::ProcessBuffer(std::string &buffer,userrec *user)
+void CommandParser::ProcessBuffer(std::string &buffer,User *user)
 {
        std::string::size_type a;
 
@@ -470,7 +470,7 @@ bool CommandParser::FindSym(void** v, void* h, const std::string &name)
        return true;
 }
 
-bool CommandParser::ReloadCommand(const char* cmd, userrec* user)
+bool CommandParser::ReloadCommand(const char* cmd, User* user)
 {
        char filename[MAXBUF];
        char commandname[MAXBUF];
@@ -511,7 +511,7 @@ bool CommandParser::ReloadCommand(const char* cmd, userrec* user)
        return false;
 }
 
-CmdResult cmd_reload::Handle(const char** parameters, int pcnt, userrec *user)
+CmdResult cmd_reload::Handle(const char** parameters, int pcnt, User *user)
 {
        user->WriteServ("NOTICE %s :*** Reloading command '%s'",user->nick, parameters[0]);
        if (ServerInstance->Parser->ReloadCommand(parameters[0], user))
@@ -558,7 +558,7 @@ const char* CommandParser::LoadCommand(const char* name)
        return NULL;
 }
 
-void CommandParser::SetupCommandTable(userrec* user)
+void CommandParser::SetupCommandTable(User* user)
 {
        RFCCommands.clear();
 
@@ -607,7 +607,7 @@ void CommandParser::SetupCommandTable(userrec* user)
 
 int CommandParser::TranslateUIDs(TranslateType to, const std::string &source, std::string &dest)
 {
-       userrec* user = NULL;
+       User* user = NULL;
        std::string item;
        int translations = 0;
 
index 7f74471c8b040c8d26e6b4f913c36ac1aa0e3bcd..edb8a529e28e6d6f34a73d194fe67f739199952a 100644 (file)
@@ -18,7 +18,7 @@
 
 /* All other ircds when doing this check usually just look for a string of *@* or *. We're smarter than that, though. */
 
-bool InspIRCd::HostMatchesEveryone(const std::string &mask, userrec* user)
+bool InspIRCd::HostMatchesEveryone(const std::string &mask, User* user)
 {
        char itrigger[MAXBUF];
        long matches = 0;
@@ -49,7 +49,7 @@ bool InspIRCd::HostMatchesEveryone(const std::string &mask, userrec* user)
        return false;
 }
 
-bool InspIRCd::IPMatchesEveryone(const std::string &ip, userrec* user)
+bool InspIRCd::IPMatchesEveryone(const std::string &ip, User* user)
 {
        char itrigger[MAXBUF];
        long matches = 0;
@@ -78,7 +78,7 @@ bool InspIRCd::IPMatchesEveryone(const std::string &ip, userrec* user)
        return false;
 }
 
-bool InspIRCd::NickMatchesEveryone(const std::string &nick, userrec* user)
+bool InspIRCd::NickMatchesEveryone(const std::string &nick, User* user)
 {
        char itrigger[MAXBUF];
        long matches = 0;
index daf1b04de526bbd8341e515a5b3b50fb01b0a49b..0bb4587b363cfec1eea33316774c36c2e1b08c69 100644 (file)
@@ -143,13 +143,13 @@ void ServerConfig::Update005()
        }
 }
 
-void ServerConfig::Send005(userrec* user)
+void ServerConfig::Send005(User* user)
 {
        for (std::vector<std::string>::iterator line = ServerInstance->Config->isupport.begin(); line != ServerInstance->Config->isupport.end(); line++)
                user->WriteServ("005 %s %s", user->nick, line->c_str());
 }
 
-bool ServerConfig::CheckOnce(char* tag, bool bail, userrec* user)
+bool ServerConfig::CheckOnce(char* tag, bool bail, User* user)
 {
        int count = ConfValueEnum(this->config_data, tag);
 
@@ -586,7 +586,7 @@ bool DoneMaxBans(ServerConfig* conf, const char* tag)
        return true;
 }
 
-void ServerConfig::ReportConfigError(const std::string &errormessage, bool bail, userrec* user)
+void ServerConfig::ReportConfigError(const std::string &errormessage, bool bail, User* user)
 {
        ServerInstance->Log(DEFAULT, "There were errors in your configuration file: %s", errormessage.c_str());
        if (bail)
@@ -625,7 +625,7 @@ void ServerConfig::ReportConfigError(const std::string &errormessage, bool bail,
        }
 }
 
-void ServerConfig::Read(bool bail, userrec* user)
+void ServerConfig::Read(bool bail, User* user)
 {
        static char debug[MAXBUF];      /* Temporary buffer for debugging value */
        static char maxkeep[MAXBUF];    /* Temporary buffer for WhoWasMaxKeep value */
index 0da622cb1f6a2ad168dd9acecbad2ca4225c92e0..188c3a8e6b99ec61d4d8d725cff6863630830a2c 100644 (file)
@@ -14,7 +14,7 @@
 #include "inspircd.h"
 #include "cull_list.h"
 
-CullItem::CullItem(userrec* u, std::string &r, const char* o_reason)
+CullItem::CullItem(User* u, std::string &r, const char* o_reason)
 {
        this->user = u;
        this->reason = r;
@@ -26,7 +26,7 @@ CullItem::CullItem(userrec* u, std::string &r, const char* o_reason)
                this->oper_reason = r;
 }
 
-CullItem::CullItem(userrec* u, const char* r, const char* o_reason)
+CullItem::CullItem(User* u, const char* r, const char* o_reason)
 {
        this->user = u;
        this->reason = r;
@@ -52,7 +52,7 @@ CullItem::~CullItem()
 {
 }
 
-userrec* CullItem::GetUser()
+User* CullItem::GetUser()
 {
        return this->user;
 }
@@ -73,13 +73,13 @@ CullList::CullList(InspIRCd* Instance) : ServerInstance(Instance)
        exempt.clear();
 }
 
-void CullList::AddItem(userrec* user, std::string &reason, const char* o_reason)
+void CullList::AddItem(User* user, std::string &reason, const char* o_reason)
 {
        AddItem(user, reason.c_str(), o_reason);
 }
 
 
-void CullList::AddItem(userrec* user, const char* reason, const char* o_reason)
+void CullList::AddItem(User* user, const char* reason, const char* o_reason)
 {
        if (exempt.find(user) == exempt.end())
        {
@@ -89,7 +89,7 @@ void CullList::AddItem(userrec* user, const char* reason, const char* o_reason)
        }
 }
 
-void CullList::MakeSilent(userrec* user)
+void CullList::MakeSilent(User* user)
 {
        for (std::vector<CullItem>::iterator a = list.begin(); a != list.end(); ++a)
        {
@@ -110,7 +110,7 @@ int CullList::Apply()
                std::vector<CullItem>::iterator a = list.begin();
 
                user_hash::iterator iter = ServerInstance->clientlist->find(a->GetUser()->nick);
-               std::map<userrec*, userrec*>::iterator exemptiter = exempt.find(a->GetUser());
+               std::map<User*, User*>::iterator exemptiter = exempt.find(a->GetUser());
                const char* preset_reason = a->GetUser()->GetOperQuit();
                std::string reason = a->GetReason();
                std::string oper_reason = *preset_reason ? preset_reason : a->GetOperReason();
@@ -184,7 +184,7 @@ int CullList::Apply()
                {
                        if (IS_LOCAL(a->GetUser()))
                        {
-                               std::vector<userrec*>::iterator x = find(ServerInstance->local_users.begin(),ServerInstance->local_users.end(),a->GetUser());
+                               std::vector<User*>::iterator x = find(ServerInstance->local_users.begin(),ServerInstance->local_users.end(),a->GetUser());
                                if (x != ServerInstance->local_users.end())
                                        ServerInstance->local_users.erase(x);
                        }
index 1cad143c510c207479f56a3ab631f9cb8d73c39f..a90dd01050063f5d83605c5cf326f65bfd29e968 100644 (file)
@@ -114,9 +114,9 @@ void InspIRCd::WriteOpers(const char* text, ...)
 
 void InspIRCd::WriteOpers(const std::string &text)
 {
-       for (std::list<userrec*>::iterator i = this->all_opers.begin(); i != this->all_opers.end(); i++)
+       for (std::list<User*>::iterator i = this->all_opers.begin(); i != this->all_opers.end(); i++)
        {
-               userrec* a = *i;
+               User* a = *i;
                if (IS_LOCAL(a) && a->IsModeSet('s'))
                {
                        // send server notices to all with +s
@@ -139,9 +139,9 @@ void InspIRCd::ServerNoticeAll(char* text, ...)
 
        snprintf(formatbuffer,MAXBUF,"NOTICE $%s :%s",Config->ServerName,textbuffer);
 
-       for (std::vector<userrec*>::const_iterator i = local_users.begin(); i != local_users.end(); i++)
+       for (std::vector<User*>::const_iterator i = local_users.begin(); i != local_users.end(); i++)
        {
-               userrec* t = *i;
+               User* t = *i;
                t->WriteServ(std::string(formatbuffer));
        }
 }
@@ -160,9 +160,9 @@ void InspIRCd::ServerPrivmsgAll(char* text, ...)
 
        snprintf(formatbuffer,MAXBUF,"PRIVMSG $%s :%s",Config->ServerName,textbuffer);
 
-       for (std::vector<userrec*>::const_iterator i = local_users.begin(); i != local_users.end(); i++)
+       for (std::vector<User*>::const_iterator i = local_users.begin(); i != local_users.end(); i++)
        {
-               userrec* t = *i;
+               User* t = *i;
                t->WriteServ(std::string(formatbuffer));
        }
 }
@@ -186,9 +186,9 @@ void InspIRCd::WriteMode(const char* modes, int flags, const char* text, ...)
 
        if (flags == WM_AND)
        {
-               for (std::vector<userrec*>::const_iterator i = local_users.begin(); i != local_users.end(); i++)
+               for (std::vector<User*>::const_iterator i = local_users.begin(); i != local_users.end(); i++)
                {
-                       userrec* t = *i;
+                       User* t = *i;
                        bool send_to_user = true;
 
                        for (int n = 0; n < modelen; n++)
@@ -207,9 +207,9 @@ void InspIRCd::WriteMode(const char* modes, int flags, const char* text, ...)
        }
        else if (flags == WM_OR)
        {
-               for (std::vector<userrec*>::const_iterator i = local_users.begin(); i != local_users.end(); i++)
+               for (std::vector<User*>::const_iterator i = local_users.begin(); i != local_users.end(); i++)
                {
-                       userrec* t = *i;
+                       User* t = *i;
                        bool send_to_user = false;
 
                        for (int n = 0; n < modelen; n++)
@@ -230,7 +230,7 @@ void InspIRCd::WriteMode(const char* modes, int flags, const char* text, ...)
 }
 
 /* Find a user record by nickname and return a pointer to it */
-userrec* InspIRCd::FindNick(const std::string &nick)
+User* InspIRCd::FindNick(const std::string &nick)
 {
        if (!nick.empty() && isdigit(*nick.begin()))
                return FindUUID(nick);
@@ -244,7 +244,7 @@ userrec* InspIRCd::FindNick(const std::string &nick)
        return iter->second;
 }
 
-userrec* InspIRCd::FindNick(const char* nick)
+User* InspIRCd::FindNick(const char* nick)
 {
        if (isdigit(*nick))
                return FindUUID(nick);
@@ -257,7 +257,7 @@ userrec* InspIRCd::FindNick(const char* nick)
        return iter->second;
 }
 
-userrec* InspIRCd::FindNickOnly(const std::string &nick)
+User* InspIRCd::FindNickOnly(const std::string &nick)
 {
        user_hash::iterator iter = clientlist->find(nick);
 
@@ -267,7 +267,7 @@ userrec* InspIRCd::FindNickOnly(const std::string &nick)
        return iter->second;
 }
 
-userrec* InspIRCd::FindNickOnly(const char* nick)
+User* InspIRCd::FindNickOnly(const char* nick)
 {
        user_hash::iterator iter = clientlist->find(nick);
 
@@ -277,12 +277,12 @@ userrec* InspIRCd::FindNickOnly(const char* nick)
        return iter->second;
 }
 
-userrec *InspIRCd::FindUUID(const std::string &uid)
+User *InspIRCd::FindUUID(const std::string &uid)
 {
        return FindUUID(uid.c_str());
 }
 
-userrec *InspIRCd::FindUUID(const char *uid)
+User *InspIRCd::FindUUID(const char *uid)
 {
        user_hash::iterator finduuid = uuidlist->find(uid);
 
@@ -293,7 +293,7 @@ userrec *InspIRCd::FindUUID(const char *uid)
 }
 
 /* find a channel record by channel name and return a pointer to it */
-chanrec* InspIRCd::FindChan(const char* chan)
+Channel* InspIRCd::FindChan(const char* chan)
 {
        chan_hash::iterator iter = chanlist->find(chan);
 
@@ -304,7 +304,7 @@ chanrec* InspIRCd::FindChan(const char* chan)
        return iter->second;
 }
 
-chanrec* InspIRCd::FindChan(const std::string &chan)
+Channel* InspIRCd::FindChan(const std::string &chan)
 {
        chan_hash::iterator iter = chanlist->find(chan);
 
@@ -318,7 +318,7 @@ chanrec* InspIRCd::FindChan(const std::string &chan)
 /* Send an error notice to all users, registered or not */
 void InspIRCd::SendError(const std::string &s)
 {
-       for (std::vector<userrec*>::const_iterator i = this->local_users.begin(); i != this->local_users.end(); i++)
+       for (std::vector<User*>::const_iterator i = this->local_users.begin(); i != this->local_users.end(); i++)
        {
                if ((*i)->registered == REG_ALL)
                {
@@ -527,7 +527,7 @@ void InspIRCd::CheckDie()
        }
 }
 
-void InspIRCd::SendWhoisLine(userrec* user, userrec* dest, int numeric, const std::string &text)
+void InspIRCd::SendWhoisLine(User* user, User* dest, int numeric, const std::string &text)
 {
        std::string copy_text = text;
 
@@ -538,7 +538,7 @@ void InspIRCd::SendWhoisLine(userrec* user, userrec* dest, int numeric, const st
                user->WriteServ("%d %s", numeric, copy_text.c_str());
 }
 
-void InspIRCd::SendWhoisLine(userrec* user, userrec* dest, int numeric, const char* format, ...)
+void InspIRCd::SendWhoisLine(User* user, User* dest, int numeric, const char* format, ...)
 {
        char textbuffer[MAXBUF];
        va_list argsPtr;
index cf062e397634cd8cb401c00fe751177a550ac95a..d1693881837775eebd5a97ff36b19f9159c64b3c 100644 (file)
@@ -82,7 +82,7 @@ void InspIRCd::Cleanup()
        }
 
        /* Close all client sockets, or the new process inherits them */
-       for (std::vector<userrec*>::const_iterator i = this->local_users.begin(); i != this->local_users.end(); i++)
+       for (std::vector<User*>::const_iterator i = this->local_users.begin(); i != this->local_users.end(); i++)
        {
                (*i)->SetWriteError("Server shutdown");
                (*i)->CloseSocket();
@@ -463,7 +463,7 @@ InspIRCd::InspIRCd(int argc, char** argv)
        this->InitialiseUID();
 
        /* set up fake client */
-       this->FakeClient = new userrec(this);
+       this->FakeClient = new User(this);
        this->FakeClient->SetFd(FD_MAGIC_NUMBER);
 
        if (!do_root)
@@ -721,7 +721,7 @@ int main(int argc, char** argv)
  * (until this returns true, a user will block in the waiting state, waiting to connect up to the
  * registration timeout maximum seconds)
  */
-bool InspIRCd::AllModulesReportReady(userrec* user)
+bool InspIRCd::AllModulesReportReady(User* user)
 {
        if (!Config->global_implementation[I_OnCheckReady])
                return true;
@@ -753,7 +753,7 @@ int InspIRCd::SetTimeDelta(int delta)
        return old;
 }
 
-void InspIRCd::AddLocalClone(userrec* user)
+void InspIRCd::AddLocalClone(User* user)
 {
        clonemap::iterator x = local_clones.find(user->GetIPString());
        if (x != local_clones.end())
@@ -762,7 +762,7 @@ void InspIRCd::AddLocalClone(userrec* user)
                local_clones[user->GetIPString()] = 1;
 }
 
-void InspIRCd::AddGlobalClone(userrec* user)
+void InspIRCd::AddGlobalClone(User* user)
 {
        clonemap::iterator y = global_clones.find(user->GetIPString());
        if (y != global_clones.end())
index acfd16da96bb185523100f92f03aec7d3b4a7feb..1f6cc08b9c5bb28e47665dfa56da72f07a4ee62b 100644 (file)
@@ -104,12 +104,12 @@ char ModeHandler::GetModeChar()
        return mode;
 }
 
-ModeAction ModeHandler::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ModeAction ModeHandler::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
 {
        return MODEACTION_DENY;
 }
 
-ModePair ModeHandler::ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter)
+ModePair ModeHandler::ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter)
 {
        if (dest)
        {
@@ -121,15 +121,15 @@ ModePair ModeHandler::ModeSet(userrec* source, userrec* dest, chanrec* channel,
        }
 }
 
-void ModeHandler::DisplayList(userrec* user, chanrec* channel)
+void ModeHandler::DisplayList(User* user, Channel* channel)
 {
 }
 
-void ModeHandler::DisplayEmptyList(userrec* user, chanrec* channel)
+void ModeHandler::DisplayEmptyList(User* user, Channel* channel)
 {
 }
 
-bool ModeHandler::CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, chanrec* channel)
+bool ModeHandler::CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, Channel* channel)
 {
        return (ours < theirs);
 }
@@ -152,18 +152,18 @@ ModeType ModeWatcher::GetModeType()
        return m_type;
 }
 
-bool ModeWatcher::BeforeMode(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding, ModeType type)
+bool ModeWatcher::BeforeMode(User* source, User* dest, Channel* channel, std::string &parameter, bool adding, ModeType type)
 {
        return true;
 }
 
-void ModeWatcher::AfterMode(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter, bool adding, ModeType type)
+void ModeWatcher::AfterMode(User* source, User* dest, Channel* channel, const std::string &parameter, bool adding, ModeType type)
 {
 }
 
-userrec* ModeParser::SanityChecks(userrec *user,const char *dest,chanrec *chan,int status)
+User* ModeParser::SanityChecks(User *user,const char *dest,Channel *chan,int status)
 {
-       userrec *d;
+       User *d;
        if ((!user) || (!dest) || (!chan) || (!*dest))
        {
                return NULL;
@@ -177,7 +177,7 @@ userrec* ModeParser::SanityChecks(userrec *user,const char *dest,chanrec *chan,i
        return d;
 }
 
-const char* ModeParser::Grant(userrec *d,chanrec *chan,int MASK)
+const char* ModeParser::Grant(User *d,Channel *chan,int MASK)
 {
        if (!chan)
                return "";
@@ -207,7 +207,7 @@ const char* ModeParser::Grant(userrec *d,chanrec *chan,int MASK)
        return "";
 }
 
-const char* ModeParser::Revoke(userrec *d,chanrec *chan,int MASK)
+const char* ModeParser::Revoke(User *d,Channel *chan,int MASK)
 {
        if (!chan)
                return "";
@@ -237,7 +237,7 @@ const char* ModeParser::Revoke(userrec *d,chanrec *chan,int MASK)
        return "";
 }
 
-void ModeParser::DisplayCurrentModes(userrec *user, userrec* targetuser, chanrec* targetchannel, const char* text)
+void ModeParser::DisplayCurrentModes(User *user, User* targetuser, Channel* targetchannel, const char* text)
 {
        if (targetchannel)
        {
@@ -274,13 +274,13 @@ void ModeParser::DisplayCurrentModes(userrec *user, userrec* targetuser, chanrec
        return;
 }
 
-void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool servermode)
+void ModeParser::Process(const char** parameters, int pcnt, User *user, bool servermode)
 {
        std::string target = parameters[0];
        ModeType type = MODETYPE_USER;
        unsigned char mask = 0;
-       chanrec* targetchannel = ServerInstance->FindChan(parameters[0]);
-       userrec* targetuser  = ServerInstance->FindNick(parameters[0]);
+       Channel* targetchannel = ServerInstance->FindChan(parameters[0]);
+       User* targetuser  = ServerInstance->FindNick(parameters[0]);
 
        LastParse.clear();
 
@@ -577,7 +577,7 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool
                                                                        /* Does this mode have a prefix? */
                                                                        if (modehandlers[handler_id]->GetPrefix() && targetchannel)
                                                                        {
-                                                                               userrec* user_to_prefix = ServerInstance->FindNick(parameter);
+                                                                               User* user_to_prefix = ServerInstance->FindNick(parameter);
                                                                                if (user_to_prefix)
                                                                                        targetchannel->SetPrefix(user_to_prefix, modehandlers[handler_id]->GetPrefix(),
                                                                                                        modehandlers[handler_id]->GetPrefixRank(), adding);
@@ -833,7 +833,7 @@ ModeHandler* ModeParser::FindPrefix(unsigned const char pfxletter)
        return NULL;
 }
 
-std::string ModeParser::ModeString(userrec* user, chanrec* channel)
+std::string ModeParser::ModeString(User* user, Channel* channel)
 {
        std::string types;
        std::string pars;
@@ -996,7 +996,7 @@ bool ModeParser::DelModeWatcher(ModeWatcher* mw)
 
 /** This default implementation can remove simple user modes
  */
-void ModeHandler::RemoveMode(userrec* user)
+void ModeHandler::RemoveMode(User* user)
 {
        char moderemove[MAXBUF];
        const char* parameters[] = { user->nick, moderemove };
@@ -1011,7 +1011,7 @@ void ModeHandler::RemoveMode(userrec* user)
 /** This default implementation can remove simple channel modes
  * (no parameters)
  */
-void ModeHandler::RemoveMode(chanrec* channel)
+void ModeHandler::RemoveMode(Channel* channel)
 {
        char moderemove[MAXBUF];
        const char* parameters[] = { channel->name, moderemove };
index 1c6fe3fa5968b6ef6ae5c9dd286b09fc7a764b86..4192a95cef61f74103fa74912073735fc0048708 100644 (file)
@@ -29,7 +29,7 @@ ModeChannelBan::ModeChannelBan(InspIRCd* Instance) : ModeHandler(Instance, 'b',
 {
 }
 
-ModeAction ModeChannelBan::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ModeAction ModeChannelBan::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
 {
        int status = channel->GetStatus(source);
        /* Call the correct method depending on wether we're adding or removing the mode */
@@ -49,7 +49,7 @@ ModeAction ModeChannelBan::OnModeChange(userrec* source, userrec* dest, chanrec*
        return MODEACTION_ALLOW;
 }
 
-void ModeChannelBan::RemoveMode(chanrec* channel)
+void ModeChannelBan::RemoveMode(Channel* channel)
 {
        BanList copy;
        char moderemove[MAXBUF];
@@ -67,11 +67,11 @@ void ModeChannelBan::RemoveMode(chanrec* channel)
        }
 }
 
-void ModeChannelBan::RemoveMode(userrec* user)
+void ModeChannelBan::RemoveMode(User* user)
 {
 }
 
-void ModeChannelBan::DisplayList(userrec* user, chanrec* channel)
+void ModeChannelBan::DisplayList(User* user, Channel* channel)
 {
        /* Display the channel banlist */
        for (BanList::reverse_iterator i = channel->bans.rbegin(); i != channel->bans.rend(); ++i)
@@ -82,12 +82,12 @@ void ModeChannelBan::DisplayList(userrec* user, chanrec* channel)
        return;
 }
 
-void ModeChannelBan::DisplayEmptyList(userrec* user, chanrec* channel)
+void ModeChannelBan::DisplayEmptyList(User* user, Channel* channel)
 {
        user->WriteServ("368 %s %s :End of channel ban list",user->nick, channel->name);
 }
 
-std::string& ModeChannelBan::AddBan(userrec *user,std::string &dest,chanrec *chan,int status)
+std::string& ModeChannelBan::AddBan(User *user,std::string &dest,Channel *chan,int status)
 {
        if ((!user) || (!chan))
        {
@@ -142,7 +142,7 @@ std::string& ModeChannelBan::AddBan(userrec *user,std::string &dest,chanrec *cha
        return dest;
 }
 
-ModePair ModeChannelBan::ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter)
+ModePair ModeChannelBan::ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter)
 {
        for (BanList::iterator i = channel->bans.begin(); i != channel->bans.end(); i++)
        {
@@ -154,7 +154,7 @@ ModePair ModeChannelBan::ModeSet(userrec* source, userrec* dest, chanrec* channe
         return std::make_pair(false, parameter);
 }
 
-std::string& ModeChannelBan::DelBan(userrec *user,std::string& dest,chanrec *chan,int status)
+std::string& ModeChannelBan::DelBan(User *user,std::string& dest,Channel *chan,int status)
 {
        if ((!user) || (!chan))
        {
index 831ec809c15fe7bc290f0d88b4e53c9ca3086b68..98187b08923ba3c01476c9bd94739753e1e334e1 100644 (file)
@@ -28,9 +28,9 @@ unsigned int ModeChannelHalfOp::GetPrefixRank()
        return HALFOP_VALUE;
 }
 
-ModePair ModeChannelHalfOp::ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter)
+ModePair ModeChannelHalfOp::ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter)
 {
-       userrec* x = ServerInstance->FindNick(parameter);
+       User* x = ServerInstance->FindNick(parameter);
        if (x)
        {
                if (channel->GetStatusFlags(x) & UCMODE_HOP)
@@ -45,7 +45,7 @@ ModePair ModeChannelHalfOp::ModeSet(userrec* source, userrec* dest, chanrec* cha
        return std::make_pair(false, parameter);
 }
 
-void ModeChannelHalfOp::RemoveMode(chanrec* channel)
+void ModeChannelHalfOp::RemoveMode(Channel* channel)
 {
        CUList* list = channel->GetHalfoppedUsers();
        CUList copy;
@@ -53,7 +53,7 @@ void ModeChannelHalfOp::RemoveMode(chanrec* channel)
 
        for (CUList::iterator i = list->begin(); i != list->end(); i++)
        {
-               userrec* n = i->first;
+               User* n = i->first;
                copy.insert(std::make_pair(n,n->nick));
        }
 
@@ -66,11 +66,11 @@ void ModeChannelHalfOp::RemoveMode(chanrec* channel)
 
 }
 
-void ModeChannelHalfOp::RemoveMode(userrec* user)
+void ModeChannelHalfOp::RemoveMode(User* user)
 {
 }
 
-ModeAction ModeChannelHalfOp::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ModeAction ModeChannelHalfOp::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
 {
        /* If halfops are not enabled in the conf, we don't execute
         * anything in this class at all.
@@ -103,9 +103,9 @@ ModeAction ModeChannelHalfOp::OnModeChange(userrec* source, userrec* dest, chanr
                return MODEACTION_DENY;
 }
 
-std::string ModeChannelHalfOp::AddHalfOp(userrec *user,const char* dest,chanrec *chan,int status)
+std::string ModeChannelHalfOp::AddHalfOp(User *user,const char* dest,Channel *chan,int status)
 {
-       userrec *d = ServerInstance->Modes->SanityChecks(user,dest,chan,status);
+       User *d = ServerInstance->Modes->SanityChecks(user,dest,chan,status);
 
        if (d)
        {
@@ -131,9 +131,9 @@ std::string ModeChannelHalfOp::AddHalfOp(userrec *user,const char* dest,chanrec
        return "";
 }
 
-std::string ModeChannelHalfOp::DelHalfOp(userrec *user,const char *dest,chanrec *chan,int status)
+std::string ModeChannelHalfOp::DelHalfOp(User *user,const char *dest,Channel *chan,int status)
 {
-       userrec *d = ServerInstance->Modes->SanityChecks(user,dest,chan,status);
+       User *d = ServerInstance->Modes->SanityChecks(user,dest,chan,status);
 
        if (d)
        {
index 12bdb18b815c7010c8174d649a6f6dfa968c493d..550ea24d16494032b1ec6b8b36ef00e95977253d 100644 (file)
@@ -21,7 +21,7 @@ ModeChannelInviteOnly::ModeChannelInviteOnly(InspIRCd* Instance) : ModeHandler(I
 {
 }
 
-ModeAction ModeChannelInviteOnly::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ModeAction ModeChannelInviteOnly::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
 {
        if (channel->modes[CM_INVITEONLY] != adding)
        {
index f6a29af35f68bd64056a85896c25950e79b6c496..34d8a64523762cd82068dc87efbf7598c2d726ae 100644 (file)
@@ -21,7 +21,7 @@ ModeChannelKey::ModeChannelKey(InspIRCd* Instance) : ModeHandler(Instance, 'k',
 {
 }
 
-ModePair ModeChannelKey::ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter)
+ModePair ModeChannelKey::ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter)
 {       
         if (channel->modes[CM_KEY])
         {
@@ -33,7 +33,7 @@ ModePair ModeChannelKey::ModeSet(userrec* source, userrec* dest, chanrec* channe
         }
 }
 
-void ModeChannelKey::RemoveMode(chanrec* channel)
+void ModeChannelKey::RemoveMode(Channel* channel)
 {
        /** +k needs a parameter when being removed,
         * so we have a special-case RemoveMode here for it
@@ -48,17 +48,17 @@ void ModeChannelKey::RemoveMode(chanrec* channel)
        }
 }
 
-void ModeChannelKey::RemoveMode(userrec* user)
+void ModeChannelKey::RemoveMode(User* user)
 {
 }
 
-bool ModeChannelKey::CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, chanrec* channel)
+bool ModeChannelKey::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 channel key wins */
        return (their_param < our_param);
 }
 
-ModeAction ModeChannelKey::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ModeAction ModeChannelKey::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
 {
        if ((channel->modes[CM_KEY] != adding) || (!IS_LOCAL(source)))
        {
index 1a57a440d30cb0cd3ba97cc097cd72a80a94f115..50ee2868385a4d54b3211549480970b2eceb8562 100644 (file)
@@ -21,7 +21,7 @@ ModeChannelLimit::ModeChannelLimit(InspIRCd* Instance) : ModeHandler(Instance, '
 {
 }
 
-ModePair ModeChannelLimit::ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter)
+ModePair ModeChannelLimit::ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter)
 {
        if (channel->limit)
        {
@@ -33,13 +33,13 @@ ModePair ModeChannelLimit::ModeSet(userrec* source, userrec* dest, chanrec* chan
        }
 }
 
-bool ModeChannelLimit::CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, chanrec* channel)
+bool ModeChannelLimit::CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, Channel* channel)
 {
        /* When TS is equal, the higher channel limit wins */
        return (atoi(their_param.c_str()) < atoi(our_param.c_str()));
 }
 
-ModeAction ModeChannelLimit::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ModeAction ModeChannelLimit::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
 {
        if (adding)
        {
index 520248fdab7e93e074378216b7099b1a8c1428a8..ad17d5d30f632be02dbd7e20f5d8e1d0f37fe054 100644 (file)
@@ -21,7 +21,7 @@ ModeChannelModerated::ModeChannelModerated(InspIRCd* Instance) : ModeHandler(Ins
 {
 }
 
-ModeAction ModeChannelModerated::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ModeAction ModeChannelModerated::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
 {
        if (channel->modes[CM_MODERATED] != adding)
        {
index ddc2e1bbd219a7557bb4c992b1b7112ad3b11289..1bad2f92f29ac8691c3067cabdc058834bdab88d 100644 (file)
@@ -21,7 +21,7 @@ ModeChannelNoExternal::ModeChannelNoExternal(InspIRCd* Instance) : ModeHandler(I
 {
 }
 
-ModeAction ModeChannelNoExternal::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ModeAction ModeChannelNoExternal::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
 {
        if (channel->modes[CM_NOEXTERNAL] != adding)
        {
index 27bc621009bc8e0686806aa0d19ecbb5b18f1e58..a43eaeac9c59a5a65fc530c0a0e02e7437358774 100644 (file)
@@ -28,9 +28,9 @@ unsigned int ModeChannelOp::GetPrefixRank()
        return OP_VALUE;
 }
 
-ModePair ModeChannelOp::ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter)
+ModePair ModeChannelOp::ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter)
 {
-       userrec* x = ServerInstance->FindNick(parameter);
+       User* x = ServerInstance->FindNick(parameter);
        if (x)
        {
                if (channel->GetStatusFlags(x) & UCMODE_OP)
@@ -46,7 +46,7 @@ ModePair ModeChannelOp::ModeSet(userrec* source, userrec* dest, chanrec* channel
 }
 
 
-void ModeChannelOp::RemoveMode(chanrec* channel)
+void ModeChannelOp::RemoveMode(Channel* channel)
 {
        CUList* list = channel->GetOppedUsers();
        CUList copy;
@@ -54,7 +54,7 @@ void ModeChannelOp::RemoveMode(chanrec* channel)
 
        for (CUList::iterator i = list->begin(); i != list->end(); i++)
        {
-               userrec* n = i->first;
+               User* n = i->first;
                copy.insert(std::make_pair(n,n->nick));
        }
 
@@ -66,11 +66,11 @@ void ModeChannelOp::RemoveMode(chanrec* channel)
        }
 }
 
-void ModeChannelOp::RemoveMode(userrec* user)
+void ModeChannelOp::RemoveMode(User* user)
 {
 }
 
-ModeAction ModeChannelOp::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ModeAction ModeChannelOp::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
 {
        int status = channel->GetStatus(source);
 
@@ -94,9 +94,9 @@ ModeAction ModeChannelOp::OnModeChange(userrec* source, userrec* dest, chanrec*
                return MODEACTION_DENY;
 }
 
-std::string ModeChannelOp::AddOp(userrec *user,const char* dest,chanrec *chan,int status)
+std::string ModeChannelOp::AddOp(User *user,const char* dest,Channel *chan,int status)
 {
-       userrec *d = ServerInstance->Modes->SanityChecks(user,dest,chan,status);
+       User *d = ServerInstance->Modes->SanityChecks(user,dest,chan,status);
 
        if (d)
        {
@@ -122,9 +122,9 @@ std::string ModeChannelOp::AddOp(userrec *user,const char* dest,chanrec *chan,in
        return "";
 }
 
-std::string ModeChannelOp::DelOp(userrec *user,const char *dest,chanrec *chan,int status)
+std::string ModeChannelOp::DelOp(User *user,const char *dest,Channel *chan,int status)
 {
-       userrec *d = ServerInstance->Modes->SanityChecks(user,dest,chan,status);
+       User *d = ServerInstance->Modes->SanityChecks(user,dest,chan,status);
 
        if (d)
        {
index 15c33222e155a653ba1b13277b3e309cfa922fe6..c9749dc38019ee172d8f3e11319c70cb74faebb2 100644 (file)
@@ -21,7 +21,7 @@ ModeChannelPrivate::ModeChannelPrivate(InspIRCd* Instance) : ModeHandler(Instanc
 {
 }
 
-ModeAction ModeChannelPrivate::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ModeAction ModeChannelPrivate::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
 {
        if (channel->modes[CM_PRIVATE] != adding)
        {
index 135291592c7bc2cce4dccfbec2b44ec26343aafa..47e66d13978df4ba5db43c97621c9ae0d59d3d11 100644 (file)
@@ -21,7 +21,7 @@ ModeChannelSecret::ModeChannelSecret(InspIRCd* Instance) : ModeHandler(Instance,
 {
 }
 
-ModeAction ModeChannelSecret::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ModeAction ModeChannelSecret::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
 {
        if (channel->modes[CM_SECRET] != adding)
        {
index 2a6c06b42ec2091171062c95416bf1097bec035d..7124ecec44d9240570b976a0838a02c458cdc343 100644 (file)
@@ -21,7 +21,7 @@ ModeChannelTopicOps::ModeChannelTopicOps(InspIRCd* Instance) : ModeHandler(Insta
 {
 }
 
-ModeAction ModeChannelTopicOps::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ModeAction ModeChannelTopicOps::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
 {
        if (channel->modes[CM_TOPICLOCK] != adding)
        {
index 0ea887073392e22254e7291f4f921c26a55614c6..b472cb1fcd39abb2ee19734603566b95a2ecc863 100644 (file)
@@ -28,9 +28,9 @@ unsigned int ModeChannelVoice::GetPrefixRank()
        return VOICE_VALUE;
 }
 
-ModePair ModeChannelVoice::ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter)
+ModePair ModeChannelVoice::ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter)
 {
-       userrec* x = ServerInstance->FindNick(parameter);
+       User* x = ServerInstance->FindNick(parameter);
        if (x)
        {
                if (channel->GetStatusFlags(x) & UCMODE_VOICE)
@@ -45,7 +45,7 @@ ModePair ModeChannelVoice::ModeSet(userrec* source, userrec* dest, chanrec* chan
        return std::make_pair(false, parameter);
 }
 
-void ModeChannelVoice::RemoveMode(chanrec* channel)
+void ModeChannelVoice::RemoveMode(Channel* channel)
 {
        CUList* list = channel->GetVoicedUsers();
        CUList copy;
@@ -53,7 +53,7 @@ void ModeChannelVoice::RemoveMode(chanrec* channel)
 
        for (CUList::iterator i = list->begin(); i != list->end(); i++)
        {
-               userrec* n = i->first;
+               User* n = i->first;
                copy.insert(std::make_pair(n,n->nick));
        }
 
@@ -65,11 +65,11 @@ void ModeChannelVoice::RemoveMode(chanrec* channel)
        }
 }
 
-void ModeChannelVoice::RemoveMode(userrec* user)
+void ModeChannelVoice::RemoveMode(User* user)
 {
 }
 
-ModeAction ModeChannelVoice::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ModeAction ModeChannelVoice::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
 {
        int status = channel->GetStatus(source);
 
@@ -93,9 +93,9 @@ ModeAction ModeChannelVoice::OnModeChange(userrec* source, userrec* dest, chanre
                return MODEACTION_DENY;
 }
 
-std::string ModeChannelVoice::AddVoice(userrec *user,const char* dest,chanrec *chan,int status)
+std::string ModeChannelVoice::AddVoice(User *user,const char* dest,Channel *chan,int status)
 {
-       userrec *d = ServerInstance->Modes->SanityChecks(user,dest,chan,status);
+       User *d = ServerInstance->Modes->SanityChecks(user,dest,chan,status);
 
        if (d)
        {
@@ -121,9 +121,9 @@ std::string ModeChannelVoice::AddVoice(userrec *user,const char* dest,chanrec *c
        return "";
 }
 
-std::string ModeChannelVoice::DelVoice(userrec *user,const char *dest,chanrec *chan,int status)
+std::string ModeChannelVoice::DelVoice(User *user,const char *dest,Channel *chan,int status)
 {
-       userrec *d = ServerInstance->Modes->SanityChecks(user,dest,chan,status);
+       User *d = ServerInstance->Modes->SanityChecks(user,dest,chan,status);
 
        if (d)
        {
index a599f8f6f4b22a00ec93aa823b00548d8dcd07f5..e6a142459dba6d9f6c05adf4d08f6cfe4f7939bc 100644 (file)
@@ -21,7 +21,7 @@ ModeUserInvisible::ModeUserInvisible(InspIRCd* Instance) : ModeHandler(Instance,
 {
 }
 
-ModeAction ModeUserInvisible::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ModeAction ModeUserInvisible::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
 {
        /* Only opers can change other users modes */
        if ((source != dest) && (!*source->oper))
index c9c9e312ef309f0b52beb62cab292df33db3354e..0ffffac10664fd4e6e808f792edea38aec716504 100644 (file)
@@ -21,7 +21,7 @@ ModeUserServerNoticeMask::ModeUserServerNoticeMask(InspIRCd* Instance) : ModeHan
 {
 }
 
-ModeAction ModeUserServerNoticeMask::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ModeAction ModeUserServerNoticeMask::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
 {
        /* Only opers can change other users modes */
        if ((source != dest) && (!*source->oper))
index 30ed089f6e0cf38c0ae566cf1217c9776a891058..2415a940a150bf68c1208e69dc444106685e90b0 100644 (file)
@@ -21,7 +21,7 @@ ModeUserOperator::ModeUserOperator(InspIRCd* Instance) : ModeHandler(Instance, '
 {
 }
 
-ModeAction ModeUserOperator::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ModeAction ModeUserOperator::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
 {
        /* Only opers can execute this class at all */
        if (!*source->oper)
@@ -35,7 +35,7 @@ ModeAction ModeUserOperator::OnModeChange(userrec* source, userrec* dest, chanre
         * Note that oper status is only given in cmd_oper.cpp
         * NOT here. It is impossible to directly set +o without
         * verifying as an oper and getting an opertype assigned
-        * to your userrec!
+        * to your User!
         */
        ServerInstance->SNO->WriteToSnoMask('o', "User %s de-opered (by %s)", dest->nick, source->nick);
        dest->UnOper();
index faf6348de6136900694f30fd41d403f4a977892c..01e57da5befc6bd64bf917a2c356642f219e65fb 100644 (file)
@@ -21,7 +21,7 @@ ModeUserServerNotice::ModeUserServerNotice(InspIRCd* Instance) : ModeHandler(Ins
 {
 }
 
-ModeAction ModeUserServerNotice::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ModeAction ModeUserServerNotice::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
 {
        /* Only opers can change other users modes */
        if ((source != dest) && (!*source->oper))
index 3f1cd90c8b402292592f08659c6c9ad40a13ed3f..914327cbdec8a1ee9bca63d24d6bb341ba245d1b 100644 (file)
@@ -21,7 +21,7 @@ ModeUserWallops::ModeUserWallops(InspIRCd* Instance) : ModeHandler(Instance, 'w'
 {
 }
 
-ModeAction ModeUserWallops::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ModeAction ModeUserWallops::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
 {
        /* Only opers can change other users modes */
        if ((source != dest) && (!*source->oper))
index b95dcd59df9d649846a4df55ded5b23c465784f5..8da123b05518a39cfca58856af6452869eaa97c2 100644 (file)
@@ -104,96 +104,96 @@ std::string Event::GetEventID()
 
                Module::Module(InspIRCd* Me) : ServerInstance(Me) { }
                Module::~Module() { }
-void           Module::OnUserConnect(userrec* user) { }
-void           Module::OnUserQuit(userrec* user, const std::string& message, const std::string &oper_message) { }
-void           Module::OnUserDisconnect(userrec* user) { }
-void           Module::OnUserJoin(userrec* user, chanrec* channel, bool &silent) { }
-void           Module::OnPostJoin(userrec* user, chanrec* channel) { }
-void           Module::OnUserPart(userrec* user, chanrec* channel, const std::string &partmessage, bool &silent) { }
-void           Module::OnRehash(userrec* user, const std::string &parameter) { }
-void           Module::OnServerRaw(std::string &raw, bool inbound, userrec* user) { }
-int            Module::OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs) { return 0; }
-void           Module::OnMode(userrec* user, void* dest, int target_type, const std::string &text) { }
+void           Module::OnUserConnect(User* user) { }
+void           Module::OnUserQuit(User* user, const std::string& message, const std::string &oper_message) { }
+void           Module::OnUserDisconnect(User* user) { }
+void           Module::OnUserJoin(User* user, Channel* channel, bool &silent) { }
+void           Module::OnPostJoin(User* user, Channel* channel) { }
+void           Module::OnUserPart(User* user, Channel* channel, const std::string &partmessage, bool &silent) { }
+void           Module::OnRehash(User* user, const std::string &parameter) { }
+void           Module::OnServerRaw(std::string &raw, bool inbound, User* user) { }
+int            Module::OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs) { return 0; }
+void           Module::OnMode(User* user, void* dest, int target_type, const std::string &text) { }
 Version                Module::GetVersion() { return Version(1,0,0,0,VF_VENDOR,-1); }
-void           Module::OnOper(userrec* user, const std::string &opertype) { }
-void           Module::OnPostOper(userrec* user, const std::string &opertype) { }
-void           Module::OnInfo(userrec* user) { }
-void           Module::OnWhois(userrec* source, userrec* dest) { }
-int            Module::OnUserPreInvite(userrec* source,userrec* dest,chanrec* channel) { return 0; }
-int            Module::OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text,char status, CUList &exempt_list) { return 0; }
-int            Module::OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text,char status, CUList &exempt_list) { return 0; }
-int            Module::OnUserPreNick(userrec* user, const std::string &newnick) { return 0; }
-void           Module::OnUserPostNick(userrec* user, const std::string &oldnick) { }
-int            Module::OnAccessCheck(userrec* source,userrec* dest,chanrec* channel,int access_type) { return ACR_DEFAULT; }
+void           Module::OnOper(User* user, const std::string &opertype) { }
+void           Module::OnPostOper(User* user, const std::string &opertype) { }
+void           Module::OnInfo(User* user) { }
+void           Module::OnWhois(User* source, User* dest) { }
+int            Module::OnUserPreInvite(User* source,User* dest,Channel* channel) { return 0; }
+int            Module::OnUserPreMessage(User* user,void* dest,int target_type, std::string &text,char status, CUList &exempt_list) { return 0; }
+int            Module::OnUserPreNotice(User* user,void* dest,int target_type, std::string &text,char status, CUList &exempt_list) { return 0; }
+int            Module::OnUserPreNick(User* user, const std::string &newnick) { return 0; }
+void           Module::OnUserPostNick(User* user, const std::string &oldnick) { }
+int            Module::OnAccessCheck(User* source,User* dest,Channel* channel,int access_type) { return ACR_DEFAULT; }
 void           Module::On005Numeric(std::string &output) { }
-int            Module::OnKill(userrec* source, userrec* dest, const std::string &reason) { return 0; }
+int            Module::OnKill(User* source, User* dest, const std::string &reason) { return 0; }
 void           Module::OnLoadModule(Module* mod,const std::string &name) { }
 void           Module::OnUnloadModule(Module* mod,const std::string &name) { }
 void           Module::OnBackgroundTimer(time_t curtime) { }
-int            Module::OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated, const std::string &original_line) { return 0; }
-void           Module::OnPostCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, CmdResult result, const std::string &original_line) { }
-bool           Module::OnCheckReady(userrec* user) { return true; }
-int            Module::OnUserRegister(userrec* user) { return 0; }
-int            Module::OnUserPreKick(userrec* source, userrec* user, chanrec* chan, const std::string &reason) { return 0; }
-void           Module::OnUserKick(userrec* source, userrec* user, chanrec* chan, const std::string &reason, bool &silent) { }
-int            Module::OnCheckInvite(userrec* user, chanrec* chan) { return 0; }
-int            Module::OnCheckKey(userrec* user, chanrec* chan, const std::string &keygiven) { return 0; }
-int            Module::OnCheckLimit(userrec* user, chanrec* chan) { return 0; }
-int            Module::OnCheckBan(userrec* user, chanrec* chan) { return 0; }
-int            Module::OnStats(char symbol, userrec* user, string_list &results) { return 0; }
-int            Module::OnChangeLocalUserHost(userrec* user, const std::string &newhost) { return 0; }
-int            Module::OnChangeLocalUserGECOS(userrec* user, const std::string &newhost) { return 0; }
-int            Module::OnLocalTopicChange(userrec* user, chanrec* chan, const std::string &topic) { return 0; }
+int            Module::OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line) { return 0; }
+void           Module::OnPostCommand(const std::string &command, const char** parameters, int pcnt, User *user, CmdResult result, const std::string &original_line) { }
+bool           Module::OnCheckReady(User* user) { return true; }
+int            Module::OnUserRegister(User* user) { return 0; }
+int            Module::OnUserPreKick(User* source, User* user, Channel* chan, const std::string &reason) { return 0; }
+void           Module::OnUserKick(User* source, User* user, Channel* chan, const std::string &reason, bool &silent) { }
+int            Module::OnCheckInvite(User* user, Channel* chan) { return 0; }
+int            Module::OnCheckKey(User* user, Channel* chan, const std::string &keygiven) { return 0; }
+int            Module::OnCheckLimit(User* user, Channel* chan) { return 0; }
+int            Module::OnCheckBan(User* user, Channel* chan) { return 0; }
+int            Module::OnStats(char symbol, User* user, string_list &results) { return 0; }
+int            Module::OnChangeLocalUserHost(User* user, const std::string &newhost) { return 0; }
+int            Module::OnChangeLocalUserGECOS(User* user, const std::string &newhost) { return 0; }
+int            Module::OnLocalTopicChange(User* user, Channel* chan, const std::string &topic) { return 0; }
 void           Module::OnEvent(Event* event) { return; }
 char*          Module::OnRequest(Request* request) { return NULL; }
 int            Module::OnOperCompare(const std::string &password, const std::string &input, int tagnumber) { return 0; }
-void           Module::OnGlobalOper(userrec* user) { }
-void           Module::OnPostConnect(userrec* user) { }
-int            Module::OnAddBan(userrec* source, chanrec* channel,const std::string &banmask) { return 0; }
-int            Module::OnDelBan(userrec* source, chanrec* channel,const std::string &banmask) { return 0; }
+void           Module::OnGlobalOper(User* user) { }
+void           Module::OnPostConnect(User* user) { }
+int            Module::OnAddBan(User* source, Channel* channel,const std::string &banmask) { return 0; }
+int            Module::OnDelBan(User* source, Channel* channel,const std::string &banmask) { return 0; }
 void           Module::OnRawSocketAccept(int fd, const std::string &ip, int localport) { }
 int            Module::OnRawSocketWrite(int fd, const char* buffer, int count) { return 0; }
 void           Module::OnRawSocketClose(int fd) { }
 void           Module::OnRawSocketConnect(int fd) { }
 int            Module::OnRawSocketRead(int fd, char* buffer, unsigned int count, int &readresult) { return 0; }
-void           Module::OnUserMessage(userrec* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list) { }
-void           Module::OnUserNotice(userrec* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list) { }
-void           Module::OnRemoteKill(userrec* source, userrec* dest, const std::string &reason, const std::string &operreason) { }
-void           Module::OnUserInvite(userrec* source,userrec* dest,chanrec* channel) { }
-void           Module::OnPostLocalTopicChange(userrec* user, chanrec* chan, const std::string &topic) { }
+void           Module::OnUserMessage(User* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list) { }
+void           Module::OnUserNotice(User* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list) { }
+void           Module::OnRemoteKill(User* source, User* dest, const std::string &reason, const std::string &operreason) { }
+void           Module::OnUserInvite(User* source,User* dest,Channel* channel) { }
+void           Module::OnPostLocalTopicChange(User* user, Channel* chan, const std::string &topic) { }
 void           Module::OnGetServerDescription(const std::string &servername,std::string &description) { }
-void           Module::OnSyncUser(userrec* user, Module* proto, void* opaque) { }
-void           Module::OnSyncChannel(chanrec* chan, Module* proto, void* opaque) { }
+void           Module::OnSyncUser(User* user, Module* proto, void* opaque) { }
+void           Module::OnSyncChannel(Channel* chan, Module* proto, void* opaque) { }
 void           Module::ProtoSendMode(void* opaque, int target_type, void* target, const std::string &modeline) { }
-void           Module::OnSyncChannelMetaData(chanrec* chan, Module* proto,void* opaque, const std::string &extname, bool displayable) { }
-void           Module::OnSyncUserMetaData(userrec* user, Module* proto,void* opaque, const std::string &extname, bool displayable) { }
+void           Module::OnSyncChannelMetaData(Channel* chan, Module* proto,void* opaque, const std::string &extname, bool displayable) { }
+void           Module::OnSyncUserMetaData(User* user, Module* proto,void* opaque, const std::string &extname, bool displayable) { }
 void           Module::OnSyncOtherMetaData(Module* proto, void* opaque, bool displayable) { }
 void           Module::OnDecodeMetaData(int target_type, void* target, const std::string &extname, const std::string &extdata) { }
 void           Module::ProtoSendMetaData(void* opaque, int target_type, void* target, const std::string &extname, const std::string &extdata) { }
-void           Module::OnWallops(userrec* user, const std::string &text) { }
-void           Module::OnChangeHost(userrec* user, const std::string &newhost) { }
-void           Module::OnChangeName(userrec* user, const std::string &gecos) { }
-void           Module::OnAddGLine(long duration, userrec* source, const std::string &reason, const std::string &hostmask) { }
-void           Module::OnAddZLine(long duration, userrec* source, const std::string &reason, const std::string &ipmask) { }
-void           Module::OnAddKLine(long duration, userrec* source, const std::string &reason, const std::string &hostmask) { }
-void           Module::OnAddQLine(long duration, userrec* source, const std::string &reason, const std::string &nickmask) { }
-void           Module::OnAddELine(long duration, userrec* source, const std::string &reason, const std::string &hostmask) { }
-void           Module::OnDelGLine(userrec* source, const std::string &hostmask) { }
-void           Module::OnDelZLine(userrec* source, const std::string &ipmask) { }
-void           Module::OnDelKLine(userrec* source, const std::string &hostmask) { }
-void           Module::OnDelQLine(userrec* source, const std::string &nickmask) { }
-void           Module::OnDelELine(userrec* source, const std::string &hostmask) { }
+void           Module::OnWallops(User* user, const std::string &text) { }
+void           Module::OnChangeHost(User* user, const std::string &newhost) { }
+void           Module::OnChangeName(User* user, const std::string &gecos) { }
+void           Module::OnAddGLine(long duration, User* source, const std::string &reason, const std::string &hostmask) { }
+void           Module::OnAddZLine(long duration, User* source, const std::string &reason, const std::string &ipmask) { }
+void           Module::OnAddKLine(long duration, User* source, const std::string &reason, const std::string &hostmask) { }
+void           Module::OnAddQLine(long duration, User* source, const std::string &reason, const std::string &nickmask) { }
+void           Module::OnAddELine(long duration, User* source, const std::string &reason, const std::string &hostmask) { }
+void           Module::OnDelGLine(User* source, const std::string &hostmask) { }
+void           Module::OnDelZLine(User* source, const std::string &ipmask) { }
+void           Module::OnDelKLine(User* source, const std::string &hostmask) { }
+void           Module::OnDelQLine(User* source, const std::string &nickmask) { }
+void           Module::OnDelELine(User* source, const std::string &hostmask) { }
 void           Module::OnCleanup(int target_type, void* item) { }
 void           Module::Implements(char* Implements) { for (int j = 0; j < 255; j++) Implements[j] = 0; }
-void           Module::OnChannelDelete(chanrec* chan) { }
+void           Module::OnChannelDelete(Channel* chan) { }
 Priority       Module::Prioritize() { return PRIORITY_DONTCARE; }
-void           Module::OnSetAway(userrec* user) { }
-void           Module::OnCancelAway(userrec* user) { }
-int            Module::OnUserList(userrec* user, chanrec* Ptr, CUList* &userlist) { return 0; }
-int            Module::OnWhoisLine(userrec* user, userrec* dest, int &numeric, std::string &text) { return 0; }
-void           Module::OnBuildExemptList(MessageType message_type, chanrec* chan, userrec* sender, char status, CUList &exempt_list, const std::string &text) { }
+void           Module::OnSetAway(User* user) { }
+void           Module::OnCancelAway(User* user) { }
+int            Module::OnUserList(User* user, Channel* Ptr, CUList* &userlist) { return 0; }
+int            Module::OnWhoisLine(User* user, User* dest, int &numeric, std::string &text) { return 0; }
+void           Module::OnBuildExemptList(MessageType message_type, Channel* chan, User* sender, char status, CUList &exempt_list, const std::string &text) { }
 void           Module::OnGarbageCollect() { }
-void           Module::OnBufferFlushed(userrec* user) { }
+void           Module::OnBufferFlushed(User* user) { }
 
 
 ModuleManager::ModuleManager(InspIRCd* Ins)
@@ -759,7 +759,7 @@ const std::string& ModuleManager::GetModuleName(Module* m)
  * m_safelist possible, initially).
  */
 
-chanrec* InspIRCd::GetChannelIndex(long index)
+Channel* InspIRCd::GetChannelIndex(long index)
 {
        int target = 0;
        for (chan_hash::iterator n = this->chanlist->begin(); n != this->chanlist->end(); n++, target++)
@@ -775,12 +775,12 @@ bool InspIRCd::MatchText(const std::string &sliteral, const std::string &spatter
        return match(sliteral.c_str(),spattern.c_str());
 }
 
-CmdResult InspIRCd::CallCommandHandler(const std::string &commandname, const char** parameters, int pcnt, userrec* user)
+CmdResult InspIRCd::CallCommandHandler(const std::string &commandname, const char** parameters, int pcnt, User* user)
 {
        return this->Parser->CallHandler(commandname,parameters,pcnt,user);
 }
 
-bool InspIRCd::IsValidModuleCommand(const std::string &commandname, int pcnt, userrec* user)
+bool InspIRCd::IsValidModuleCommand(const std::string &commandname, int pcnt, User* user)
 {
        return this->Parser->IsValidCommand(commandname, pcnt, user);
 }
@@ -794,12 +794,12 @@ void InspIRCd::AddCommand(Command *f)
        }
 }
 
-void InspIRCd::SendMode(const char** parameters, int pcnt, userrec *user)
+void InspIRCd::SendMode(const char** parameters, int pcnt, User *user)
 {
        this->Modes->Process(parameters,pcnt,user,true);
 }
 
-void InspIRCd::DumpText(userrec* User, const std::string &LinePrefix, stringstream &TextStream)
+void InspIRCd::DumpText(User* User, const std::string &LinePrefix, stringstream &TextStream)
 {
        std::string CompleteLine = LinePrefix;
        std::string Word;
@@ -815,9 +815,9 @@ void InspIRCd::DumpText(userrec* User, const std::string &LinePrefix, stringstre
        User->WriteServ(CompleteLine);
 }
 
-userrec* FindDescriptorHandler::Call(int socket)
+User* FindDescriptorHandler::Call(int socket)
 {
-       return reinterpret_cast<userrec*>(Server->SE->GetRef(socket));
+       return reinterpret_cast<User*>(Server->SE->GetRef(socket));
 }
 
 bool InspIRCd::AddMode(ModeHandler* mh, const unsigned char mode)
@@ -1044,7 +1044,7 @@ long ConfigReader::GetError()
        return olderr;
 }
 
-void ConfigReader::DumpErrors(bool bail, userrec* user)
+void ConfigReader::DumpErrors(bool bail, User* user)
 {
        ServerInstance->Config->ReportConfigError(this->errorlog->str(), bail, user);
 }
index 6fe79a9814af9f818ba451877e0bf3277e231994..43a767a1ccbe2e1e398c5f58c9cf12e2e96e79cb 100644 (file)
@@ -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')
                {
index 41a0b162eff2a50c6b46a6ea697ba42a6a062ecf..e27f4dcf70b05bd65137e0421054e84370e0a7b1 100644 (file)
@@ -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)
        {
        }
 
index a78e8c61b0a5253067bc8cd08a7bc2df2d1751e2..53d852f72994a5646d07279b91ec413282339375 100644 (file)
@@ -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;
        }
index 0bc7dfd1cf145d2ec7ea1e256f738482d00c36df..afa32d3d8530a4a8ad347f171a46d79f43937063 100644 (file)
@@ -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();
        }
index 01d5733af8460c8e8675344fa961917e66406768..8eb451f47aa59a8cce9133c61d528cdac4ad95c9 100644 (file)
@@ -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");
        }
index f37e52324fafbde2183477820ac783be925a8835..9795e9f8bad84c92af8a523dff06306d6d2d1e14 100644 (file)
@@ -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();
        }
index fc929b94f30835c707fdd1fda8e4f36bcc6b6350..6194e502d134f499173bab0db372e83cfa29371b 100644 (file)
@@ -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);
        }
index d1bece3435396edaddb9447c3966ca6a983d1da4..c697d6a9b5b067a30c81c0c30797aa24e0abf639 100644 (file)
@@ -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);
                
index 2edf282636c589a35d69e86d8cb12545e2927e97..b53186f71d6b3620e7adace64374f0ad66a0b06b 100644 (file)
@@ -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);                                     
                                }
index 92fbdf5c7607b4686c8641bd69b27f43355a555d..27433e254b33108989b09e529efac760f148e74d 100644 (file)
@@ -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)
index 4af425e0b06672443aeed51145716e0af00bc7ad..a7a52d9106f4fbc4ffb00c40b3a1bba290418090 100644 (file)
@@ -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"))
                {
index 76270c650befeff99b4becfdf6cf15af7b416380..4ce21c80520e91c2c54ba1260ea5aba5c29a6032 100644 (file)
@@ -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"))
                {
index e95447b6d2cebd6aec9b5d3bed27de10c525d149..3d0e819289a469f1e44bf5c0d220e5632f3a81a0 100644 (file)
@@ -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();
                
index 008608f030be070d19b930b68b943b2f1caf17f0..0d3dce2ebc2ba90792f485ab68e9c9af29830988 100644 (file)
@@ -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)
index 7f74532409fe8c786d86d024d0309726c76aaa6c..90da978565102f4fd57f19d7a3691039bf3250a5 100644 (file)
@@ -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')
                {
index 7f09de134225838044e07703fe142b72b205894d..90517255e71743f3aacebfb789db179280057a0e 100644 (file)
@@ -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();
        }
index 7afa71803459248293eab415e124e89430cb4e47..1b48c237f9c36bae06a090f613caa59ffddeb6c8 100644 (file)
@@ -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];
index 0e254d00cc9062cdba76f773fefe4838c2ff5bce..5690572ce7d0de53a1d340d5a32eba8cf84b9f79 100644 (file)
@@ -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);
index 56ad9da053339072d28c8655e81d8ccd60a1c21a..cef990a71e0119235196dd3068ab630bfb15620c 100644 (file)
@@ -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);
index aa5e184388c7796295fc62d925313674f33e5192..b91538ace3ccc2b328656abfc12bc98a7a773c11 100644 (file)
@@ -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;
index 4f36fb8c9f0cb84e8e2f9fea26bd4aef5999b6f5..4c0e93deabfbe77bd7839e639616053703313059 100644 (file)
@@ -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();
        }
index 9ac440d5e8ef6b4bd15236c28662280a1ce88c12..60bd1bba45f6ebcc4dd735fcbc8d06793428ea26 100644 (file)
@@ -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;
                                                }
index bcef01fd22cb9a1ec3411f957bb2f6ffa2b73054..44f59f34791c4d03f04791e4fa28b51ac182a12a 100644 (file)
@@ -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)
index 893981283bf01f29a4abe2bf4f2df0f7a966ce04..167a12bec07722eab197892a9a9438cccda94772 100644 (file)
@@ -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);
        }
index d46e5a9d6f36e4044cdd0a97226ab4e7424a3789..1635815ce36d775197970bd4a38cfa9458b09089 100644 (file)
@@ -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);
        }
index 86dc9ea0055170ded2b67da1e1d022b3a02a266f..b055c83ee13180566d58b0762593268627834857 100644 (file)
@@ -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'))
                {
index 6d56b62bce14d8928caaa72e4e3af4cc30705197..b02e892d3d956d90e453525bfdee2146c99f160e 100644 (file)
@@ -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();
        
index 1159febf8620ffaf9dff17c8b62c4269d0873f26..f220b0710c946754a700923fb1a23a68586fe462 100644 (file)
@@ -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
index eb497dea4021eb45c9cde0bf794f8448e152d461..b30b9316b45d2875a5795fa68bc40d703c5e6e9e 100644 (file)
@@ -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;
index 232d55314d3c7e809e0728751999e158b2c24e32..d2b0b4e45c1350a82c9ef3bbebf28dbcea0f243d 100644 (file)
@@ -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)
                {
index 19e1fe3d92bdf14526262b6eed988d86b0d7002f..994c71a2a81e967b4982ad77dc4d32338a3072e0 100644 (file)
@@ -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);
        }
index fb545f58fdf117be00bc4aac3b6face812a72dfa..325069d0b40503e457c1de2853c46a7f2df749e0 100644 (file)
@@ -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
index 7a48a3d45d605b6b3f48e77f81a8afa146f1e4f7..24024e2f906c883a95fb06633d217fd382d898c8 100644 (file)
@@ -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;
 
index db8094aa25a4ce2f2e237b109e708ac39fa6d2de..4b53e7c12f6cafc8f479eb8a4e6d4ce2ed8d0ed7 100644 (file)
@@ -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);
index 0561c515636b6a0fa253962916d86cbf74f6bcee..7ae98b37d57a520fc8ba7c8f52a36d06da945e29 100644 (file)
@@ -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)
                {
index 31467459c16f296b1b8e0633a8a9e15f0a011069..987678b5bda563530799eb53f2f22fce7087a0e6 100644 (file)
@@ -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)
                {
index d10f02ce466dcb2e233eb7919b999e5b385b4886..86f120d204c4a6588d1a37f5d0a6a990ac84d17e 100644 (file)
@@ -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();
        }
index a8644f6ed6ae698fd29080034ec4a9931a28a1b0..82fdf535f7fba8cd97edd95a7fd7290d9f98f762 100644 (file)
@@ -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";
index da52dd7d97cb6a7e1e16741ff100c44de5b0321a..4b91ca789636069422ed9e9f0eb9d1e079cd1a01 100644 (file)
@@ -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]++;
                        }
index e9af24ad09337ca2f004676f521f122f6f395ded..4cc11b7258e81ae55e52a1de6d41399281935691 100644 (file)
@@ -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);
        }
index d65fdf7e008582ee532cbb4916ec64b40174a5bc..5abee8303077cac79a08a09ea29fecf99562f7f6 100644 (file)
@@ -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));
                }
 
 };
index 23b5d82803ae57e452e8f48b11d106b4bcb58a71..34e1fd34df15c591f1ff43fc8dd7898c6771e622 100644 (file)
@@ -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;
index 11e55cf68d2ecd14854af94cca942ad0071ccee4..4ab3ed793de1ddc5f04a23aa7aba63455f6f7307 100644 (file)
@@ -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);
                        
index e3fea05218933858ab01382660f92d2717dacb5f..d6d9eee0fc0be984539026f77ff95f964bcdf790 100644 (file)
@@ -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();
        }
index ca277c3aee0e683ad25c2b1d7a5655e710433e04..bd165034f589c38be83d4dd09a44b7955f6d64fc 100644 (file)
@@ -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))
index 06361c6929415e6789371dfe7931044648d35dc6..554bcd17dec4a4affd77b794adeb68a4b7b0c600 100644 (file)
@@ -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;
index 7ddce8ab09f9f0a5e8af22e2d2a1c224156f800a..ebd3b863082afe17391de8f426489c4083eb4661 100644 (file)
@@ -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);
index 1689f843ce8650893de7ed27bff7d983ab81a0ae..ced6adecee5e6889f6740cafc1e9429f566dd803 100644 (file)
@@ -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;
index 1b72c52c3789bfa314f689d0ee70c91963de8acc..d345570c0ac8fe7cab9c992b2d4dc646f66ddf93 100644 (file)
@@ -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++)
                {
index 3056bdaff0474598991d2286785a4079d868d11a..553d3dfeb28a7a4c71f565725607beb3ca63221b 100644 (file)
@@ -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];
index bfa511da26a5c4fb3136f71acc43b506dfa46913..c92a2c111fe5952a3c793773b9a84ae410b770de 100644 (file)
@@ -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;
index 68ec48891cf8845beb5bf7a34433b07addd4ca71..129bce27641c8e0d653c33d643d8e964cbc7d059 100644 (file)
@@ -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')
                {
index e0faafc98bf2b531b0ae155389e3f15a0ae08a24..941576f79891faf2a381673effbd4ae2b3ac6b68 100644 (file)
@@ -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)
 {
 }
        
index b086eb3454140bfd83936c6dcd67a4e912f6ba00..91afe9df76c68ed0173d720c2d25e06f80462846 100644 (file)
@@ -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
        
index 0e7ff2e6d3fbad6d9f30a1280dad27dbda3b4b96..df439b98966ba966386ccfea1112bf4655bad8dc 100644 (file)
@@ -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] : "*";
 
index 1d870a7c299d1f3dfde9cc0d3a8666ecf1fa8839..b95f455dc7759033036dc6a6e69e41e9ab50a9d1 100644 (file)
@@ -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++)
index 86866f7fbe488423653fe8a7d5243135b119144a..a2a64cc266c5191b049e28527d940031e93a9009 100644 (file)
@@ -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'))
                        {
index 8d2c6b4ebf623239afb1c1f1b6595644bc1d51db..2637968a9d9750097c929c3aca4efefa027bcc16 100644 (file)
@@ -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
index 1e4f7ae85009d75f87c90b386785663fdb2fef0c..fd39cde0f7469e189a4342344da9807464294d30 100644 (file)
@@ -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
index 327732651ba6e4342fadf231c666c0e0d6712cab..17c597e7153dcd52b46350a87b49a659c4960dca 100644 (file)
@@ -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++)
                {
index 445af1826b226eb73d6334845905d67ee6e07c10..2d022ad308738e27e959a484715d8237d2256972 100644 (file)
@@ -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())
                        {
index 6f0f3b5574916abd39cb5c59f87b43d93f79a8a6..5e7e6ccd093459d96fdcdd230d327167dad756af 100644 (file)
 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))
index 47e9f595c300c929eb427d01d62008c3f5fcdb64..2ec8439cf7d89483a43bfa2677c5b7db384f560f 100644 (file)
@@ -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];
index c689af32054fb5f3a688efce5b77866436bb6c8a..7e126799544d78a0704f9a6c85554f338a1d1d95 100644 (file)
@@ -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();
        }
index 72d79361b6e5d4175da2f2b57bae093cc328a929..6840e155c18fe74538c795f23bcce4a17fba591f 100644 (file)
@@ -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))
index 600b8f70f2e6acfb800d9eb96ed5c66e9d5d6853..94367f6963870b281576a9bb17777cef3b5339de 100644 (file)
@@ -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;
index 6a684206f2bede7928c32a90d82527e4b1347201..0096c1719dfd316c5e8ee8b05dc30e021f7a9d7a 100644 (file)
@@ -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)
index fd82566417eb259d09abe72d2514ab79a7f07946..f4a3335e653ae4bb3be70c0c7d782ec51e922808 100644 (file)
@@ -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)
                {
index a4b7940503a49c67ba7f1f619bd401305995b72d..f14e437ee36e60c81d1fe303eb3f0f09e4b4401e 100644 (file)
@@ -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;
        }
index 51e20fe7ee4bc5e4d073b8a3facce0e3761f41ba..e7dd6e272eace3cbc85e184f95b5d44bc42561fa 100644 (file)
@@ -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))
index e97ec8e1b74bda3a761c7ddb902298981656e2c5..65fb6c6c22bc07203e7938cda88c13211f959cdb 100644 (file)
@@ -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"))
                {
index e8e25fe524dd7dd3ab3cf6a6ec9fae870469fe7f..cd9d76c5b861e25d1636d317408645e587ffcc1c 100644 (file)
@@ -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))
index e21ea9b90c773ac7271c959e0c1e2d78c6c2bbf8..c2c02f6292fab7562534de769969dbd8b0643f94 100644 (file)
@@ -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");
                }
        }
index b2d15f9d7b0e80ed9be398e982e0584e02e688ed..cb11dd5ad291aaca860dcffb660a2e228b663825 100644 (file)
@@ -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'))
index c1d7f0d6f67e06888333e7c0dbe5f863faf293e2..5447d0d602d7c8b0afb5eb670516cba1db01cd0e 100644 (file)
@@ -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'))
                {
index 93ab2bd1daea88e67443555dc4014b81926c2352..c09d2203bc4acb0e857767e08fd43a6b936566c8 100644 (file)
@@ -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)
                {
index 3adc9e160f2630ca5232bdfc758813daa6d93822..66d8d46019dd3ee825a1cafdb2eab8094e8512e0 100644 (file)
@@ -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'))
                                {
index fdec61a7ef5c420bc8b00897e5c0eb08a7bf6fa8..314a7c8fe13cd504db566cb3a47fe711539f9a87 100644 (file)
@@ -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))
index 66fa1e61efa6cf3af462209912c1235a05e5f3c6..cc2afbe54c1e5d154a481fb7278114a8e5085313 100644 (file)
@@ -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)
index 24772aea7e7fe0c75b2af5123b52d0daef79c4e4..4c3ae4798762b7271488794e26dca9f9970e2331 100644 (file)
@@ -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))
                {
index 390dd1fe12005108ae494071dd0e0e087e95b4bc..7e336eb8bd4d808128397f8e282b6b5a0c24edc3 100644 (file)
@@ -32,7 +32,7 @@ public:
                return Version(1,1,0,1,VF_VENDOR,API_VERSION);\r
        }\r
 \r
-       void OnPostOper(userrec* user, const std::string &opertype)\r
+       void OnPostOper(User* user, const std::string &opertype)\r
        {\r
                if(!IS_LOCAL(user))\r
                        return;\r
index 45fcf6be85ad3345be2d2c0faacb805930ae33b6..ae92a12551eed88c6766f61aad20d1e40a54e8a2 100644 (file)
@@ -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));
                }
 
 };
index 4c4047caae8cc3b4676c55de4fcbf2c5a1298e9b..c7fa0a6424bf43c509f6ed59dda9a4555bca5013 100644 (file)
@@ -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;
 
index 09395fccb29e6eecbcdc80f76326d100da745066..0ca13b2da237cd97c70cb1af9cc8845399dd8afd 100644 (file)
@@ -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)
index fea793c0416b66f24bb6c44e4529b1366adb63a4..1904b3f0197cd1e3263a3dac3581e2e7b93dbca3 100644 (file)
@@ -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
index 2ae4c30b59d232572c5d6506ff321f442e96cb2c..ef3ae98c45952acb36d0a9fab6d99d5228adcda0 100644 (file)
@@ -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();
        }
index 0f8922854cb451eed08318ae49c0e113a31700da..41b57b32716232b4716d20e356bb1ff8046032a6 100644 (file)
@@ -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))
                {
index 96ed2758eec5e37685c9f1b1c4403850d684bcc1..435c41453ae4834ce53781e912bc83a8a5df115b 100644 (file)
@@ -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);
index 09792945613aa5206d4f31da5a0f5d89857e6276..46b8fbe195717d5b349408e44623898c6f1ae2e6 100644 (file)
@@ -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;
                                }
                        }
index c712b396b2e3c4925569b53a8c7367ccbef3396a..b02f9a391267c77e59b9f3543ced5ac6e340bc65 100644 (file)
@@ -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;
index 9de0942c17102e648919ea89f400ab511641d229..22e4b64906f06aec088e35407fe83268f0972347 100644 (file)
@@ -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);
index a5ab337ad30f1c1b4ca9be0bc5af690acf2f32b2..a5a5ab1aee4cab2408d027f0713102d06c3de225 100644 (file)
@@ -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");
                }
index 69e5038612f61e9029e36f1836a18df2fcc594c4..e61e8ac0d6c44769448354c8166a4822137467dd 100644 (file)
@@ -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
index b5f10eb244976a5d38cec4908266e247189cf890..b63d7c7b79232a761d7e3a72602c3003479c8012 100644 (file)
@@ -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);
        }
index 40b8d1b0f03f36bf402044d56951054751707868..a2135bd6bb4bade7a57b76e36beacc062b6271ec 100644 (file)
@@ -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);
        }
index 03bf7c47cc966e88013c996118163e5cd71f5b69..1627f945f81a9e0eaadce581814200d647455064 100644 (file)
@@ -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))
index a083f43054a70d586d488ff6c5459f1487b0e09a..b67730e27e03303eec4ef7e13bc6577181bcbaba 100644 (file)
@@ -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.
index e4f2006c447253257a8ad1232b9836e7de56cfe3..859db7b370e77b6dd1007534e7ae712a3b46a6e2 100644 (file)
@@ -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))
index 0c4d061e1a5241e96bb86cfbae096e36900ca707..f0e7959803c4e02770cb9de4dbee0834eb59a7e9 100644 (file)
@@ -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]);
index 7f4212d805dda296c878d9b803b33b85c5ea9e1e..4711c612c36876968468d73124b7a8a606c8b5df 100644 (file)
@@ -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
index e4fc76478f656ab7033effc0da6f1c118a6bba0a..30b339630df6c1188b4247832c9d2da05183fecc 100644 (file)
@@ -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)
index c0b6473eb7a16da4098923b049072857e04248a7..82deda0cd6514cbf153ffc00ccc0ef56d5ac107b 100644 (file)
@@ -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);
        }
index c1152b7de05fccc5f1d9382750ca58d5d9eea605..88a6b8fb91b22c44afaab769ddea98801ddd144f 100644 (file)
@@ -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)
                {
index 74e4453762a9ad132b1cd9758890d2c55fd33462..5aa86a9108fb767e4d6774dd6576d4861459ccc3 100644 (file)
@@ -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())
index d1ea08c7322a878c1c0770a853af6dac0d38e77f..852ad6d3f108c34b3cfcebc7d8bb8c36b23a9e18 100644 (file)
@@ -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'));
        }
index 59b48fbc1c1ae4980eb2c92245f229e6fe9a9e05..7ea03ebbca1bd0ac12487f9ec31470869a32917f 100644 (file)
@@ -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);
index 4a19b8412a54b7712ef5f3a53fd57200ce7ff686..0eae1c7be2ad21c11af0591ce943ab9a37eedbcf 100644 (file)
@@ -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])
                {
index 6dbcae7111ba692cc812fc538903a5a6354d697b..a676eedb4f99835a8e819600c6010e3b4ee950d4 100644 (file)
@@ -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)
index 80179c8cb073dc2143116bb59178372d65efc652..04e101fa31c0828f307d4d9a99ae5e589377b5d5 100644 (file)
@@ -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])
                {
index 02ac49d2275e70379cdecb0de6cfab53251ba185..5acb9b51376cdea040f2435ab0abe92a25d0a3ac 100644 (file)
@@ -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))
                {
index 1bea10b70885936bae8000876c2f0d4f3089c9a9..24075209949b2aaafc5a046713a036477276196d 100644 (file)
@@ -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);
        }
index e9a4fdc785e621479be6351625890fa06506f15f..c6fbcdbdc0720efb217ceb3088ae298bbe374a25 100644 (file)
@@ -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);
index 4a31d70076412e7ed1942a7bc05e55ddf0c0199d..62f288fb338cc92ec51b78e3ea35054599226195 100644 (file)
@@ -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;
index 9b697a89ff87ae6b96b9fd0621bb6ea73d92f674..dab1b24200e0fd423617cc1970da490a33cc50db 100644 (file)
@@ -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);
index 41bb66570f2e36605cbe260d5fa07eaedb3fc311..0a122a7802fe8e58d96176ed1b378fd3011293d1 100644 (file)
@@ -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)
        {
index d6f39e6a8f58fcadcb843649b3b95840a3667b5d..d0940936aa1a73a60e88df779ff9058b4a21a212 100644 (file)
@@ -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
index 21f6f73508145ab21e00d82e1e43d375e62c3e23..f32e3ced088e9eac317069d09eb3d96c2e0273f9 100644 (file)
@@ -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)
        {
index df8331cb7b88869f98553f024eb08d9a435272a1..78e030429f250727c62f5cddac899f9b4cd9c136 100644 (file)
@@ -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)
        {
index ce58744b739701712414b5b87f7efd0755435845..8db45941191f7d7c4832a4a319738eac5ed7a72c 100644 (file)
@@ -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)
index 05a8da8afe0ab2004474c42aa7f42e0c9b150d8b..d9dca2827142c17536fe557f93047b6aa7a09fa2 100644 (file)
@@ -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'))
        {
index 6c093ba98eaa82009353dd48951689c73dc020f4..359275dfd53a744741d5c35a7b2e7baf61bb7df1 100644 (file)
@@ -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))
        {
index 493735f6a5ee3c4d28ca8df6919fbe1468a35188..214c20da3f789fdb5f2ea4723b8f6878b4857932 100644 (file)
        
 /* $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;
index f538e29633609138ee637026b9dc7f8684c6224e..bf4232b967151f812bf840e956e4412b44ac716f 100644 (file)
@@ -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)))
        {
index c9afef7953d3c36f091599b5a5c0779eafd92daf..1c854a1c1d13cd05b4bb06890bf84c48dd3ffdd7 100644 (file)
@@ -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)
index 25bf833e13a891d42feaab0a53901ad10d56a45a..a984472d1a6358a9868dd29938bb6cadd93b1686 100644 (file)
@@ -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))
        {
index 080d2aad6f8b1de2f3fd9a0237722771cd9c5c83..ec33445ab0481b8c3247a0d6f18986a0efbc5331 100644 (file)
@@ -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
index 8c7e9d7f945251b3178185c82733a00e11d166eb..62f22bc4f154ac665a014c151d7df501245bfda2 100644 (file)
@@ -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))
        {
index d6285b83f7c1f740e1578f2f54a366d759469655..af2d347b17f2745cdaeb70f814fe21e71935c3b7 100644 (file)
@@ -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
index 4bedf8388286cb32e8c56c695c46728867de5811..635d2cc1837c030b24d11100e87a40e2ec8a3963 100644 (file)
@@ -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);
index a798976d2c87f25a4d83cb8a32104fcc3c7023ab..08e308dfbb77f4ce1a06af59f60a8f26c74d162a 100644 (file)
@@ -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);
index f75362bd39409405d5036f7d44a1d852a59210c7..4f6dae56ad4903e4604df531b16b615bfcca254e 100644 (file)
@@ -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];
index becfc785b0c34cc16c280614dbb760fbcb646be0..0c2e9904133eae267f73c2059f264bc98ef77afd 100644 (file)
@@ -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);
 */
index abc251ab09844ebb65242c9aa0150713565d68e2..4814013e632296df1ce1e2fa8d25f6a24592eef2 100644 (file)
@@ -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;
index 0203e760202e5ac212d432f55b6171a058c36d51..aeb89c6be93cec200be86beebe420c9704a2793b 100644 (file)
@@ -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);
index 8e42f9c75529cddbadb94ee94511168941e2dc6d..76ae8cfa41e11a3298dbdea11e93a932e985ef61 100644 (file)
@@ -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)
                {
index 6b9f6d46ca8759212ec599a828521fd7186817da..4a91feada2bf3d50f0ffd0df850b8f49f99d85c2 100644 (file)
@@ -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))
                        {
index a9c5b89b3a825c93f9bf0d33684b745dd38bb5bb..e31d41c0b8aa9fe2280469666c2baed4608a9114 100644 (file)
@@ -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'))
                {
index ba89136004c86a1ca33018741ebbcbc64b9ac2d5..8ed4bb49b33b9b6ee313d95b47ceb20b7583d44b 100644 (file)
@@ -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);
        }
index f26454d3e0017c33b68223fbc3ba09e334e7cff9..7988d73bae5593391d7e93f2dfb6c47c8498edd6 100644 (file)
@@ -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();
        
index 3e8c53ea13cbad1bcc88d4ff67823e25e6b27c0a..196c435531d176459491cd567cbd0a4839734d84 100644 (file)
@@ -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;
index da8ad97492fb24e17b93c37a2de4d1657df8f24e..bf77c5812cd7eb398f522d6d0c380af6aa105cbd 100644 (file)
@@ -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;
index d99a51c7d4deeeef9d3cab48e50b3d1f1d9fe626..58fd466dfb033746e7e9758a3c2d67985cc7376b 100644 (file)
@@ -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;
index 714b8b40ab0f5aebec7f4a7b608712b385bbc264..a226b97472fd9f6edb476cfb607cfa50f0503f65 100644 (file)
@@ -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)
                                        {
index bfeeb202ede6d4108d2ca9632c2dc1318ea1f4d9..c246cc811ed2651b3b9448d754c2fbf77c06891f 100644 (file)
@@ -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;
index 41534eca40713ad4458cc5156032d330d1f57d1e..830be12e81cb033c43d9bfb6506a569807f42131 100644 (file)
@@ -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"))
                {
index 7e13a63f93a16b8d9c1329f6a1ac267e5220b376..9fbd6dfb07140c4448924f0d6fe367fd2d51f7c5 100644 (file)
@@ -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))
                {       
index 949ce758e9f7c3e634e849458a381d6f9d7e09ea..829a535e383541d1147bbbabdc74aa1079bf7957 100644 (file)
@@ -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() + " ";
index 92aeb3401e2939b1a3bb97eab9d2e5742e60a3eb..0827343de6a9f23f2408ef4a94211cfa04dfa713 100644 (file)
@@ -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);
 
index a090487f30b8169fcee25d13be69720dbcde7f3d..6cc96d0f9c241a022cfa993c2a87fcff61486300 100644 (file)
@@ -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))
index d97d40f87faf9566780d4cf63f87b9756cfe08d2..6d1e99d31b10cbd4f5d69b5abadfcaabca080176 100644 (file)
@@ -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;
index df524b51f10f6b51b8614932172770220cf50710..070d01d7346283d2efd4477cce6f2db3059f2d69 100644 (file)
@@ -53,9 +53,9 @@ void SnomaskManager::WriteToSnoMask(char letter, const std::string &text)
        if (n != SnoMasks.end())
        {
                /* Only opers can receive snotices, so we iterate the oper list */
-               for (std::list<userrec*>::iterator i = ServerInstance->all_opers.begin(); i != ServerInstance->all_opers.end(); i++)
+               for (std::list<User*>::iterator i = ServerInstance->all_opers.begin(); i != ServerInstance->all_opers.end(); i++)
                {
-                       userrec* a = *i;
+                       User* a = *i;
                        if (IS_LOCAL(a) && a->IsModeSet('s') && a->IsModeSet('n') && a->IsNoticeMaskSet(n->first))
                        {
                                /* send server notices to all with +ns */
index 2465506e919f8be1230cb380c20bc9b49964274a..e4d59716a9aa8584d1a22496c8ba7a45a653c4f4 100644 (file)
@@ -115,7 +115,7 @@ void ListenSocket::HandleEvent(EventType et, int errornum)
                        }
                }
                ServerInstance->stats->statsAccept++;
-               userrec::AddClient(ServerInstance, incomingSockfd, in_port, false, this->family, client);
+               User::AddClient(ServerInstance, incomingSockfd, in_port, false, this->family, client);
        }
        else
        {
index 9c8b27267ecab151e43ec36afd89a74f0437da6f..469fa61d0a467e6fcc0ad2c734a9ceacb3b99f94 100644 (file)
 #include "socketengine.h"
 #include "command_parse.h"
 
-void FloodQuitUserHandler::Call(userrec* current)
+void FloodQuitUserHandler::Call(User* current)
 {
        Server->Log(DEFAULT,"Excess flood from: %s@%s", current->ident, current->host);
        Server->SNO->WriteToSnoMask('f',"Excess flood from: %s%s%s@%s",
                        current->registered == REG_ALL ? current->nick : "",
                        current->registered == REG_ALL ? "!" : "", current->ident, current->host);
-       userrec::QuitUser(Server, current, "Excess flood");
+       User::QuitUser(Server, current, "Excess flood");
        if (current->registered != REG_ALL)
        {
                Server->XLines->add_zline(120, Server->Config->ServerName, "Flood from unregistered connection", current->GetIPString());
@@ -31,7 +31,7 @@ void FloodQuitUserHandler::Call(userrec* current)
        }
 }
 
-void ProcessUserHandler::Call(userrec* cu)
+void ProcessUserHandler::Call(User* cu)
 {
        int result = EAGAIN;
 
@@ -70,7 +70,7 @@ void ProcessUserHandler::Call(userrec* cu)
 
        if ((result) && (result != -EAGAIN))
        {
-               userrec *current;
+               User *current;
                int currfd;
                int floodlines = 0;
 
@@ -159,7 +159,7 @@ void ProcessUserHandler::Call(userrec* cu)
 
                if ((result == -1) && (errno != EAGAIN) && (errno != EINTR))
                {
-                       userrec::QuitUser(Server, cu, errno ? strerror(errno) : "EOF from client");
+                       User::QuitUser(Server, cu, errno ? strerror(errno) : "EOF from client");
                        return;
                }
        }
@@ -171,7 +171,7 @@ void ProcessUserHandler::Call(userrec* cu)
        }
        else if (result == 0)
        {
-               userrec::QuitUser(Server, cu, "Connection closed");
+               User::QuitUser(Server, cu, "Connection closed");
                return;
        }
 }
@@ -192,9 +192,9 @@ void InspIRCd::DoBackgroundUserStuff(time_t TIME)
                const time_t DUMMY_VALUE = 32768;
                next_call = TIME + DUMMY_VALUE;
 
-               for (std::vector<userrec*>::iterator count2 = local_users.begin(); count2 != local_users.end(); count2++)
+               for (std::vector<User*>::iterator count2 = local_users.begin(); count2 != local_users.end(); count2++)
                {
-                       userrec* curr = *count2;
+                       User* curr = *count2;
 
                        /*
                         * registration timeout -- didnt send USER/NICK/HOST
@@ -203,7 +203,7 @@ void InspIRCd::DoBackgroundUserStuff(time_t TIME)
                        if ((TIME > curr->timeout) && (curr->registered != REG_ALL))
                        {
                                curr->muted = true;
-                               userrec::QuitUser(this, curr, "Registration timeout");
+                               User::QuitUser(this, curr, "Registration timeout");
                                continue;
                        }
                        else
@@ -257,7 +257,7 @@ void InspIRCd::DoBackgroundUserStuff(time_t TIME)
                                        curr->muted = true;
                                        curr->lastping = 1;
                                        curr->nping = TIME+curr->pingmax;
-                                       userrec::QuitUser(this, curr, message);
+                                       User::QuitUser(this, curr, message);
                                        continue;
                                }
                                curr->Write("PING :%s",this->Config->ServerName);
index d3f6d6075d90555e940c3cdcf621cae5d81bdf07..5141053bab2e1bb2852c2478a80a218c58b871c3 100644 (file)
@@ -76,7 +76,7 @@ bool DoneClassesAndTypes(ServerConfig* conf, const char* tag)
        return true;
 }
 
-std::string userrec::ProcessNoticeMasks(const char *sm)
+std::string User::ProcessNoticeMasks(const char *sm)
 {
        bool adding = true, oldadding = false;
        const char *c = sm;
@@ -133,7 +133,7 @@ std::string userrec::ProcessNoticeMasks(const char *sm)
        return output;
 }
 
-void userrec::StartDNSLookup()
+void User::StartDNSLookup()
 {
        try
        {
@@ -154,7 +154,7 @@ void userrec::StartDNSLookup()
        }
 }
 
-UserResolver::UserResolver(InspIRCd* Instance, userrec* user, std::string to_resolve, QueryType qt, bool &cache) :
+UserResolver::UserResolver(InspIRCd* Instance, User* user, std::string to_resolve, QueryType qt, bool &cache) :
        Resolver(Instance, to_resolve, qt, cache), bound_user(user)
 {
        this->fwd = (qt == DNS_QUERY_A || qt == DNS_QUERY_AAAA);
@@ -257,17 +257,17 @@ void UserResolver::OnError(ResolverError e, const std::string &errormessage)
 }
 
 
-bool userrec::IsNoticeMaskSet(unsigned char sm)
+bool User::IsNoticeMaskSet(unsigned char sm)
 {
        return (snomasks[sm-65]);
 }
 
-void userrec::SetNoticeMask(unsigned char sm, bool value)
+void User::SetNoticeMask(unsigned char sm, bool value)
 {
        snomasks[sm-65] = value;
 }
 
-const char* userrec::FormatNoticeMasks()
+const char* User::FormatNoticeMasks()
 {
        static char data[MAXBUF];
        int offset = 0;
@@ -284,17 +284,17 @@ const char* userrec::FormatNoticeMasks()
 
 
 
-bool userrec::IsModeSet(unsigned char m)
+bool User::IsModeSet(unsigned char m)
 {
        return (modes[m-65]);
 }
 
-void userrec::SetMode(unsigned char m, bool value)
+void User::SetMode(unsigned char m, bool value)
 {
        modes[m-65] = value;
 }
 
-const char* userrec::FormatModes()
+const char* User::FormatModes()
 {
        static char data[MAXBUF];
        int offset = 0;
@@ -307,7 +307,7 @@ const char* userrec::FormatModes()
        return data;
 }
 
-void userrec::DecrementModes()
+void User::DecrementModes()
 {
        ServerInstance->Log(DEBUG,"DecrementModes()");
        for (unsigned char n = 'A'; n <= 'z'; n++)
@@ -325,7 +325,7 @@ void userrec::DecrementModes()
        }
 }
 
-userrec::userrec(InspIRCd* Instance, const std::string &uid) : ServerInstance(Instance)
+User::User(InspIRCd* Instance, const std::string &uid) : ServerInstance(Instance)
 {
        *password = *nick = *ident = *host = *dhost = *fullname = *awaymsg = *oper = *uuid = 0;
        server = (char*)Instance->FindServerNamePtr(Instance->Config->ServerName);
@@ -359,10 +359,10 @@ userrec::userrec(InspIRCd* Instance, const std::string &uid) : ServerInstance(In
        if (finduuid == Instance->uuidlist->end())
                (*Instance->uuidlist)[uuid] = this;
        else
-               throw CoreException("Duplicate UUID "+std::string(uuid)+" in userrec constructor");
+               throw CoreException("Duplicate UUID "+std::string(uuid)+" in User constructor");
 }
 
-void userrec::RemoveCloneCounts()
+void User::RemoveCloneCounts()
 {
        clonemap::iterator x = ServerInstance->local_clones.find(this->GetIPString());
        if (x != ServerInstance->local_clones.end())
@@ -385,7 +385,7 @@ void userrec::RemoveCloneCounts()
        }
 }
 
-userrec::~userrec()
+User::~User()
 {
        this->InvalidateCache();
        this->DecrementModes();
@@ -410,7 +410,7 @@ userrec::~userrec()
        ServerInstance->uuidlist->erase(uuid);
 }
 
-char* userrec::MakeHost()
+char* User::MakeHost()
 {
        if (this->cached_makehost)
                return this->cached_makehost;
@@ -430,7 +430,7 @@ char* userrec::MakeHost()
        return this->cached_makehost;
 }
 
-char* userrec::MakeHostIP()
+char* User::MakeHostIP()
 {
        if (this->cached_hostip)
                return this->cached_hostip;
@@ -450,13 +450,13 @@ char* userrec::MakeHostIP()
        return this->cached_hostip;
 }
 
-void userrec::CloseSocket()
+void User::CloseSocket()
 {
        ServerInstance->SE->Shutdown(this, 2);
        ServerInstance->SE->Close(this);
 }
 
-char* userrec::GetFullHost()
+char* User::GetFullHost()
 {
        if (this->cached_fullhost)
                return this->cached_fullhost;
@@ -478,7 +478,7 @@ char* userrec::GetFullHost()
        return this->cached_fullhost;
 }
 
-char* userrec::MakeWildHost()
+char* User::MakeWildHost()
 {
        static char nresult[MAXBUF];
        char* t = nresult;
@@ -490,7 +490,7 @@ char* userrec::MakeWildHost()
        return nresult;
 }
 
-int userrec::ReadData(void* buffer, size_t size)
+int User::ReadData(void* buffer, size_t size)
 {
        if (IS_LOCAL(this))
        {
@@ -505,7 +505,7 @@ int userrec::ReadData(void* buffer, size_t size)
 }
 
 
-char* userrec::GetFullRealHost()
+char* User::GetFullRealHost()
 {
        if (this->cached_fullrealhost)
                return this->cached_fullrealhost;
@@ -527,7 +527,7 @@ char* userrec::GetFullRealHost()
        return this->cached_fullrealhost;
 }
 
-bool userrec::IsInvited(const irc::string &channel)
+bool User::IsInvited(const irc::string &channel)
 {
        for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
        {
@@ -539,17 +539,17 @@ bool userrec::IsInvited(const irc::string &channel)
        return false;
 }
 
-InvitedList* userrec::GetInviteList()
+InvitedList* User::GetInviteList()
 {
        return &invites;
 }
 
-void userrec::InviteTo(const irc::string &channel)
+void User::InviteTo(const irc::string &channel)
 {
        invites.push_back(channel);
 }
 
-void userrec::RemoveInvite(const irc::string &channel)
+void User::RemoveInvite(const irc::string &channel)
 {
        for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
        {
@@ -561,7 +561,7 @@ void userrec::RemoveInvite(const irc::string &channel)
        }
 }
 
-bool userrec::HasPermission(const std::string &command)
+bool User::HasPermission(const std::string &command)
 {
        char* mycmd;
        char* savept;
@@ -618,7 +618,7 @@ bool userrec::HasPermission(const std::string &command)
  * something we can change anyway. Makes sense to just let
  * the compiler do that copy for us.
  */
-bool userrec::AddBuffer(std::string a)
+bool User::AddBuffer(std::string a)
 {
        try
        {
@@ -645,22 +645,22 @@ bool userrec::AddBuffer(std::string a)
 
        catch (...)
        {
-               ServerInstance->Log(DEBUG,"Exception in userrec::AddBuffer()");
+               ServerInstance->Log(DEBUG,"Exception in User::AddBuffer()");
                return false;
        }
 }
 
-bool userrec::BufferIsReady()
+bool User::BufferIsReady()
 {
        return (recvq.find('\n') != std::string::npos);
 }
 
-void userrec::ClearBuffer()
+void User::ClearBuffer()
 {
        recvq.clear();
 }
 
-std::string userrec::GetBuffer()
+std::string User::GetBuffer()
 {
        try
        {
@@ -695,12 +695,12 @@ std::string userrec::GetBuffer()
 
        catch (...)
        {
-               ServerInstance->Log(DEBUG,"Exception in userrec::GetBuffer()");
+               ServerInstance->Log(DEBUG,"Exception in User::GetBuffer()");
                return "";
        }
 }
 
-void userrec::AddWriteBuf(const std::string &data)
+void User::AddWriteBuf(const std::string &data)
 {
        if (*this->GetWriteError())
                return;
@@ -732,7 +732,7 @@ void userrec::AddWriteBuf(const std::string &data)
 }
 
 // send AS MUCH OF THE USERS SENDQ as we are able to (might not be all of it)
-void userrec::FlushWriteBuf()
+void User::FlushWriteBuf()
 {
        try
        {
@@ -778,7 +778,7 @@ void userrec::FlushWriteBuf()
 
        catch (...)
        {
-               ServerInstance->Log(DEBUG,"Exception in userrec::FlushWriteBuf()");
+               ServerInstance->Log(DEBUG,"Exception in User::FlushWriteBuf()");
        }
 
        if (this->sendq.empty())
@@ -787,7 +787,7 @@ void userrec::FlushWriteBuf()
        }
 }
 
-void userrec::SetWriteError(const std::string &error)
+void User::SetWriteError(const std::string &error)
 {
        try
        {
@@ -798,16 +798,16 @@ void userrec::SetWriteError(const std::string &error)
 
        catch (...)
        {
-               ServerInstance->Log(DEBUG,"Exception in userrec::SetWriteError()");
+               ServerInstance->Log(DEBUG,"Exception in User::SetWriteError()");
        }
 }
 
-const char* userrec::GetWriteError()
+const char* User::GetWriteError()
 {
        return this->WriteError.c_str();
 }
 
-void userrec::Oper(const std::string &opertype)
+void User::Oper(const std::string &opertype)
 {
        try
        {
@@ -822,11 +822,11 @@ void userrec::Oper(const std::string &opertype)
 
        catch (...)
        {
-               ServerInstance->Log(DEBUG,"Exception in userrec::Oper()");
+               ServerInstance->Log(DEBUG,"Exception in User::Oper()");
        }
 }
 
-void userrec::UnOper()
+void User::UnOper()
 {
        try
        {
@@ -843,11 +843,11 @@ void userrec::UnOper()
 
        catch (...)
        {
-               ServerInstance->Log(DEBUG,"Exception in userrec::UnOper()");
+               ServerInstance->Log(DEBUG,"Exception in User::UnOper()");
        }
 }
 
-void userrec::QuitUser(InspIRCd* Instance, userrec *user, const std::string &quitreason, const char* operreason)
+void User::QuitUser(InspIRCd* Instance, User *user, const std::string &quitreason, const char* operreason)
 {
        user->Write("ERROR :Closing link (%s@%s) [%s]", user->ident, user->host, operreason);
        user->muted = true;
@@ -855,7 +855,7 @@ void userrec::QuitUser(InspIRCd* Instance, userrec *user, const std::string &qui
 }
 
 /* adds or updates an entry in the whowas list */
-void userrec::AddToWhoWas()
+void User::AddToWhoWas()
 {
        Command* whowas_command = ServerInstance->Parser->GetHandler("WHOWAS");
        if (whowas_command)
@@ -867,15 +867,15 @@ void userrec::AddToWhoWas()
 }
 
 /* add a client connection to the sockets list */
-void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached, int socketfamily, sockaddr* ip)
+void User::AddClient(InspIRCd* Instance, int socket, int port, bool iscached, int socketfamily, sockaddr* ip)
 {
-       /* NOTE: Calling this one parameter constructor for userrec automatically
+       /* NOTE: Calling this one parameter constructor for User automatically
         * allocates a new UUID and places it in the hash_map.
         */
-       userrec* New = NULL;
+       User* New = NULL;
        try
        {
-               New = new userrec(Instance);
+               New = new User(Instance);
        }
        catch (...)
        {
@@ -928,12 +928,12 @@ void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached,
 
        if (!i)
        {
-               userrec::QuitUser(Instance, New, "Access denied by configuration");
+               User::QuitUser(Instance, New, "Access denied by configuration");
                return;
        }
 
        /*
-        * Check connect class settings and initialise settings into userrec.
+        * Check connect class settings and initialise settings into User.
         * This will be done again after DNS resolution. -- w00t
         */
        New->CheckClass();
@@ -943,7 +943,7 @@ void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached,
        if ((Instance->local_users.size() > Instance->Config->SoftLimit) || (Instance->local_users.size() >= MAXCLIENTS))
        {
                Instance->WriteOpers("*** Warning: softlimit value has been reached: %d clients", Instance->Config->SoftLimit);
-               userrec::QuitUser(Instance, New,"No more connections allowed");
+               User::QuitUser(Instance, New,"No more connections allowed");
                return;
        }
 
@@ -960,7 +960,7 @@ void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached,
 #ifndef WINDOWS
        if ((unsigned int)socket >= MAX_DESCRIPTORS)
        {
-               userrec::QuitUser(Instance, New, "Server is full");
+               User::QuitUser(Instance, New, "Server is full");
                return;
        }
 #endif
@@ -975,7 +975,7 @@ void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached,
                        if (*Instance->Config->MoronBanner)
                                New->WriteServ("NOTICE %s :*** %s", New->nick, Instance->Config->MoronBanner);
                        snprintf(reason,MAXBUF,"Z-Lined: %s",r->reason);
-                       userrec::QuitUser(Instance, New, reason);
+                       User::QuitUser(Instance, New, reason);
                        return;
                }
        }
@@ -984,7 +984,7 @@ void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached,
         {
                 if (!Instance->SE->AddFd(New))
                 {
-                       userrec::QuitUser(Instance, New, "Internal error handling connection");
+                       User::QuitUser(Instance, New, "Internal error handling connection");
                 }
         }
 
@@ -994,7 +994,7 @@ void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached,
        New->WriteServ("NOTICE Auth :*** Looking up your hostname...");
 }
 
-unsigned long userrec::GlobalCloneCount()
+unsigned long User::GlobalCloneCount()
 {
        clonemap::iterator x = ServerInstance->global_clones.find(this->GetIPString());
        if (x != ServerInstance->global_clones.end())
@@ -1003,7 +1003,7 @@ unsigned long userrec::GlobalCloneCount()
                return 0;
 }
 
-unsigned long userrec::LocalCloneCount()
+unsigned long User::LocalCloneCount()
 {
        clonemap::iterator x = ServerInstance->local_clones.find(this->GetIPString());
        if (x != ServerInstance->local_clones.end())
@@ -1015,24 +1015,24 @@ unsigned long userrec::LocalCloneCount()
 /*
  * Check class restrictions
  */
-void userrec::CheckClass(const std::string &explicit_class)
+void User::CheckClass(const std::string &explicit_class)
 {
        ConnectClass* a = this->GetClass(explicit_class);
 
        if ((!a) || (a->GetType() == CC_DENY))
        {
-               userrec::QuitUser(ServerInstance, this, "Unauthorised connection");
+               User::QuitUser(ServerInstance, this, "Unauthorised connection");
                return;
        }
        else if ((a->GetMaxLocal()) && (this->LocalCloneCount() > a->GetMaxLocal()))
        {
-               userrec::QuitUser(ServerInstance, this, "No more connections allowed from your host via this connect class (local)");
+               User::QuitUser(ServerInstance, this, "No more connections allowed from your host via this connect class (local)");
                ServerInstance->WriteOpers("*** WARNING: maximum LOCAL connections (%ld) exceeded for IP %s", a->GetMaxLocal(), this->GetIPString());
                return;
        }
        else if ((a->GetMaxGlobal()) && (this->GlobalCloneCount() > a->GetMaxGlobal()))
        {
-               userrec::QuitUser(ServerInstance, this, "No more connections allowed from your host via this connect class (global)");
+               User::QuitUser(ServerInstance, this, "No more connections allowed from your host via this connect class (global)");
                ServerInstance->WriteOpers("*** WARNING: maximum GLOBAL connections (%ld) exceeded for IP %s", a->GetMaxGlobal(), this->GetIPString());
                return;
        }
@@ -1047,13 +1047,13 @@ void userrec::CheckClass(const std::string &explicit_class)
        this->MaxChans = a->GetMaxChans();
 }
 
-void userrec::FullConnect()
+void User::FullConnect()
 {
        ServerInstance->stats->statsConnects++;
        this->idle_lastmsg = ServerInstance->Time();
 
        /*
-        * You may be thinking "wtf, we checked this in userrec::AddClient!" - and yes, we did, BUT.
+        * You may be thinking "wtf, we checked this in User::AddClient!" - and yes, we did, BUT.
         * At the time AddClient is called, we don't have a resolved host, by here we probably do - which
         * may put the user into a totally seperate class with different restrictions! so we *must* check again.
         * Don't remove this! -- w00t
@@ -1065,7 +1065,7 @@ void userrec::FullConnect()
         */
        if ((!this->GetClass()->GetPass().empty()) && (!this->haspassed))
        {
-               userrec::QuitUser(ServerInstance, this, "Invalid password");
+               User::QuitUser(ServerInstance, this, "Invalid password");
                return;
        }
        
@@ -1080,7 +1080,7 @@ void userrec::FullConnect()
                        if (*ServerInstance->Config->MoronBanner)
                                this->WriteServ("NOTICE %s :*** %s", this->nick, ServerInstance->Config->MoronBanner);
                        snprintf(reason,MAXBUF,"G-Lined: %s",r->reason);
-                       userrec::QuitUser(ServerInstance, this, reason);
+                       User::QuitUser(ServerInstance, this, reason);
                        return;
                }
 
@@ -1093,7 +1093,7 @@ void userrec::FullConnect()
                        if (*ServerInstance->Config->MoronBanner)
                                this->WriteServ("NOTICE %s :*** %s", this, ServerInstance->Config->MoronBanner);
                        snprintf(reason,MAXBUF,"K-Lined: %s",n->reason);
-                       userrec::QuitUser(ServerInstance, this, reason);
+                       User::QuitUser(ServerInstance, this, reason);
                        return;
                }
        }
@@ -1134,11 +1134,11 @@ void userrec::FullConnect()
        ServerInstance->SNO->WriteToSnoMask('c',"Client connecting on port %d: %s!%s@%s [%s] [%s]", this->GetPort(), this->nick, this->ident, this->host, this->GetIPString(), this->fullname);
 }
 
-/** userrec::UpdateNick()
+/** User::UpdateNick()
  * re-allocates a nick in the user_hash after they change nicknames,
  * returns a pointer to the new user as it may have moved
  */
-userrec* userrec::UpdateNickHash(const char* New)
+User* User::UpdateNickHash(const char* New)
 {
        try
        {
@@ -1151,7 +1151,7 @@ userrec* userrec::UpdateNickHash(const char* New)
                if (oldnick == ServerInstance->clientlist->end())
                        return NULL; /* doesnt exist */
 
-               userrec* olduser = oldnick->second;
+               User* olduser = oldnick->second;
                (*(ServerInstance->clientlist))[New] = olduser;
                ServerInstance->clientlist->erase(oldnick);
                return olduser;
@@ -1159,12 +1159,12 @@ userrec* userrec::UpdateNickHash(const char* New)
 
        catch (...)
        {
-               ServerInstance->Log(DEBUG,"Exception in userrec::UpdateNickHash()");
+               ServerInstance->Log(DEBUG,"Exception in User::UpdateNickHash()");
                return NULL;
        }
 }
 
-void userrec::InvalidateCache()
+void User::InvalidateCache()
 {
        /* Invalidate cache */
        if (cached_fullhost)
@@ -1178,7 +1178,7 @@ void userrec::InvalidateCache()
        cached_fullhost = cached_hostip = cached_makehost = cached_fullrealhost = NULL;
 }
 
-bool userrec::ForceNickChange(const char* newnick)
+bool User::ForceNickChange(const char* newnick)
 {
        try
        {
@@ -1217,12 +1217,12 @@ bool userrec::ForceNickChange(const char* newnick)
 
        catch (...)
        {
-               ServerInstance->Log(DEBUG,"Exception in userrec::ForceNickChange()");
+               ServerInstance->Log(DEBUG,"Exception in User::ForceNickChange()");
                return false;
        }
 }
 
-void userrec::SetSockAddr(int protocol_family, const char* ip, int port)
+void User::SetSockAddr(int protocol_family, const char* ip, int port)
 {
        switch (protocol_family)
        {
@@ -1252,7 +1252,7 @@ void userrec::SetSockAddr(int protocol_family, const char* ip, int port)
        }
 }
 
-int userrec::GetPort()
+int User::GetPort()
 {
        if (this->ip == NULL)
                return 0;
@@ -1279,7 +1279,7 @@ int userrec::GetPort()
        return 0;
 }
 
-int userrec::GetProtocolFamily()
+int User::GetProtocolFamily()
 {
        if (this->ip == NULL)
                return 0;
@@ -1288,7 +1288,7 @@ int userrec::GetProtocolFamily()
        return sin->sin_family;
 }
 
-const char* userrec::GetIPString()
+const char* User::GetIPString()
 {
        static char buf[1024];
 
@@ -1328,7 +1328,7 @@ const char* userrec::GetIPString()
        return "";
 }
 
-const char* userrec::GetIPString(char* buf)
+const char* User::GetIPString(char* buf)
 {
        if (this->ip == NULL)
        {
@@ -1376,7 +1376,7 @@ const char* userrec::GetIPString(char* buf)
  * something we can change anyway. Makes sense to just let
  * the compiler do that copy for us.
  */
-void userrec::Write(std::string text)
+void User::Write(std::string text)
 {
        if (!ServerInstance->SE->BoundsCheckFd(this))
                return;
@@ -1392,7 +1392,7 @@ void userrec::Write(std::string text)
        }
        catch (...)
        {
-               ServerInstance->Log(DEBUG,"Exception in userrec::Write() std::string::append");
+               ServerInstance->Log(DEBUG,"Exception in User::Write() std::string::append");
                return;
        }
 
@@ -1420,7 +1420,7 @@ void userrec::Write(std::string text)
 
 /** Write()
  */
-void userrec::Write(const char *text, ...)
+void User::Write(const char *text, ...)
 {
        va_list argsPtr;
        char textbuffer[MAXBUF];
@@ -1432,7 +1432,7 @@ void userrec::Write(const char *text, ...)
        this->Write(std::string(textbuffer));
 }
 
-void userrec::WriteServ(const std::string& text)
+void User::WriteServ(const std::string& text)
 {
        char textbuffer[MAXBUF];
 
@@ -1443,7 +1443,7 @@ void userrec::WriteServ(const std::string& text)
 /** WriteServ()
  *  Same as Write(), except `text' is prefixed with `:server.name '.
  */
-void userrec::WriteServ(const char* text, ...)
+void User::WriteServ(const char* text, ...)
 {
        va_list argsPtr;
        char textbuffer[MAXBUF];
@@ -1456,7 +1456,7 @@ void userrec::WriteServ(const char* text, ...)
 }
 
 
-void userrec::WriteFrom(userrec *user, const std::string &text)
+void User::WriteFrom(User *user, const std::string &text)
 {
        char tb[MAXBUF];
 
@@ -1468,7 +1468,7 @@ void userrec::WriteFrom(userrec *user, const std::string &text)
 
 /* write text from an originating user to originating user */
 
-void userrec::WriteFrom(userrec *user, const char* text, ...)
+void User::WriteFrom(User *user, const char* text, ...)
 {
        va_list argsPtr;
        char textbuffer[MAXBUF];
@@ -1483,7 +1483,7 @@ void userrec::WriteFrom(userrec *user, const char* text, ...)
 
 /* write text to an destination user from a source user (e.g. user privmsg) */
 
-void userrec::WriteTo(userrec *dest, const char *data, ...)
+void User::WriteTo(User *dest, const char *data, ...)
 {
        char textbuffer[MAXBUF];
        va_list argsPtr;
@@ -1495,13 +1495,13 @@ void userrec::WriteTo(userrec *dest, const char *data, ...)
        this->WriteTo(dest, std::string(textbuffer));
 }
 
-void userrec::WriteTo(userrec *dest, const std::string &data)
+void User::WriteTo(User *dest, const std::string &data)
 {
        dest->WriteFrom(this, data);
 }
 
 
-void userrec::WriteCommon(const char* text, ...)
+void User::WriteCommon(const char* text, ...)
 {
        char textbuffer[MAXBUF];
        va_list argsPtr;
@@ -1516,7 +1516,7 @@ void userrec::WriteCommon(const char* text, ...)
        this->WriteCommon(std::string(textbuffer));
 }
 
-void userrec::WriteCommon(const std::string &text)
+void User::WriteCommon(const std::string &text)
 {
        try
        {
@@ -1558,7 +1558,7 @@ void userrec::WriteCommon(const std::string &text)
 
        catch (...)
        {
-               ServerInstance->Log(DEBUG,"Exception in userrec::WriteCommon()");
+               ServerInstance->Log(DEBUG,"Exception in User::WriteCommon()");
        }
 }
 
@@ -1567,7 +1567,7 @@ void userrec::WriteCommon(const std::string &text)
  * channel, NOT including the source user e.g. for use in QUIT
  */
 
-void userrec::WriteCommonExcept(const char* text, ...)
+void User::WriteCommonExcept(const char* text, ...)
 {
        char textbuffer[MAXBUF];
        va_list argsPtr;
@@ -1579,7 +1579,7 @@ void userrec::WriteCommonExcept(const char* text, ...)
        this->WriteCommonExcept(std::string(textbuffer));
 }
 
-void userrec::WriteCommonQuit(const std::string &normal_text, const std::string &oper_text)
+void User::WriteCommonQuit(const std::string &normal_text, const std::string &oper_text)
 {
        char tb1[MAXBUF];
        char tb2[MAXBUF];
@@ -1610,7 +1610,7 @@ void userrec::WriteCommonQuit(const std::string &normal_text, const std::string
        }
 }
 
-void userrec::WriteCommonExcept(const std::string &text)
+void User::WriteCommonExcept(const std::string &text)
 {
        char tb1[MAXBUF];
        std::string out1;
@@ -1640,7 +1640,7 @@ void userrec::WriteCommonExcept(const std::string &text)
 
 }
 
-void userrec::WriteWallOps(const std::string &text)
+void User::WriteWallOps(const std::string &text)
 {
        if (!IS_OPER(this) && IS_LOCAL(this))
                return;
@@ -1648,15 +1648,15 @@ void userrec::WriteWallOps(const std::string &text)
        std::string wallop("WALLOPS :");
        wallop.append(text);
 
-       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 (t->IsModeSet('w'))
                        this->WriteTo(t,wallop);
        }
 }
 
-void userrec::WriteWallOps(const char* text, ...)
+void User::WriteWallOps(const char* text, ...)
 {
        char textbuffer[MAXBUF];
        va_list argsPtr;
@@ -1675,12 +1675,12 @@ void userrec::WriteWallOps(const char* text, ...)
  * the first users channels then the second users channels within the outer loop,
  * therefore it was a maximum of x*y iterations (upon returning 0 and checking
  * all possible iterations). However this new function instead checks against the
- * channel's userlist in the inner loop which is a std::map<userrec*,userrec*>
+ * channel's userlist in the inner loop which is a std::map<User*,User*>
  * and saves us time as we already know what pointer value we are after.
  * Don't quote me on the maths as i am not a mathematician or computer scientist,
  * but i believe this algorithm is now x+(log y) maximum iterations instead.
  */
-bool userrec::SharesChannelWith(userrec *other)
+bool User::SharesChannelWith(User *other)
 {
        if ((!other) || (this->registered != REG_ALL) || (other->registered != REG_ALL))
                return false;
@@ -1697,7 +1697,7 @@ bool userrec::SharesChannelWith(userrec *other)
        return false;
 }
 
-bool userrec::ChangeName(const char* gecos)
+bool User::ChangeName(const char* gecos)
 {
        if (!strcmp(gecos, this->fullname))
                return true;
@@ -1715,7 +1715,7 @@ bool userrec::ChangeName(const char* gecos)
        return true;
 }
 
-bool userrec::ChangeDisplayedHost(const char* host)
+bool User::ChangeDisplayedHost(const char* host)
 {
        if (!strcmp(host, this->dhost))
                return true;
@@ -1731,7 +1731,7 @@ bool userrec::ChangeDisplayedHost(const char* host)
        if (this->ServerInstance->Config->CycleHosts)
                this->WriteCommonExcept("QUIT :Changing hosts");
 
-       /* Fix by Om: userrec::dhost is 65 long, this was truncating some long hosts */
+       /* Fix by Om: User::dhost is 65 long, this was truncating some long hosts */
        strlcpy(this->dhost,host,64);
 
        this->InvalidateCache();
@@ -1753,7 +1753,7 @@ bool userrec::ChangeDisplayedHost(const char* host)
        return true;
 }
 
-bool userrec::ChangeIdent(const char* newident)
+bool User::ChangeIdent(const char* newident)
 {
        if (!strcmp(newident, this->ident))
                return true;
@@ -1779,7 +1779,7 @@ bool userrec::ChangeIdent(const char* newident)
        return true;
 }
 
-void userrec::SendAll(const char* command, char* text, ...)
+void User::SendAll(const char* command, char* text, ...)
 {
        char textbuffer[MAXBUF];
        char formatbuffer[MAXBUF];
@@ -1792,14 +1792,14 @@ void userrec::SendAll(const char* command, char* text, ...)
        snprintf(formatbuffer,MAXBUF,":%s %s $* :%s", this->GetFullHost(), command, textbuffer);
        std::string fmt = formatbuffer;
 
-       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++)
        {
                (*i)->Write(fmt);
        }
 }
 
 
-std::string userrec::ChannelList(userrec* source)
+std::string User::ChannelList(User* source)
 {
        try
        {
@@ -1819,12 +1819,12 @@ std::string userrec::ChannelList(userrec* source)
        }
        catch (...)
        {
-               ServerInstance->Log(DEBUG,"Exception in userrec::ChannelList()");
+               ServerInstance->Log(DEBUG,"Exception in User::ChannelList()");
                return "";
        }
 }
 
-void userrec::SplitChanList(userrec* dest, const std::string &cl)
+void User::SplitChanList(User* dest, const std::string &cl)
 {
        std::string line;
        std::ostringstream prefix;
@@ -1865,11 +1865,11 @@ void userrec::SplitChanList(userrec* dest, const std::string &cl)
 
        catch (...)
        {
-               ServerInstance->Log(DEBUG,"Exception in userrec::SplitChanList()");
+               ServerInstance->Log(DEBUG,"Exception in User::SplitChanList()");
        }
 }
 
-unsigned int userrec::GetMaxChans()
+unsigned int User::GetMaxChans()
 {
        return this->MaxChans;
 }
@@ -1879,7 +1879,7 @@ unsigned int userrec::GetMaxChans()
  * then their ip will be taken as 'priority' anyway, so for example,
  * <connect allow="127.0.0.1"> will match joe!bloggs@localhost
  */
-ConnectClass* userrec::GetClass(const std::string &explicit_name)
+ConnectClass* User::GetClass(const std::string &explicit_name)
 {
        if (!explicit_name.empty())
        {
@@ -1910,9 +1910,9 @@ ConnectClass* userrec::GetClass(const std::string &explicit_name)
        return NULL;
 }
 
-void userrec::PurgeEmptyChannels()
+void User::PurgeEmptyChannels()
 {
-       std::vector<chanrec*> to_delete;
+       std::vector<Channel*> to_delete;
 
        // firstly decrement the count on each channel
        for (UCListIter f = this->chans.begin(); f != this->chans.end(); f++)
@@ -1927,14 +1927,14 @@ void userrec::PurgeEmptyChannels()
                        }
                        catch (...)
                        {
-                               ServerInstance->Log(DEBUG,"Exception in userrec::PurgeEmptyChannels to_delete.push_back()");
+                               ServerInstance->Log(DEBUG,"Exception in User::PurgeEmptyChannels to_delete.push_back()");
                        }
                }
        }
 
-       for (std::vector<chanrec*>::iterator n = to_delete.begin(); n != to_delete.end(); n++)
+       for (std::vector<Channel*>::iterator n = to_delete.begin(); n != to_delete.end(); n++)
        {
-               chanrec* thischan = *n;
+               Channel* thischan = *n;
                chan_hash::iterator i2 = ServerInstance->chanlist->find(thischan->name);
                if (i2 != ServerInstance->chanlist->end())
                {
@@ -1948,7 +1948,7 @@ void userrec::PurgeEmptyChannels()
        this->UnOper();
 }
 
-void userrec::ShowMOTD()
+void User::ShowMOTD()
 {
        if (!ServerInstance->Config->MOTD.size())
        {
@@ -1963,7 +1963,7 @@ void userrec::ShowMOTD()
        this->WriteServ("376 %s :End of message of the day.", this->nick);
 }
 
-void userrec::ShowRULES()
+void User::ShowRULES()
 {
        if (!ServerInstance->Config->RULES.size())
        {
@@ -1979,7 +1979,7 @@ void userrec::ShowRULES()
        this->WriteServ("309 %s :End of RULES command.",this->nick);
 }
 
-void userrec::HandleEvent(EventType et, int errornum)
+void User::HandleEvent(EventType et, int errornum)
 {
        /* WARNING: May delete this user! */
        int thisfd = this->GetFd();
@@ -2002,7 +2002,7 @@ void userrec::HandleEvent(EventType et, int errornum)
        }
        catch (...)
        {
-               ServerInstance->Log(DEBUG,"Exception in userrec::HandleEvent intercepted");
+               ServerInstance->Log(DEBUG,"Exception in User::HandleEvent intercepted");
        }
 
        /* If the user has raised an error whilst being processed, quit them now we're safe to */
@@ -2010,12 +2010,12 @@ void userrec::HandleEvent(EventType et, int errornum)
        {
                if (!WriteError.empty())
                {
-                       userrec::QuitUser(ServerInstance, this, GetWriteError());
+                       User::QuitUser(ServerInstance, this, GetWriteError());
                }
        }
 }
 
-void userrec::SetOperQuit(const std::string &oquit)
+void User::SetOperQuit(const std::string &oquit)
 {
        if (operquit)
                return;
@@ -2023,7 +2023,7 @@ void userrec::SetOperQuit(const std::string &oquit)
        operquit = strdup(oquit.c_str());
 }
 
-const char* userrec::GetOperQuit()
+const char* User::GetOperQuit()
 {
        return operquit ? operquit : "";
 }
@@ -2036,7 +2036,7 @@ VisData::~VisData()
 {
 }
 
-bool VisData::VisibleTo(userrec* user)
+bool VisData::VisibleTo(User* user)
 {
        return true;
 }
index a28e61766f40b85182c5e239b83ee524a4fd6d4a..4f93248259df3f5378f1f7abec9e25758c436694 100644 (file)
@@ -416,7 +416,7 @@ QLine* XLineManager::matches_qline(const char* nick, bool permonly)
 
 // returns a pointer to the reason if a host matches a gline, NULL if it didnt match
 
-GLine* XLineManager::matches_gline(userrec* user, bool permonly)
+GLine* XLineManager::matches_gline(User* user, bool permonly)
 {
        if ((glines.empty()) && (pglines.empty()))
                return NULL;
@@ -446,7 +446,7 @@ GLine* XLineManager::matches_gline(userrec* user, bool permonly)
        return NULL;
 }
 
-ELine* XLineManager::matches_exception(userrec* user, bool permonly)
+ELine* XLineManager::matches_exception(User* user, bool permonly)
 {
        if ((elines.empty()) && (pelines.empty()))
                return NULL;
@@ -587,7 +587,7 @@ ZLine* XLineManager::matches_zline(const char* ipaddr, bool permonly)
 
 // returns a pointer to the reason if a host matches a kline, NULL if it didnt match
 
-KLine* XLineManager::matches_kline(userrec* user, bool permonly)
+KLine* XLineManager::matches_kline(User* user, bool permonly)
 {
        if ((klines.empty()) && (pklines.empty()))
                return NULL;
@@ -705,9 +705,9 @@ void XLineManager::apply_lines(const int What)
                        return;
 
                XLine* check = NULL;
-               for (std::vector<userrec*>::const_iterator u2 = ServerInstance->local_users.begin(); u2 != ServerInstance->local_users.end(); u2++)
+               for (std::vector<User*>::const_iterator u2 = ServerInstance->local_users.begin(); u2 != ServerInstance->local_users.end(); u2++)
                {
-                       userrec* u = (userrec*)(*u2);
+                       User* u = (User*)(*u2);
 
                        if (elines.size() || pelines.size())
                                if (matches_exception(u))
@@ -721,9 +721,9 @@ void XLineManager::apply_lines(const int What)
                                        if (*ServerInstance->Config->MoronBanner)
                                                u->WriteServ("NOTICE %s :*** %s", u->nick, ServerInstance->Config->MoronBanner);
                                        if (ServerInstance->Config->HideBans)
-                                               userrec::QuitUser(ServerInstance, u, "G-Lined", reason);
+                                               User::QuitUser(ServerInstance, u, "G-Lined", reason);
                                        else
-                                               userrec::QuitUser(ServerInstance, u, reason);
+                                               User::QuitUser(ServerInstance, u, reason);
                                }
                        }
 
@@ -735,9 +735,9 @@ void XLineManager::apply_lines(const int What)
                                        if (*ServerInstance->Config->MoronBanner)
                                                u->WriteServ("NOTICE %s :*** %s", u->nick, ServerInstance->Config->MoronBanner);
                                        if (ServerInstance->Config->HideBans)
-                                               userrec::QuitUser(ServerInstance, u, "K-Lined", reason);
+                                               User::QuitUser(ServerInstance, u, "K-Lined", reason);
                                        else
-                                               userrec::QuitUser(ServerInstance, u, reason);
+                                               User::QuitUser(ServerInstance, u, reason);
                                }
                        }
 
@@ -749,9 +749,9 @@ void XLineManager::apply_lines(const int What)
                                        if (*ServerInstance->Config->MoronBanner)
                                                u->WriteServ("NOTICE %s :*** %s", u->nick, ServerInstance->Config->MoronBanner);
                                        if (ServerInstance->Config->HideBans)
-                                               userrec::QuitUser(ServerInstance, u, "Q-Lined", reason);
+                                               User::QuitUser(ServerInstance, u, "Q-Lined", reason);
                                        else
-                                               userrec::QuitUser(ServerInstance, u, reason);
+                                               User::QuitUser(ServerInstance, u, reason);
                                }
                        }
 
@@ -763,9 +763,9 @@ void XLineManager::apply_lines(const int What)
                                        if (*ServerInstance->Config->MoronBanner)
                                                u->WriteServ("NOTICE %s :*** %s", u->nick, ServerInstance->Config->MoronBanner);
                                        if (ServerInstance->Config->HideBans)
-                                               userrec::QuitUser(ServerInstance, u, "Z-Lined", reason);
+                                               User::QuitUser(ServerInstance, u, "Z-Lined", reason);
                                        else
-                                               userrec::QuitUser(ServerInstance, u, reason);
+                                               User::QuitUser(ServerInstance, u, reason);
                                }
                        }
                }
@@ -779,9 +779,9 @@ void XLineManager::apply_lines(const int What)
                        return;
 
                XLine* check = NULL;
-               for (std::vector<userrec*>::const_iterator u2 = ServerInstance->local_users.begin(); u2 != ServerInstance->local_users.end(); u2++)
+               for (std::vector<User*>::const_iterator u2 = ServerInstance->local_users.begin(); u2 != ServerInstance->local_users.end(); u2++)
                {
-                       userrec* u = (userrec*)(*u2);
+                       User* u = (User*)(*u2);
 
                        if (elines.size() || pelines.size())
                        {
@@ -797,9 +797,9 @@ void XLineManager::apply_lines(const int What)
                                        if (*ServerInstance->Config->MoronBanner)
                                                u->WriteServ("NOTICE %s :*** %s", u->nick, ServerInstance->Config->MoronBanner);
                                        if (ServerInstance->Config->HideBans)
-                                               userrec::QuitUser(ServerInstance, u, "G-Lined", reason);
+                                               User::QuitUser(ServerInstance, u, "G-Lined", reason);
                                        else
-                                               userrec::QuitUser(ServerInstance, u, reason);
+                                               User::QuitUser(ServerInstance, u, reason);
                                }
                        }
                        if ((What & APPLY_KLINES) && (klines.size() || pklines.size()))
@@ -810,9 +810,9 @@ void XLineManager::apply_lines(const int What)
                                        if (*ServerInstance->Config->MoronBanner)
                                                u->WriteServ("NOTICE %s :*** %s", u->nick, ServerInstance->Config->MoronBanner);
                                        if (ServerInstance->Config->HideBans)
-                                               userrec::QuitUser(ServerInstance, u, "K-Lined", reason);
+                                               User::QuitUser(ServerInstance, u, "K-Lined", reason);
                                        else
-                                               userrec::QuitUser(ServerInstance, u, reason);
+                                               User::QuitUser(ServerInstance, u, reason);
                                }
                        }
                        if ((What & APPLY_QLINES) && (qlines.size() || pqlines.size()))
@@ -823,9 +823,9 @@ void XLineManager::apply_lines(const int What)
                                        if (*ServerInstance->Config->MoronBanner)
                                                u->WriteServ("NOTICE %s :*** %s", u->nick, ServerInstance->Config->MoronBanner);
                                        if (ServerInstance->Config->HideBans)
-                                               userrec::QuitUser(ServerInstance, u, "Q-Lined", reason);
+                                               User::QuitUser(ServerInstance, u, "Q-Lined", reason);
                                        else
-                                               userrec::QuitUser(ServerInstance, u, reason);
+                                               User::QuitUser(ServerInstance, u, reason);
                                }
                        }
                        if ((What & APPLY_ZLINES) && (zlines.size() || pzlines.size()))
@@ -836,16 +836,16 @@ void XLineManager::apply_lines(const int What)
                                        if (*ServerInstance->Config->MoronBanner)
                                                u->WriteServ("NOTICE %s :*** %s", u->nick, ServerInstance->Config->MoronBanner);
                                        if (ServerInstance->Config->HideBans)
-                                               userrec::QuitUser(ServerInstance, u, "Z-Lined", reason);
+                                               User::QuitUser(ServerInstance, u, "Z-Lined", reason);
                                        else
-                                               userrec::QuitUser(ServerInstance, u, reason);
+                                               User::QuitUser(ServerInstance, u, reason);
                                }
                        }
                }
        }
 }
 
-void XLineManager::stats_k(userrec* user, string_list &results)
+void XLineManager::stats_k(User* user, string_list &results)
 {
        std::string sn = ServerInstance->Config->ServerName;
        for (std::vector<KLine*>::iterator i = klines.begin(); i != klines.end(); i++)
@@ -854,7 +854,7 @@ void XLineManager::stats_k(userrec* user, string_list &results)
                results.push_back(sn+" 216 "+user->nick+" :"+(*i)->identmask+"@"+(*i)->hostmask+" "+ConvToStr((*i)->set_time)+" "+ConvToStr((*i)->duration)+" "+(*i)->source+" :"+(*i)->reason);
 }
 
-void XLineManager::stats_g(userrec* user, string_list &results)
+void XLineManager::stats_g(User* user, string_list &results)
 {
        std::string sn = ServerInstance->Config->ServerName;
        for (std::vector<GLine*>::iterator i = glines.begin(); i != glines.end(); i++)
@@ -863,7 +863,7 @@ void XLineManager::stats_g(userrec* user, string_list &results)
                results.push_back(sn+" 223 "+user->nick+" :"+(*i)->identmask+"@"+(*i)->hostmask+" "+ConvToStr((*i)->set_time)+" "+ConvToStr((*i)->duration)+" "+(*i)->source+" :"+(*i)->reason);
 }
 
-void XLineManager::stats_q(userrec* user, string_list &results)
+void XLineManager::stats_q(User* user, string_list &results)
 {
        std::string sn = ServerInstance->Config->ServerName;
        for (std::vector<QLine*>::iterator i = qlines.begin(); i != qlines.end(); i++)
@@ -872,7 +872,7 @@ void XLineManager::stats_q(userrec* user, string_list &results)
                results.push_back(sn+" 217 "+user->nick+" :"+(*i)->nick+" "+ConvToStr((*i)->set_time)+" "+ConvToStr((*i)->duration)+" "+(*i)->source+" :"+(*i)->reason);
 }
 
-void XLineManager::stats_z(userrec* user, string_list &results)
+void XLineManager::stats_z(User* user, string_list &results)
 {
        std::string sn = ServerInstance->Config->ServerName;
        for (std::vector<ZLine*>::iterator i = zlines.begin(); i != zlines.end(); i++)
@@ -881,7 +881,7 @@ void XLineManager::stats_z(userrec* user, string_list &results)
                results.push_back(sn+" 223 "+user->nick+" :"+(*i)->ipaddr+" "+ConvToStr((*i)->set_time)+" "+ConvToStr((*i)->duration)+" "+(*i)->source+" :"+(*i)->reason);
 }
 
-void XLineManager::stats_e(userrec* user, string_list &results)
+void XLineManager::stats_e(User* user, string_list &results)
 {
        std::string sn = ServerInstance->Config->ServerName;
        for (std::vector<ELine*>::iterator i = elines.begin(); i != elines.end(); i++)