/* * $Id$ * $URL$ * $Rev$ * $Author$ * $Date$ * * SmartIrc4net - the IRC library for .NET/C# * * Copyright (c) 2003-2005 Mirco Bauer * * Full LGPL License: * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ namespace Meebey.SmartIrc4net { /// /// This class manages the information of a user within a channel. /// /// /// only used with channel sync /// /// public class ChannelUser { private string _Channel; private IrcUser _IrcUser; private bool _IsOp; private bool _IsVoice; /// /// /// /// /// internal ChannelUser(string channel, IrcUser ircuser) { _Channel = channel; _IrcUser = ircuser; } #if LOG4NET ~ChannelUser() { Logger.ChannelSyncing.Debug("ChannelUser ("+Channel+":"+IrcUser.Nick+") destroyed"); } #endif /// /// Gets the channel name /// public string Channel { get { return _Channel; } } /// /// Gets the server operator status of the user /// public bool IsIrcOp { get { return _IrcUser.IsIrcOp; } } /// /// Gets or sets the op flag of the user (+o) /// /// /// only used with channel sync /// public bool IsOp { get { return _IsOp; } set { _IsOp = value; } } /// /// Gets or sets the voice flag of the user (+v) /// /// /// only used with channel sync /// public bool IsVoice { get { return _IsVoice; } set { _IsVoice = value; } } /// /// Gets the away status of the user /// public bool IsAway { get { return _IrcUser.IsAway; } } /// /// Gets the underlaying IrcUser object /// public IrcUser IrcUser { get { return _IrcUser; } } /// /// Gets the nickname of the user /// public string Nick { get { return _IrcUser.Nick; } } /// /// Gets the identity (username) of the user, which is used by some IRC networks for authentication. /// public string Ident { get { return _IrcUser.Ident; } } /// /// Gets the hostname of the user, /// public string Host { get { return _IrcUser.Host; } } /// /// Gets the supposed real name of the user. /// public string Realname { get { return _IrcUser.Realname; } } /// /// Gets the server the user is connected to. /// /// public string Server { get { return _IrcUser.Server; } } /// /// Gets or sets the count of hops between you and the user's server /// public int HopCount { get { return _IrcUser.HopCount; } } /// /// Gets the list of channels the user has joined /// public string[] JoinedChannels { get { return _IrcUser.JoinedChannels; } } } }