Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8695901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:09:06+00:00 2026-06-13T01:09:06+00:00

I’m trying to code my own IRC server. I’m referencing the IRC RFC but

  • 0

I’m trying to code my own IRC server. I’m referencing the IRC RFC but it’s a little confusing to me. If I were to go strictly off the RFC, I don’t think any of the popular clients would work with my server, like mIRC. For example, the RFC says that the server should respond to a successful MODE command one of the following numeric responses:RPL_BANLIST, RPL_CHANNELMODEIS, RPL_ENDOFBANLIST, RPL_UMODEIS. This would lead me to believe that on a successful user mode change, I’d respond with RPL_UMODEIS, although the RFC doesn’t seem to explicitly state so.

But, when I check the source code to another open source IRC server, I see that it responds with a non-numeric command of ‘MODE’. It just echos back the MODE command it looks like.

How are you supposed to respond to the MODE command? Is there a better formatted RFC that has a simple command and response chart, or something?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T01:09:09+00:00Added an answer on June 13, 2026 at 1:09 am

    RFC 1459 is famously sparse. It does not tell you everything you need to know to write a server.

    In this case, what’s missing is the distinction between a MODE command that queries an existing mode, and a MODE command that sets a new mode. In the case of a mode query, a client will receive a numeric reply that indicates the existing mode; in the case of altering a mode, a client will not receive a direct numeric reply unless there was an error. However, if the mode was successfully altered, then a client will recieve a MODE from the server informing it of the change.

    So for example, if the client’s nick is foo and it sends:

    MODE foo
    

    then this is querying its current usermode – it will expect a RPL_UMODEIS reply like:

    :irc.example.org 221 foo :+i
    

    If the client then sends:

    MODE foo :+w
    

    then this is altering its usermode – it will either get a numeric error like ERR_USERSDONTMATCH or an acknowledgement of the mode change:

    :foo!foo@bar.com MODE foo :+w
    

    Note that this acknowledgement is technically not a direct reply to the MODE – it’s the server informing the client of a relevant change in its state, which happens to have been triggered by a client command.

    A similar situation exists with channel modes. If a client queries the current channel modes with:

    MODE #channel
    

    then it will expect a RPL_CHANNELMODEIS response containing the current “simple” channel modes, and perhaps a RPL_CREATIONTIMEresponse giving the channel creation time. If it queries for the current ban list with:

    MODE #channel b
    

    then should get zero or more RPL_BANLIST responses, followed by a RPL_ENDOFBANLIST.

    If instead a client tries to change a channel mode:

    MODE #channel :+k zounds
    

    then the direct reply will either be an error reply or nothing; and if the channel mode was actually changed, it will see the MODE command echoed back. In the latter case the successful MODE command will also be sent to the other members of the channel – this helps to illustrate that it’s not really a direct reply to the initial MODE command, but an indirect response to it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I am trying to render a haml file in a javascript response like so:
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.