]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/channels.h
Refactor port binding, warning not yet tested fully
[user/henk/code/inspircd.git] / include / channels.h
index b480d77890c1a1fb790026ac1e36c7980be9c411..f68f838894e8defb9460763bd09f99c1bc10f049 100644 (file)
@@ -2,12 +2,9 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- *                       E-mail:
- *                <brain@chatspike.net>
- *               <Craig@chatspike.net>
- *     
- * Written by Craig Edwards, Craig McLure, and others.
+ *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
+ *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
  *
@@ -72,7 +69,7 @@ typedef std::vector<BanItem>  BanList;
 
 /** A list of users on a channel
  */
-typedef std::map<userrec*,userrec*> CUList;
+typedef std::map<userrec*,std::string> CUList;
 
 /** Shorthand for CUList::iterator
  */
@@ -127,6 +124,10 @@ class chanrec : public Extensible
 
        prefixlist prefixes;
 
+       /** Maximum number of bans (cached)
+        */
+       int maxbans;
+
  public:
        /** The channels name.
         */
@@ -177,7 +178,7 @@ class chanrec : public Extensible
        /** The last user to set the topic.
         * If this member is an empty string, no topic was ever set.
         */
-       char setby[NICKMAX];
+       char setby[128];
 
        /** Contains the channel user limit.
         * If this value is zero, there is no limit in place.
@@ -351,7 +352,7 @@ class chanrec : public Extensible
         * 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 = "");
+       static chanrec* JoinUser(InspIRCd* ServerInstance, userrec *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
@@ -435,8 +436,10 @@ class chanrec : public Extensible
 
        /** Spool the NAMES list for this channel to the given user
         * @param user The user to spool the NAMES list to
+        * @param ulist The user list to send, NULL to use the
+        * channel's default names list of everyone
         */
-       void UserList(userrec *user);
+       void UserList(userrec *user, CUList* ulist = NULL);
 
        /** Get the number of invisible users on this channel
         * @return Number of invisible users
@@ -513,6 +516,10 @@ class chanrec : public Extensible
         */
        bool IsBanned(userrec* user);
 
+       /** Clears the cached max bans value
+        */
+       void ResetMaxBans();
+
        /** Destructor for chanrec
         */
        virtual ~chanrec() { /* stub */ }