]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/users.h
Added <options:notimesync> to the example config
[user/henk/code/inspircd.git] / include / users.h
index 731cb785ad986ce2b24c071010f33a5cd0e185b5..018336e77691e480006a43888435240abd0f975f 100644 (file)
@@ -65,8 +65,6 @@ class Invited : public classbase
         irc::string channel;
 };
 
-
-
 class InspIRCd;
 
 /** Derived from Resolver, and performs user forward/reverse lookups.
@@ -80,7 +78,7 @@ class UserResolver : public Resolver
        int bound_fd;
        bool fwd;
  public:
-       UserResolver(InspIRCd* Instance, userrec* user, std::string to_resolve, bool forward);
+       UserResolver(InspIRCd* Instance, userrec* user, std::string to_resolve, QueryType qt);
 
        void OnLookupComplete(const std::string &result);
        void OnError(ResolverError e, const std::string &errormessage);
@@ -171,6 +169,10 @@ class userrec : public connection
         * channels are removed from this list.
         */
        InvitedList invites;
+
+       /** Number of channels this user is currently on
+        */
+       unsigned int ChannelCount;
  public:
        /** Resolvers for looking up this users IP address
         * This will occur if and when res_reverse completes.
@@ -377,7 +379,7 @@ class userrec : public connection
         * e.g. in the above example if masks c and e are not
         * valid, this function will return +ab-d
         */
-       std::string userrec::ProcessNoticeMasks(const char *sm);
+       std::string ProcessNoticeMasks(const char *sm);
 
        /** Returns true if a notice mask is set
         * @param sm A notice mask character to check
@@ -513,11 +515,17 @@ class userrec : public connection
         */
        char* MakeWildHost();
 
-       /** Creates a host.
-        * Takes a buffer to use and fills the given buffer with the host in the format nick!user@host
-        * @param Buffer to fill with host information
+       /** Creates a usermask with real host.
+        * Takes a buffer to use and fills the given buffer with the hostmask in the format user@host
+        * @return the usermask in the format user@host
         */
-       void MakeHost(char* nhost);
+       char* MakeHost();
+
+       /** Creates a usermask with real ip.
+        * Takes a buffer to use and fills the given buffer with the ipmask in the format user@ip
+        * @return the usermask in the format user@ip
+        */
+       char* MakeHostIP();
 
        /** Shuts down and closes the user's socket
         * This will not cause the user to be deleted. Use InspIRCd::QuitUser for this,
@@ -718,6 +726,12 @@ class userrec : public connection
         */
        int CountChannels();
 
+       /** Modify the number of channels this user is on (used by CountChannels).
+        * Pass a positive number to increment the counter, or a negative number
+        * to decrement it.
+        */
+       void ModChannelCount(int n);
+
        /** Send a notice to all local users from this user
         * @param text The text format string to send
         * @param ... Format arguments
@@ -759,7 +773,7 @@ class userrec : public connection
        /** Handle socket event.
         * From EventHandler class.
         */
-       void HandleEvent(EventType et);
+       void HandleEvent(EventType et, int errornum = 0);
 
        /** Default destructor
         */
@@ -816,7 +830,7 @@ namespace irc
 
                /** Called every hour by the core to remove expired entries
                 */
-               void MaintainWhoWas(time_t TIME);
+               void MaintainWhoWas(InspIRCd* ServerInstance, time_t TIME);
        };
 };