本文整理汇总了C#中IrcDotNet.IrcLocalUser类的典型用法代码示例。如果您正苦于以下问题:C# IrcLocalUser类的具体用法?C# IrcLocalUser怎么用?C# IrcLocalUser使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IrcLocalUser类属于IrcDotNet命名空间,在下文中一共展示了IrcLocalUser类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleClientConnected
protected virtual void HandleClientConnected(IrcRegistrationInfo regInfo)
{
if (regInfo.Password != null)
// Authenticate with server using password.
SendMessagePassword(regInfo.Password);
// Check if client is registering as service or normal user.
if (regInfo is IrcServiceRegistrationInfo)
{
// Register client as service.
var serviceRegInfo = (IrcServiceRegistrationInfo)regInfo;
SendMessageService(serviceRegInfo.NickName, serviceRegInfo.Distribution,
serviceRegInfo.Description);
this.localUser = new IrcLocalUser(serviceRegInfo.NickName, serviceRegInfo.Distribution,
serviceRegInfo.Description);
}
else
{
// Register client as normal user.
var userRegInfo = (IrcUserRegistrationInfo)regInfo;
SendMessageNick(userRegInfo.NickName);
SendMessageUser(userRegInfo.UserName, GetNumericUserMode(userRegInfo.UserModes),
userRegInfo.RealName);
this.localUser = new IrcLocalUser(userRegInfo.NickName, userRegInfo.UserName, userRegInfo.RealName,
userRegInfo.UserModes);
}
this.localUser.Client = this;
// Add local user to list of known users.
lock (((ICollection)this.usersReadOnly).SyncRoot)
this.users.Add(this.localUser);
OnConnected(new EventArgs());
}
示例2: OnLocalUserQuit
protected override void OnLocalUserQuit(IrcLocalUser localUser, IrcCommentEventArgs e)
{
Console.WriteLine("Quit: {0}",e.Comment);
}
示例3: OnLocalUserQuit
protected abstract void OnLocalUserQuit(IrcLocalUser localUser, IrcCommentEventArgs e);
示例4: OnLocalUserLeftChannel
protected override void OnLocalUserLeftChannel(IrcLocalUser localUser, IrcChannelEventArgs e)
{
//
}
示例5: SendGreeting
private void SendGreeting(IrcLocalUser localUser, IIrcMessageTarget target)
{
localUser.SendNotice(target, "This is the {0}, welcome.", ProgramInfo.AssemblyTitle);
localUser.SendNotice(target, "Message me with '.help' for instructions on how to use me.");
localUser.SendNotice(target, "Remember to log in via a private message and not via the channel.");
}
示例6: OnLocalUserLeftChannel
/// <summary>
/// </summary>
/// <param name="localUser">
/// </param>
/// <param name="e">
/// </param>
protected abstract void OnLocalUserLeftChannel(IrcLocalUser localUser, IrcChannelEventArgs e);
示例7: SetLocalUserModes
internal void SetLocalUserModes(IrcLocalUser user, string modes)
{
SendMessageUserMode(user.NickName, modes);
}
示例8: OnLocalUserJoinedChannel
protected override void OnLocalUserJoinedChannel(IrcLocalUser localUser, IrcChannelEventArgs e)
{
thisclient.FloodPreventer = new IrcStandardFloodPreventer(2,4000);
thisclient.WhoReplyReceived += UserListUpdate;
if (xmlprovider.runningVotes().Count() > 0)
{
VoteTimer = new System.Timers.Timer(5000);
VoteTimer.Elapsed += OnVoteTimerEvent;
VoteTimer.Enabled = true;
}
//OnClientRegistered may happen before joined channel thus...
_streamProviderManager = new StreamProviderManager();
_streamProviderManager.StreamStarted += OnStreamStarted;
_streamProviderManager.StreamStopped += OnStreamStopped;
_streamProviderManager.StreamGlobalNotification += OnStreamGlobalNotification;
_streamProviderManager.AddStreamProvider(new TwitchProvider());
_streamProviderManager.AddStreamProvider(new HitboxProvider());
//localUser.Client.WhoReplyReceived += WhoReplyReceived;
if (reconnectimer != null)
{
reconnectimer.Dispose();
}
if (!debug)
{
reconnectimer = new System.Timers.Timer(150000);
}
else
{
reconnectimer = new System.Timers.Timer(240000);
}
reconnectimer.Elapsed += OnReconnectTimer;
reconnectimer.Enabled = true;
}
示例9: OnLocalUserNoticeReceived
protected override void OnLocalUserNoticeReceived(IrcLocalUser localUser, IrcMessageEventArgs e)
{
Trace.TraceInformation("OnLocalUserNoticeReceived: " + e.Text);
}
示例10: OnLocalUserMessageReceived
protected override void OnLocalUserMessageReceived(IrcLocalUser localUser, IrcMessageEventArgs e)
{
if (e.Source.Name != localUser.NickName)
Trace.TraceInformation("OnLocalUserMessageReceived: " + e.Text);
}
示例11: OnLocalUserLeftChannel
protected override void OnLocalUserLeftChannel(IrcLocalUser localUser, IrcChannelEventArgs e)
{
Trace.TraceInformation("OnLocalUserLeftChannel");
}
示例12: HandleClientConnected
private void HandleClientConnected(IrcRegistrationInfo regInfo)
{
Logger.WriteLine("Connected to server at '{0}'.", TraceEventType.Verbose,((IPEndPoint)this.socket.RemoteEndPoint).Address);
if (regInfo.Password != null)
// Authenticate with server using password.
SendMessagePassword(regInfo.Password);
// Check if client is registering as service or normal user.
if (regInfo is IrcServiceRegistrationInfo)
{
// Register client as service.
var serviceRegInfo = (IrcServiceRegistrationInfo)regInfo;
SendMessageService(serviceRegInfo.NickName, serviceRegInfo.Distribution,
serviceRegInfo.Description);
this.localUser = new IrcLocalUser(serviceRegInfo.NickName, serviceRegInfo.Distribution,
serviceRegInfo.Description);
}
else
{
// Register client as normal user.
var userRegInfo = (IrcUserRegistrationInfo)regInfo;
SendMessageNick(userRegInfo.NickName);
SendMessageUser(userRegInfo.UserName, GetNumericUserMode(userRegInfo.UserModes),
userRegInfo.RealName);
this.localUser = new IrcLocalUser(userRegInfo.NickName, userRegInfo.UserName, userRegInfo.RealName,
userRegInfo.UserModes);
}
this.localUser.Client = this;
// Add local user to list of known users.
lock (((ICollection)this.usersReadOnly).SyncRoot)
this.users.Add(this.localUser);
OnConnected(new EventArgs());
}
示例13: OnLocalUserMessageReceived
protected override void OnLocalUserMessageReceived(IrcLocalUser localUser, IrcMessageEventArgs e)
{
//Console.WriteLine("{0}", e.Source.ToString());
}
示例14: OnLocalUserJoinedChannel
protected override void OnLocalUserJoinedChannel(IrcLocalUser localUser, IrcChannelEventArgs e)
{
}
示例15: GetLocalUserModes
internal void GetLocalUserModes(IrcLocalUser user)
{
SendMessageUserMode(user.NickName);
}