fIRC Protocol Specification
Specification by Coolman_mike@hotmail.com
Specification for educational purposes only
Do not use it to make fraudulent clients,
or take-over servers. If I see this I will
built in a flooded to the fIRC servers so if
this happens your connection will die!
Ok, this specification is basically in 2 parts. As you may know, their are not yet any
fIRC server listing sites, so I haven't yet written a specification on that. When fIRC
is in a highly stable development stage, I may add in a listing protocol and make a
server that would make a HTM page with server stats. This will probably happen in 2004
Anyway, the 2 parts of the specification are Server-Client messages and Server-Server
messages. Don't forget, as development moves on more messages may be added. The format
of this document is like this: [Server] means its sent by server, [Client] means client.
In server-server specifation, the format is not yet defined.
1 login [CLIENT]
Format: <nick> <password> <unique-number> <speed> "<client-name>"
<nick> Nickname to login with, used in chat and for messages
<password> You unique password, not currently check by fIRC but will be
<unique-number> A made up number for YOUR client. Please register it with fIRC so
no-one can steal your client name. To register, email
fIRC2003@hotmail.com. Some fIRC servers only allow registered clients
<speed> Make it just 0. This feature isn't yet used...
<client-name> The name of the client the users using. This mustn't be changeable.
It should look like this: YourClient 1.01.
Example of data to be sent:
1 dude dudespass 2931 0 "fIRC Cleint"
*DONT USE NUMBER 2931 AS UNIQUE NUMBER, IT IS BANNED ON fIRC*
2 logged-in [SERVER]
<index> Your PID...Don't show the client's user this...It just shows your logged in
Example of data received:
3 Login-error [SERVER]
Format: <error-num> <extra-messages>
<error-num> This is received by client IF there was an error. This is what each
number represents, and what it means:
1 - Server Full
2 - Server Busy
3 - Banned IP or Nickname
4 - Username in use
5 - Maximum connections-per-minute limit reached
6 - Max connects from this IP
7 - Client not allowed
8 - ID not allowed
9 - Message format invalid
10 - No reason
<exta-message> If the error num is 1, 3, 7, 8 or 9 then this will be received to.
What the message will be about:
1 - Users Online
3 - Reason for ban
7 - Ban reason
8 - ID ban reason
9 - Message received (Invalid One)
4 Server-Stats [SERVER] [CLIENT]
Format: <Users> <Channels> <Linked-Servers> [SERVER]
<User> Ammount of users logged into network
<Channels> Channels accessible on network (You probaly should - 2 off this figure,
as their are 2 inaccessible channels used for server-server communication
<Linked-Servers> Ammount of servers in the network including yours.
If client sends 4 then server replys with stats. Don't make this happen
on a timer, as server does it...
NOTE: If you do Timer it, make it 60 seconds
5 Ping [SERVER]
<USER> Occasionally server sends ping. Client must reply with pong (7). 6 and 7 have examples.
Example of received data:
6 Pong [CLIENT]
<USER> User that is to be ponged. So if you get ping from SERVER, pong SERVER or your connection may
be killed (prevent ghosts)
Example of data to be sent:
7 MoTD [SERVER]
<MOTD> MoTD (Message of the 'Day') This is sent after login is acknowledged by 3 command. It basically
says about the server itself and anything else the owner wants you to know. Don't disregard
this message, it must be displayed.
8 Logout [CLIENT]
Basically client should send this on logout to prevent ghosting. Don't just unload the socket. Send this,
and make socket unload when it's sent.
9 Request Chan-List [CLIENT]
Just send a plain 9 and server will sent a reply (10, 11, 12) containing channel list (10) and (11) users in them
and (12) their topics.
10 Channel List [SERVER]
<Name> Channel name. The end of the list will finish with :*:
<Topic> Channel Topic.
<Users> Ammount of users in channel
Data will look like this:
10 #Main:#Second:#Last:*:Main Channel:Ok Chan:Bad Chan:*:20:13:1:*:
CHANNEL LIST COMMAND SHORTENED
12 Topic Changed
Format: <Channel> <Num> "<NewTopic>"
<Channel> Channel that topic was changed in
<Num> If this is 0 then it is indicating channel join OK. If 1 it's a topic change
"<NewTopic>" What the topic was changed to
13 Private Message [SERVER] [CLIENT]
Server: <User> "<Message>"
Client: <User> "<Message>"
<User> The user the message is from
<Message> The message itself
Example: 13 Dude5 "Hey there bud"
<User> The user to deliver message to (If user offline you will client will get message back from 'Server'
saying 'The user is offline'
<Message> The message to delived
Example: 13 Dude4 "Oh Hey, Didn't see you m8!"
14 Public Message [SERVER] [CLIENT]
Server: <Channel> <User> "<Message>"
Client: <Channel> "<Message>"
<Channel> Channel that the user sent message to
<User> User who sent message
<Message> The message
Example: 14 #Last Dude4 "Hey..."
<Channel> Channel message is to be sent to
<Message> Message to send
Example: 14 #Last "Im here"
15 Error to be Msgboxed
<Data> This is what the client is to 'Msgbox'. If it's not their will be probs...Mostly,
its just messages like Command not supported, etc..
NOTE: In Visual Basic 6, to make " sybols use Chr(34)
NOTE2: You will be delivered the message you send into public chat
16 Join Channel [CLIENT]
<Channel> The exact name of the channel to join
Please note: Don't try faking the username, use the one you logged in with, their are things preventing
fraudulent username changes
17 User Joined Channel [SERVER]
Format: <Channel> <Username>
<Channel> The channel the user joined.
<Username> The username of the person who joined.
Please note: This is also sent in response to 16.
18 Leave Channel [CLIENT]
<Channel> Channel to leave...
19 User left channel [SERVER]
Format: <Channel> <User>
<Channel> Channel user decided to leave.
<User> User who left the channel
Please Note: Sent in response to 18
***** SERVER-CLIENT COMMANDS SPECIFATION NOT FINISHED *****
NOTE: [HC] means server issuing outgoing connection to fIRC Hub
[HS] means hub/server that accepts connects
!!NOTE!!: Linking is not fully stable yet...When I was writing this I hadn't even started work on linking
1 Request Link [HC]
Format: <Server-Address> "<LocalPass>" "<RemotePass>"
<Server-Address> Address of server. Must be correct. Don't fake it
<LocalPass> Your servers local linking password. Passwords are matched up on hub...
<RemotePass> Hubs password
1 firchub.bounceme.net "lpass" "rpass"
2 Accept Link [HS]
Format: <HubAddress> <Linked-Servers> <Linked-Channels> <NetUsers>
<HubAddress> Address of hub...Make sure that the HC address matches to this...For security...
<Linked-Servers> Ammount of servers including your own, that are linked.
<Linked-Channels> Ammount of channels on the network, for future reference on Channel-Sync
<NetUsers> Users on the network. Keep this figure
3 Link-Error [HS]
Format: <Number> "<Extra-Messages>"
<Number> Error number. Here's there meaning:
1 - No-New-Links Accepted
2 - Wrong Version
3 - Bad password
4 - Address not on list
5 - PID Double Up (If your servers PID is the same as another servers)
<Extra-Messages> Anything related to error. Used for 2, 3 and 4
2 - Version of hub, version of your server
3 - Password sent
4 - "The address '[HC ADDY]' is not listed
4 Ping Server [HS, HC]
<Server> Server to be pinged. All servers can execute this...If pong it not replied to then
it is likely the linked server will be delinked.
5 Pong Server (Reply to Ping) [HS, HC]
<Server> Server that pinged you...This will reply.
I haven't even looked at the idea of pinging...But this is how it will work...
-=-=-=-=-=-=-=-=-=Server-Server Commands Not Finished-=-=-=-=-=-=-=-=-=