The big lie of computer security is that security improves by imposing complex passwords on users. In real life, people write down anything they can't remember. Security is increased by designing for the way humans actually behave. -Jakob Nielsen
Intro:
IRC is a plaintext protocol. So all commands sent to and from the server are readable to humans.
To create a bot or an irc client all you need to know is what commands to send and how to get information from the server.
It can be chalenging for someone new to this to get a good list of these commands so thats basicly whats going to be in this article.
I will first talk about stuff that gets send and then about stuff that your client/bot will get.
In this litle article I will replace some characters that you can't see on this webpage with chr(x).
When you see this then replace that with the char that has the valu of x (chr(97) would be a)
If you ever did some programing then I bet you have seen that stuff before.
(anything between < > should be replaced with other stuff, do NOT type the < and >)
USER (list)(top)
This is the first thing your client/bot has to send to the irc server.
Altough the rfc sais that NICK comes first lets just not listen to that and do this first.
It should be in this format:
CODE :
USER ident localhost localhost :name
When you whois a person using that to connect you will see
person is ident@whatever.com * name
(The name can be several words)
NICK (list)(top)
This should be send right after the user so the server knows what nick you are going to use.
You can also always use it to change your nick:
CODE :
NICK <newnick>
PING/PONG (list)(top)
The most important thing any bot or client should respond to is PING.
When the server sends you a ping it will send:
CODE :
PING <random stuff>
Some servers might send their server name with the random stuff some might not..
If you are making a client/bot you should make it respond with:
CODE :
PONG <the random stuff>
If your client/bot doesn't send the pong fast enough then the server will disconnect it.
JOIN (list)(top)
You can join any channel by sending:
CODE :
JOIN <#channel>
Or you can join several channels at the same time by seperating them with a ,
CODE :
JOIN <#channel1,#channel2,#channel3>
Joining channel 0 will make you part all channels you are in.
PART (list)(top)
you can part a channel you are in (with a part message if you want):
CODE :
PART <#channel> :<part message>
PRIVMSG (list)(top)
This is used to send text to channels and other persons.
You use it like this:
CODE :
PRIVMSG <#channel or nick> :<message>
NOTICE (list)(top)
You can notice others or intire channels with:
CODE :
NOTICE <#channel or nick> :<message>
CTCP (list)(top)
A ctcp is also basicly a privmsg that starts with chr(1) and ends with it.
Example:
CODE :
PRIVMSG <nick or <#channel> :chr(1)VERSIONchr(1)
That is the version request that requests the version of an other client.
A ctcp responce is a notice that starts and ends with chr(1).
A posible reply to the above example could be:
CODE :
INFO (list)(top)
Shows the ircd info file of the server you are on or an other server on the network.
CODE :
INFO <server name(optional)>
ISON (list)(top)
Used to determine if a user is on irc or not.
CODE :
ISON <nick>
INVITE (list)(top)
If you have op or something higher you can invite others into the channel with this:
CODE :
INVITE <nick> <#channel>
KICK (list)(top)
If you have halfop or more you can kick some users out of the channel with:
CODE :
KICK <#channel> <nick> :<kick message>
When combined with a ban the affected user can no longer join the channel. Without the ban its usually considered a warning.
KNOCK (list)(top)
You can knock on a channel to let ops know that you wanted to be invited. (if channel is +i you can only join when you are invited)
CODE :
KNOCK <#channel>
LINKS (list)(top)
Shows what servers are linked on the network.
LIST (list)(top)
List all channels and their info (topic, users etc)
CODE :
LIST (lists all channels)
LIST >100 (lists all channels with 100 users or more)
LIST <10 (lists all channels with 10 users or less)
LIST C>15 (lists all channels created between now and 15 minutes ago)
LIST C<30 (lists all channels created earlier than 30 minutes ago)
LIST T>45 (list channels whose topics are older than 40 minutes)
LIST T<60 (list channels whose topics are newer than 60 minutes)
LIST *moo* (lists channels matching moo in their channel name)
LIST !*moo* (lists all channels that do not match moo in their channel name)
MODE (list)(top)
Used for changing modes of a channel or person.
CODE :
MODE <#channel or nick> <+modes-modes> <more info>
Settings mode +o (op) on a user in a channel is done like this:
CODE :
The first "word" your client gets is always the mask of the person who send it.
If bob sends the message "I like pie" to the channel #moo then you will recieve:
CODE :
:bob!bobsident@bobshost PRIVMSG #moo :I like pie
It will look just like the thing he send but with his host infront of it.
This goes for almost all commands that don't list stuff.
000 series (list)(top)
001 :Welcome to the Internet Relay Network nickname
002 :Your host is server, running version ver
003 :This server was created datetime
004 server ver usermode chanmode
005 :map
007 :End of /MAP
008 num :: Server notice mask (hex) 200 series (list)(top)
211 connection sendq sentmsg sentbyte recdmsg recdbyte :open
212 command uses bytes
213 C address * server port class
214 N address * server port class
215 I ipmask * hostmask port class
216 k address * username details
217 P port ?? ??
218 Y class ping freq maxconnect sendq
219 char :End of /STATS report
221 mode
222 mask :comment
223 E hostmask * username ?? ??
224 D ipmask * username ?? ??
241 L address * server ?? ??
242 :Server Up num days, time
243 o mask password user ?? class
244 H address * server ?? ??
247 G address timestamp :reason
248 U host * ?? ?? ??
249 :info
250 :Highest connection count: total (num clients)
251 :There are user users and invis invisible on serv servers
252 num :operator(s) online
253 num :unknown connection(s)
254 num :channels formed
255 :I have user clients and serv servers
256 :Administrative info about server
257 :info
258 :info
259 :info
263 :Server load is temporarily too heavy. Please wait a while and try again.
265 :Current local users: curr Max: max
266 :Current global users: curr Max: max
271 nick mask
272 nick :End of Silence List
280 address timestamp reason
281 :End of G-line List
290 :num ***** topic *****
291 :text
292 : ***** Go to #dalnethelp if you have any further questions *****
293 :text
294 :Your help-request has been forwarded to Help Operators
298 nick :Nickname conflict has been resolved 300 series (list)(top)
301 nick :away
302 :userhosts
303 :nicknames
305 :You are no longer marked as being away
306 :You have been marked as being away
307 :userips
310 nick :looks very helpful
311 nick username address * :info
312 nick server :info
313 nick :is an IRC Operator
314 nick username address * :info
315 request :End of /WHO list.
317 nick seconds signon :info
318 request :End of /WHOIS list.
319 nick :channels
321 Channel :Users Name
322 channel users :topic
323 :End of /LIST
324 channel mode
328 channel :url
329 channel time
331 channel :No topic is set.
332 channel :topic
333 channel nickname time
340 nick :nickname=+user@IP.address
341 nick channel
346 channel invite nick time
347 channel :End of Channel Invite List
348 channel exception nick time
349 channel :End of Channel Exception List
351 version.debug server :info
352 channel username address server nick flags :hops info
353 = channel :names
364 server hub :hops info
365 mask :End of /LINKS list.
366 channel :End of /NAMES list.
367 channel ban nick time
368 channel :End of Channel Ban List
369 request :End of WHOWAS
371 :info
372 :- info
374 :End of /INFO list.
375 :- server Message of the Day -
376 :End of /MOTD command.
377 :- info
378 :- info
381 :You are now an IRC Operator
382 file :Rehashing
391 server :time 400 series (list)(top)
401 nickname :No such nick
402 server :No such server
403 channel :No such channel
404 channel :Cannot send to channel
405 channel :You have joined too many channels
406 nickname :There was no such nickname
407 target :Duplicate recipients. No message delivered
408 nickname #channel :You cannot use colors on this channel. Not sent: text
409 :No origin specified
411 :No recipient given (command)
412 :No text to send
413 mask :No toplevel domain specified
414 mask :Wildcard in toplevel Domain
416 command :Too many lines in the output, restrict your query
421 command :Unknown command
422 :MOTD File is missing
423 server :No administrative info available
431 :No nickname given
432 nickname :Erroneus Nickname
433 nickname :Nickname is already in use.
436 nickname :Nickname collision KILL
437 channel :Cannot change nickname while banned on channel
438 nick :Nick change too fast. Please wait sec seconds.
439 target :Target change too fast. Please wait sec seconds.
441 nickname channel :They aren't on that channel
442 channel :You're not on that channel
443 nickname channel :is already on channel
445 :SUMMON has been disabled
446 :USERS has been disabled
451 command :Register first.
455 :Your username ident contained the invalid character(s) chars and has been changed to new. Please use only the characters 0-9 a-z A-Z _ - or . in your username. Your username is the part before the @ in your email address.
461 command :Not enough parameters
462 :You may not reregister
467 channel :Channel key already set
468 channel :Only servers can change that mode
471 channel :Cannot join channel (+l)
472 char :is unknown mode char to me
473 channel :Cannot join channel (+i)
474 channel :Cannot join channel (+b)
475 channel :Cannot join channel (+k)
477 channel :You need a registered nick to join that channel.
478 channel ban :Channel ban/ignore list is full
481 :Permission Denied- You're not an IRC operator
482 channel :You're not channel operator
483 :You cant kill a server!
484 nick channel :Cannot kill, kick or deop channel service
485 channel :Cannot join channel (reason)
491 :No O-lines for your host 500 series (list)(top)
501 :Unknown MODE flag
502 :Cant change mode for other users
510 :You must resolve the nickname conflict before you can proceed
511 mask :Your silence list is full
512 address :No such gline
513 If you can't connect, type /QUOTE PONG code or /PONG code 600 series (list)(top)
600 nick userid host time :logged offline
601 nick userid host time :logged online
602 nick userid host time :stopped watching
603 :You have mine and are on other WATCH entries
604 nick userid host time :is online
605 nick userid host time :is offline
606 :nicklist
ADMIN (list)(top)
256 :Administrative info about server
257 :info
258 :info
259 :info
423 server :No administrative info available AWAY (list)(top)
305 :You are no longer marked as being away
306 :You have been marked as being away CNOTICE (list)(top)
441 nickname channel :They aren't on that channel CPRIVMSG (list)(top)
441 nickname channel :They aren't on that channel GLINE (list)(top)
280 address timestamp reason
281 :End of G-line List
512 address :No such gline HELPOP (list)(top)
290 :num ***** topic *****
291 :text
292 : ***** Go to #dalnethelp if you have any further questions *****
293 :text
294 :Your help-request has been forwarded to Help Operators INFO (list)(top)
371 :info
374 :End of /INFO list. INVITE (list)(top)
341 nick channel
443 nickname channel :is already on channel
482 channel :You're not channel operator ISON (list)(top)
303 :nicknames JOIN (list)(top)
328 channel :url
332 channel :topic
333 channel nickname time
353 = channel :names
366 channel :End of /NAMES list.
405 channel :You have joined too many channels
439 target :Target change too fast. Please wait sec seconds.
471 channel :Cannot join channel (+l)
473 channel :Cannot join channel (+i)
474 channel :Cannot join channel (+b)
475 channel :Cannot join channel (+k)
477 channel :You need a registered nick to join that channel.
485 channel :Cannot join channel (reason) KICK (list)(top)
403 channel :No such channel
441 nickname channel :They aren't on that channel
482 channel :You're not channel operator
484 nick channel :Cannot kill, kick or deop channel service KILL (list)(top)
483 :You cant kill a server!
484 nick channel :Cannot kill, kick or deop channel service LINKS (list)(top)
364 server hub :hops info
365 mask :End of /LINKS list. LIST (list)(top)
321 Channel :Users Name
322 channel users :topic
323 :End of /LIST LUSERS (list)(top)
250 :Highest connection count: total (num clients)
251 :There are user users and invis invisible on serv servers
252 num :operator(s) online
253 num :unknown connection(s)
254 num :channels formed
255 :I have user clients and serv servers
265 :Current local users: curr Max: max
266 :Current global users: curr Max: max MAP (list)(top)
005 :map
007 :End of /MAP MODE (list)(top)
008 num :: Server notice mask (hex)
221 mode
324 channel mode
329 channel time
346 channel invite nick time
347 channel :End of Channel Invite List
348 channel exception nick time
349 channel :End of Channel Exception List
367 channel ban nick time
368 channel :End of Channel Ban List
403 channel :No such channel
441 nickname channel :They aren't on that channel
442 channel :You're not on that channel
467 channel :Channel key already set
468 channel :Only servers can change that mode
472 char :is unknown mode char to me
478 channel ban :Channel ban/ignore list is full
482 channel :You're not channel operator
484 nick channel :Cannot kill, kick or deop channel service
501 :Unknown MODE flag
502 :Cant change mode for other users MOTD (list)(top)
372 :- info
375 :- server Message of the Day -
376 :End of /MOTD command.
377 :- info
378 :- info
422 :MOTD File is missing NAMES (list)(top)
353 = channel :names
366 channel :End of /NAMES list. NICK (list)(top)
298 nick :Nickname conflict has been resolved
431 :No nickname given
432 nickname :Erroneus Nickname
433 nickname :Nickname is already in use.
437 channel :Cannot change nickname while banned on channel
438 nick :Nick change too fast. Please wait sec seconds. NOTICE (list)(top)
403 channel :No such channel
404 channel :Cannot send to channel
407 target :Duplicate recipients. No message delivered
411 :No recipient given (command)
412 :No text to send
413 mask :No toplevel domain specified
414 mask :Wildcard in toplevel Domain
439 target :Target change too fast. Please wait sec seconds. OPER (list)(top)
381 :You are now an IRC Operator
491 :No O-lines for your host PART (list)(top)
403 channel :No such channel
442 channel :You're not on that channel PASS (list)(top)
462 :You may not reregister PING (list)(top)
409 :No origin specified PRIVMSG (list)(top)
301 nick :away
403 channel :No such channel
404 channel :Cannot send to channel
407 target :Duplicate recipients. No message delivered
408 nickname #channel :You cannot use colors on this channel. Not sent: text
411 :No recipient given (command)
412 :No text to send
413 mask :No toplevel domain specified
414 mask :Wildcard in toplevel Domain
439 target :Target change too fast. Please wait sec seconds. REHASH (list)(top)
382 file :Rehashing SILENCE (list)(top)
271 nick mask
272 nick :End of Silence List
511 mask :Your silence list is full STATS (list)(top)
211 connection sendq sentmsg sentbyte recdmsg recdbyte :open
212 command uses bytes
213 C address * server port class
214 N address * server port class
215 I ipmask * hostmask port class
216 k address * username details
217 P port ?? ??
218 Y class ping freq maxconnect sendq
219 char :End of /STATS report
222 mask :comment
223 E hostmask * username ?? ??
224 D ipmask * username ?? ??
241 L address * server ?? ??
242 :Server Up num days, time
243 o mask password user ?? class
244 H address * server ?? ??
247 G address timestamp :reason
248 U host * ?? ?? ??
249 :info
250 :Highest connection count: total (num clients) SUMMON (list)(top)
445 :SUMMON has been disabled TIME (list)(top)
391 server :time TOPIC (list)(top)
331 channel :No topic is set.
332 channel :topic
333 channel nickname time
403 channel :No such channel
442 channel :You're not on that channel
482 channel :You're not channel operator USER (list)(top)
462 :You may not reregister USERHOST (list)(top)
302 :userhosts USERIP (list)(top)
307 :userips
340 nick :nickname=+user@IP.address USERS (list)(top)
446 :USERS has been disabled VERSION (list)(top)
351 version.debug server :info WATCH (list)(top)
602 nick userid host time :stopped watching
603 :You have mine and are on other WATCH entries
604 nick userid host time :is online
605 nick userid host time :is offline
606 :nicklist WHO (list)(top)
315 request :End of /WHO list.
352 channel username address server nick flags :hops info
416 command :Too many lines in the output, restrict your query WHOIS (list)(top)
301 nick :away
310 nick :looks very helpful
311 nick username address * :info
312 nick server :info
313 nick :is an IRC Operator
317 nick seconds signon :info
318 request :End of /WHOIS list.
319 nick :channels
431 :No nickname given WHOWAS (list)(top)
301 nick :away
314 nick username address * :info
369 request :End of WHOWAS
406 nickname :There was no such nickname
431 :No nickname given
(all the number stuff was ripped and then edited from http://www.mirc.net/raws/ because i was too lazy to type it all myself)
Cast your vote on this article 10 - Highest, 1 - Lowest
Comments: Published: 11 comments.
HackThisSite is is the collective work of the HackThisSite staff, licensed under a CC BY-NC license.
We ask that you inform us upon sharing or distributing.
Page Generated: Wed, 30 May 2012 06:38:32 -0500 Exec:
10 Page loaded in 0.42969 seconds Current Code Revision: Sun Sep 11 19:52:46 2011 +0000