本文整理汇总了C#中Squishy.Irc.IrcChannel类的典型用法代码示例。如果您正苦于以下问题:C# IrcChannel类的具体用法?C# IrcChannel怎么用?C# IrcChannel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IrcChannel类属于Squishy.Irc命名空间,在下文中一共展示了IrcChannel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IrcUser
public IrcUser(IrcClient irc, string nick, IrcChannel chan)
: this(irc)
{
m_nick = nick;
m_comChans.Add(chan.Name, chan);
irc.OnUserEncountered(this);
}
示例2: UnbanTimer
public UnbanTimer(IrcChannel chan, string mask, TimeSpan timeout)
{
Channel = chan;
Mask = mask;
m_timer = new Timer(timeout.TotalMilliseconds);
m_timer.Elapsed += OnTick;
m_timer.AutoReset = false;
chan.AddUnbanTimer(this);
m_timer.Start();
}
示例3: Vote
/// <summary>
/// Constructor
/// </summary>
/// <param name="voteQuestion">The string of the vote.</param>
/// <param name="channel">The channel where the vote takes place.</param>
/// <param name="lifeSpan">If null, the vote lasts indefinitely. Else sets the time the vote lasts before ending (seconds)</param>
public Vote(string voteQuestion, IrcChannel channel, int lifeSpan)
{
m_Vote = voteQuestion;
m_Chan = channel;
m_CreationTime = DateTime.Now;
m_Timer = new Timer(lifeSpan * 1000);
m_Timer.AutoReset = false;
m_Timer.Start();
m_Timer.Elapsed += m_Timer_Elapsed;
}
示例4: AutoVoiceUser
public AutoVoiceUser(IrcUser user,IrcChannel channel)
{
User = user;
Channel = channel;
_voiceTimer.Elapsed += delegate
{
if(!user.Modes.Contains("v"))
user.IrcClient.CommandHandler.Mode(Channel, "+v", User);
_voiceTimer.Stop();
};
_voiceTimer.Start();
}
示例5: IsOn
/// <summary>
/// Indicates wether or not this User is on the specified channel.
/// </summary>
public bool IsOn(IrcChannel chan)
{
return IsOn(chan.Name);
}
示例6: OnCtcpRequest
/// <summary>
/// Fires when the Client receives any kind of CTCP request.
/// Automatically replies to the VERSION request with the content of the Version variable
/// if not overridden.
/// </summary>
/// <param name="user">The User who sent the text</param>
/// <param name="chan">The Channel where it was sent (can be null)</param>
/// <param name="request">The request type (such as VERSION)</param>
/// <param name="args">The text which was sent in addition to the request</param>
protected virtual void OnCtcpRequest(IrcUser user, IrcChannel chan, string request, string args)
{
if (request.ToUpper() == "VERSION" && Version != "")
CommandHandler.CtcpReply(user.Nick, "VERSION", Version);
}
示例7: OnChannelMsg
/// <summary>
/// Fires when the Client receives a PRIVMSG which was directed to a Channel.
/// </summary>
protected virtual void OnChannelMsg(IrcUser user, IrcChannel chan, StringStream text)
{
}
示例8: OnCannotJoin
protected virtual void OnCannotJoin(IrcChannel chan, string reason)
{
}
示例9: OnBanListComplete
/// <summary>
/// Fires when the BanList for a Channel has been sent completely.
/// </summary>
protected virtual void OnBanListComplete(IrcChannel chan)
{
}
示例10: FlagDeletedNotify
internal void FlagDeletedNotify(IrcUser user, IrcChannel chan, Privilege priv, IrcUser target)
{
chan.FlagDeletedNotify(user, priv, target);
OnFlagDeleted(user, chan, priv, target);
}
示例11: CtcpRequestNotify
internal void CtcpRequestNotify(IrcUser user, IrcChannel chan, string request, string text)
{
if (request.ToUpper() == "DCC" && chan == null)
{
Dcc.Handle(user, text);
}
OnCtcpRequest(user, chan, request, text);
}
示例12: CtcpReplyNotify
internal void CtcpReplyNotify(IrcUser user, IrcChannel chan, string reply, string args)
{
OnCtcpReply(user, chan, reply, args);
}
示例13: ChannelMsgNotify
internal void ChannelMsgNotify(IrcUser user, IrcChannel chan, StringStream text)
{
chan.MsgReceivedNotify(user, text);
OnChannelMsg(user, chan, text);
}
示例14: ChanCreationTimeNotify
internal virtual void ChanCreationTimeNotify(IrcChannel chan, DateTime creationTime)
{
chan.ChanCreationTimeSentNotify(creationTime);
OnChanCreationTime(chan, creationTime);
}
示例15: CannotJoinNotify
internal void CannotJoinNotify(IrcChannel channel, string reason)
{
OnCannotJoin(channel, reason);
}