2 * $Id: Channel.cs 207 2006-01-11 10:08:56Z meebey $
3 * $URL: svn://svn.qnetp.net/smartirc/SmartIrc4net/tags/0.4.0/src/IrcClient/Channel.cs $
6 * $Date: 2006-01-11 11:08:56 +0100 (Wed, 11 Jan 2006) $
8 * SmartIrc4net - the IRC library for .NET/C# <http://smartirc4net.sf.net>
10 * Copyright (c) 2003-2005 Mirco Bauer <meebey@meebey.net> <http://www.meebey.net>
12 * Full LGPL License: <http://www.gnu.org/licenses/lgpl.txt>
14 * This library is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Lesser General Public
16 * License as published by the Free Software Foundation; either
17 * version 2.1 of the License, or (at your option) any later version.
19 * This library is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Lesser General Public License for more details.
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with this library; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30 using System
.Collections
;
31 using System
.Collections
.Specialized
;
33 namespace Meebey
.SmartIrc4net
38 /// <threadsafety static="true" instance="true" />
42 private string _Key
= String
.Empty
;
43 private Hashtable _Users
= Hashtable
.Synchronized(new Hashtable(new CaseInsensitiveHashCodeProvider(), new CaseInsensitiveComparer()));
44 private Hashtable _Ops
= Hashtable
.Synchronized(new Hashtable(new CaseInsensitiveHashCodeProvider(), new CaseInsensitiveComparer()));
45 private Hashtable _Voices
= Hashtable
.Synchronized(new Hashtable(new CaseInsensitiveHashCodeProvider(), new CaseInsensitiveComparer()));
46 private StringCollection _Bans
= new StringCollection();
47 private string _Topic
= String
.Empty
;
48 private int _UserLimit
;
49 private string _Mode
= String
.Empty
;
50 private DateTime _ActiveSyncStart
;
51 private DateTime _ActiveSyncStop
;
52 private TimeSpan _ActiveSyncTime
;
57 /// <param name="name"> </param>
58 internal Channel(string name
)
61 _ActiveSyncStart
= DateTime
.Now
;
67 Logger
.ChannelSyncing
.Debug("Channel ("+Name
+") destroyed");
98 public Hashtable Users
{
100 return (Hashtable
)_Users
.Clone();
108 internal Hashtable UnsafeUsers
{
118 public Hashtable Ops
{
120 return (Hashtable
)_Ops
.Clone();
128 internal Hashtable UnsafeOps
{
138 public Hashtable Voices
{
140 return (Hashtable
)_Voices
.Clone();
148 internal Hashtable UnsafeVoices
{
158 public StringCollection Bans
{
168 public string Topic
{
181 public int UserLimit
{
207 public DateTime ActiveSyncStart
{
209 return _ActiveSyncStart
;
217 public DateTime ActiveSyncStop
{
219 return _ActiveSyncStop
;
222 _ActiveSyncStop
= value;
223 _ActiveSyncTime
= _ActiveSyncStop
.Subtract(_ActiveSyncStart
);
231 public TimeSpan ActiveSyncTime
{
233 return _ActiveSyncTime
;