本文整理汇总了C#中IrcClient.SetHandler方法的典型用法代码示例。如果您正苦于以下问题:C# IrcClient.SetHandler方法的具体用法?C# IrcClient.SetHandler怎么用?C# IrcClient.SetHandler使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IrcClient
的用法示例。
在下文中一共展示了IrcClient.SetHandler方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RegisterDefaultHandlers
public static void RegisterDefaultHandlers(IrcClient client)
{
// General
client.SetHandler("PING", HandlePing);
client.SetHandler("NOTICE", HandleNotice);
client.SetHandler("PRIVMSG", HandlePrivmsg);
client.SetHandler("MODE", HandleMode);
//client.SetHandler("324", HandleMode);
client.SetHandler("431", HandleErronousNick);
client.SetHandler("432", HandleErronousNick);
client.SetHandler("433", HandleErronousNick);
client.SetHandler("436", HandleErronousNick);
// MOTD Handlers
client.SetHandler("375", MOTDHandlers.HandleMOTDStart);
client.SetHandler("372", MOTDHandlers.HandleMOTD);
client.SetHandler("376", MOTDHandlers.HandleEndOfMOTD);
// Channel handlers
client.SetHandler("JOIN", ChannelHandlers.HandleJoin);
client.SetHandler("PART", ChannelHandlers.HandlePart);
client.SetHandler("353", ChannelHandlers.HandleUserListPart);
client.SetHandler("366", ChannelHandlers.HandleUserListEnd);
client.SetHandler("KICK", ChannelHandlers.HandleKick);
// User handlers
client.SetHandler("311", UserHandlers.HandleWhoIsUser);
client.SetHandler("312", UserHandlers.HandleWhoIsServer);
client.SetHandler("313", UserHandlers.HandleWhoIsOperator);
client.SetHandler("317", UserHandlers.HandleWhoIsIdle);
client.SetHandler("318", UserHandlers.HandleWhoIsEnd);
client.SetHandler("319", UserHandlers.HandleWhoIsChannels);
// Listing handlers
client.SetHandler("367", ListingHandlers.HandleBanListPart);
client.SetHandler("368", ListingHandlers.HandleBanListEnd);
client.SetHandler("348", ListingHandlers.HandleExceptionListPart);
client.SetHandler("349", ListingHandlers.HandleExceptionListEnd);
client.SetHandler("346", ListingHandlers.HandleInviteListPart);
client.SetHandler("347", ListingHandlers.HandleInviteListEnd);
client.SetHandler("728", ListingHandlers.HandleQuietListPart);
client.SetHandler("729", ListingHandlers.HandleQuietListEnd);
// Server handlers
client.SetHandler("004", ServerHandlers.HandleMyInfo);
client.SetHandler("005", ServerHandlers.HandleISupport);
}