Example #1
0
        //
        // Constructors
        //

        //
        // TODO
        //
        // User-related:    INVITE KILL QUIT
        // Channel-related: KICK NICK PART
        //

        public Server( )
        {
            _verbsToRegister = new Dictionary <string, EventHandler <MessageEventArgs> > {
                { "001", HandleRplWelcome },
                { "002", HandleRplYourHost },
                { "003", HandleRplCreated },
                { "004", HandleRplMyInfo },
                { "005", HandleRplISupport },
                { "311", HandleRplWhoisUser },
                { "324", HandleRplChannelModeIs },
                { "329", HandleRplCreationTime },
                { "332", HandleRplTopic },
                { "333", HandleRplTopicWhoTime },
                { "352", HandleRplWhoReply },
                { "353", HandleRplNamReply },
                { "375", HandleRplMotdStart },

                { "CAP", HandleCap },
                { "ERROR", HandleError },
                { "JOIN", HandleJoin },
                { "MODE", HandleMode },
                { "NOTICE", HandleNotice },
                { "PING", HandlePing },
                { "PRIVMSG", HandlePrivMsg },
                { "QUIT", HandleQuit },

                { string.Empty, HandleUnknown },
            };

            _iSupportHandler   = new ISupportHandler(_supportedFeatures);
            _serverInformation = _iSupportHandler.ServerInformation;
        }
Example #2
0
        //
        // TODO
        //
        // User-related:    INVITE KILL QUIT
        // Channel-related: KICK NICK PART
        //
        //
        // Constructors
        //
        public Server( )
        {
            _messageFilters = new List<FilterAndHandler> {
                new FilterAndHandler( ( m ) => ( m.Verb == "001"   ), HandleRplWelcome   ),
                new FilterAndHandler( ( m ) => ( m.Verb == "004"   ), HandleRplMyInfo    ),
                new FilterAndHandler( ( m ) => ( m.Verb == "005"   ), HandleRplISupport  ),
                new FilterAndHandler( ( m ) => ( m.Verb == "311"   ), HandleRplWhoisUser ),
                new FilterAndHandler( ( m ) => ( m.Verb == "352"   ), HandleRplWhoReply  ),
                new FilterAndHandler( ( m ) => ( m.Verb == "353"   ), HandleRplNamReply  ),
                new FilterAndHandler( ( m ) => ( m.Verb == "375"   ), HandleRplMotdStart ),
                new FilterAndHandler( ( m ) => ( m.Verb == "422"   ), HandleErrNoMotd    ),
                new FilterAndHandler( ( m ) => ( m.Verb == "ERROR" ), HandleError        ),
                new FilterAndHandler( ( m ) => ( m.Verb == "JOIN"  ), HandleJoin         ),
                new FilterAndHandler( ( m ) => ( m.Verb == "PING"  ), HandlePing         ),

                new FilterAndHandler( ( m ) => ( m.Verb == "NOTICE" && m.Origin.IsServerName ), HandleServerNotice ),
            };

            _iSupportHandler = new ISupportHandler( _supportedFeatures );
            _serverInformation = _iSupportHandler.ServerInformation;
        }
Example #3
0
        //
        // TODO
        //
        // User-related:    INVITE KILL QUIT
        // Channel-related: KICK NICK PART
        //

        //
        // Constructors
        //

        public Server( )
        {
            _messageFilters = new List <FilterAndHandler> {
                new FilterAndHandler((m) => (m.Verb == "001"), HandleRplWelcome),
                new FilterAndHandler((m) => (m.Verb == "004"), HandleRplMyInfo),
                new FilterAndHandler((m) => (m.Verb == "005"), HandleRplISupport),
                new FilterAndHandler((m) => (m.Verb == "311"), HandleRplWhoisUser),
                new FilterAndHandler((m) => (m.Verb == "352"), HandleRplWhoReply),
                new FilterAndHandler((m) => (m.Verb == "353"), HandleRplNamReply),
                new FilterAndHandler((m) => (m.Verb == "375"), HandleRplMotdStart),
                new FilterAndHandler((m) => (m.Verb == "422"), HandleErrNoMotd),
                new FilterAndHandler((m) => (m.Verb == "ERROR"), HandleError),
                new FilterAndHandler((m) => (m.Verb == "JOIN"), HandleJoin),
                new FilterAndHandler((m) => (m.Verb == "PING"), HandlePing),

                new FilterAndHandler((m) => (m.Verb == "NOTICE" && m.Origin.IsServerName), HandleServerNotice),
            };

            _iSupportHandler   = new ISupportHandler(_supportedFeatures);
            _serverInformation = _iSupportHandler.ServerInformation;
        }
Example #4
0
        //
        // Constructors
        //
        //
        // TODO
        //
        // User-related:    INVITE KILL QUIT
        // Channel-related: KICK NICK PART
        //
        public Server( )
        {
            _verbsToRegister = new Dictionary<string, EventHandler<MessageEventArgs>> {
                { "001",        HandleRplWelcome        },
                { "002",        HandleRplYourHost       },
                { "003",        HandleRplCreated        },
                { "004",        HandleRplMyInfo         },
                { "005",        HandleRplISupport       },
                { "311",        HandleRplWhoisUser      },
                { "324",        HandleRplChannelModeIs  },
                { "329",        HandleRplCreationTime   },
                { "332",        HandleRplTopic          },
                { "333",        HandleRplTopicWhoTime   },
                { "352",        HandleRplWhoReply       },
                { "353",        HandleRplNamReply       },
                { "375",        HandleRplMotdStart      },

                { "CAP",        HandleCap               },
                { "ERROR",      HandleError             },
                { "JOIN",       HandleJoin              },
                { "MODE",       HandleMode              },
                { "NOTICE",     HandleNotice            },
                { "PING",       HandlePing              },
                { "PRIVMSG",    HandlePrivMsg           },
                { "QUIT",       HandleQuit              },

                { string.Empty, HandleUnknown           },
            };

            _iSupportHandler = new ISupportHandler( _supportedFeatures );
            _serverInformation = _iSupportHandler.ServerInformation;
        }