本文整理汇总了C#中Squishy.Irc.IrcUser类的典型用法代码示例。如果您正苦于以下问题:C# IrcUser类的具体用法?C# IrcUser怎么用?C# IrcUser使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IrcUser类属于Squishy.Irc命名空间,在下文中一共展示了IrcUser类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IrcClient
public IrcClient(Encoding encoding)
{
Reset();
m_Users = new Dictionary<string, IrcUser>(StringComparer.InvariantCultureIgnoreCase);
m_unbanTimers = new Dictionary<string, UnbanTimer>();
m_me = new IrcUser(this);
m_client = new Client(this);
m_CommandHandler = new IrcCommandHandler(this);
m_dcc = new Dcc.Dcc(this);
protHandler = new IrcProtocolHandler(this, encoding);
}
示例2: 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();
}
示例3: OnUserParsed
internal void OnUserParsed(IrcUser user)
{
AuthMgr.OnNewUser(user);
}
示例4: GetOrCreateUser
public IrcUser GetOrCreateUser(string mask)
{
IrcUser user = null;
var nick = "";
if (mask.IndexOf("!") > -1)
nick = mask.Split('!')[0];
else
nick = mask;
user = GetUser(nick);
if (user == null)
{
user = new IrcUser(this, mask);
OnUserEncountered(user);
}
else if (!user.IsParsed)
{
user.Parse(mask);
}
return user;
}
示例5: OnUserEncountered
protected internal virtual void OnUserEncountered(IrcUser user)
{
m_Users.Remove(user.Nick);
m_Users.Add(user.Nick, user);
if (AuthMgr != null && AutoResolveAuth)
{
// resolve
AuthMgr.ResolveAuth(user);
}
}
示例6: OnCtcpReply
/// <summary>
/// Fires when the Client receives any kind of CTCP reply.
/// </summary>
/// <param name="user">The User who sent the text</param>
/// <param name="channel">The Channel where it was sent (can be null)</param>
/// <param name="reply">The reply type (such as VERSION)</param>
/// <param name="args">The text which was sent in addition to the reply</param>
protected virtual void OnCtcpReply(IrcUser user, IrcChannel chan, string reply, string args)
{
}
示例7: OnFlagDeleted
/// <summary>
/// Fires when a User deletes a Channel flag from another User.
/// </summary>
protected virtual void OnFlagDeleted(IrcUser user, IrcChannel chan, Privilege priv, IrcUser target)
{
}
示例8: TopicNotify
internal void TopicNotify(IrcUser user, IrcChannel chan, string text, bool initial)
{
chan.TopicChangedNotify(user, text, initial);
OnTopic(user, chan, text, initial);
}
示例9: UsersAddedNotify
internal void UsersAddedNotify(IrcChannel chan, IrcUser[] users)
{
chan.UsersAddedNotify(users);
OnUsersAdded(chan, users);
}
示例10: PartNotify
internal void PartNotify(IrcUser user, IrcChannel chan, string reason)
{
OnPart(user, chan, reason);
chan.UserPartedNotify(user, reason);
user.DeleteChannel(chan.Name);
CheckUserKnown(user);
}
示例11: QuitNotify
internal void QuitNotify(IrcUser user, string reason)
{
foreach (var chan in user.Channels.Values)
{
chan.UserLeftNotify(user, reason);
}
OnQuit(user, reason);
m_Users.Remove(user.Nick);
if (user == Me)
{
m_client.Disconnect();
}
}
示例12: 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);
}
示例13: FlagDeletedNotify
internal void FlagDeletedNotify(IrcUser user, IrcChannel chan, Privilege priv, IrcUser target)
{
chan.FlagDeletedNotify(user, priv, target);
OnFlagDeleted(user, chan, priv, target);
}
示例14: CtcpReplyNotify
internal void CtcpReplyNotify(IrcUser user, IrcChannel chan, string reply, string args)
{
OnCtcpReply(user, chan, reply, args);
}
示例15: CheckUserKnown
internal void CheckUserKnown(IrcUser user)
{
if (user.Channels.Count == 0)
{
OnUserDisappeared(user);
m_Users.Remove(user.Nick);
}
}