216 lines
11 KiB
Bash
216 lines
11 KiB
Bash
#!/bin/bash
|
|
# -*- coding: utf-8 -*-
|
|
###########################################################################
|
|
# #
|
|
# envbot - an irc bot in bash #
|
|
# Copyright (C) 2007-2008 Arvid Norlander #
|
|
# #
|
|
# This program is free software: you can redistribute it and/or modify #
|
|
# it under the terms of the GNU General Public License as published by #
|
|
# the Free Software Foundation, either version 3 of the License, or #
|
|
# (at your option) any later version. #
|
|
# #
|
|
# This program is distributed in the hope that it will be useful, #
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
|
# GNU General Public License for more details. #
|
|
# #
|
|
# You should have received a copy of the GNU General Public License #
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
|
# #
|
|
###########################################################################
|
|
# This file contains a list of numerics that we *currently use*.
|
|
# It is therefore incomplete.
|
|
|
|
# Sources:
|
|
# RFC 1459
|
|
# RFC 2812
|
|
# http://www.alien.net.au/irc/irc2numerics.html
|
|
# http://www.inspircd.org/wiki/List_Of_Numerics
|
|
|
|
# These are from RFC 1459, if not mentioned otherwise
|
|
|
|
##########################
|
|
# Number -> name mapping #
|
|
##########################
|
|
|
|
# During connect, these are sent. They are NOT part of RFC 1459.
|
|
# For some format of the parameters varies between servers.
|
|
numeric[1]=RPL_WELCOME # "Welcome to <network>"
|
|
numeric[2]=RPL_YOURHOST # "Your host is <servername>, running version <ver>"
|
|
numeric[3]=RPL_CREATED
|
|
numeric[4]=RPL_MYINFO # "<servername> <version> <available user modes> <available channel modes>"
|
|
numeric[5]=RPL_ISUPPORT # Not in any RFC. See http://www.irc.org/tech_docs/005.html for incomplete list.
|
|
|
|
numeric[6]=RPL_MAP # Not from any RFC
|
|
numeric[7]=RPL_MAPEND # Not from any RFC
|
|
numeric[8]=RPL_SNOMASK # Not from any RFC, used on Unreal
|
|
|
|
# Command replies.
|
|
numeric[205]=RPL_TRACEUSER
|
|
numeric[213]=RPL_STATSCLINE
|
|
numeric[219]=RPL_ENDOFSTATS
|
|
numeric[221]=RPL_UMODEIS
|
|
numeric[223]=RPL_STATSELINE # Not from any RFC. Conflicting use on different IRCds.
|
|
numeric[232]=RPL_RULES # Unreal usage. Conflicting use on different IRCds.
|
|
numeric[242]=RPL_STATSUPTIME
|
|
numeric[250]=RPL_STATSCONN # Not from any RFC. Conflicting use on different IRCds.
|
|
numeric[251]=RPL_LUSERCLIENT
|
|
numeric[252]=RPL_LUSEROP
|
|
numeric[253]=RPL_LUSERUNKNOWN
|
|
numeric[254]=RPL_LUSERCHANNELS
|
|
numeric[255]=RPL_LUSERME
|
|
numeric[256]=RPL_ADMINME
|
|
numeric[257]=RPL_ADMINLOC1
|
|
numeric[258]=RPL_ADMINLOC2
|
|
numeric[259]=RPL_ADMINEMAIL
|
|
numeric[263]=RPL_TRYAGAIN
|
|
numeric[265]=RPL_LOCALUSERS # Not from any RFC.
|
|
numeric[266]=RPL_GLOBALUSERS # Not from any RFC.
|
|
numeric[271]=RPL_SILELIST # Not from any RFC
|
|
numeric[272]=RPL_ENDOFSILELIST # Not from any RFC
|
|
|
|
numeric[301]=RPL_AWAY
|
|
numeric[302]=RPL_USERHOST
|
|
numeric[303]=RPL_ISON
|
|
numeric[304]=RPL_TEXT # Not from any RFC I think. And on InspIRCd this is used for syntax hints.
|
|
numeric[305]=RPL_UNAWAY
|
|
numeric[306]=RPL_UNAWAY
|
|
numeric[307]=RPL_WHOISREGNICK # Not from any RFC. Used on Unreal.
|
|
numeric[308]=RPL_RULESSTART # Unreal usage. Conflicting use on different IRCds.
|
|
numeric[309]=RPL_ENDOFRULES # Unreal usage. Conflicting use on different IRCds.
|
|
numeric[310]=RPL_WHOISHELPOP # Unreal usage. Conflicting use on different IRCds.
|
|
numeric[311]=RPL_WHOISUSER
|
|
numeric[312]=RPL_WHOISSERVER
|
|
numeric[313]=RPL_WHOISOPERATOR
|
|
numeric[314]=RPL_WHOWASUSER
|
|
numeric[315]=RPL_ENDOFWHO
|
|
numeric[317]=RPL_WHOISIDLE
|
|
numeric[318]=RPL_ENDOFWHOIS
|
|
numeric[319]=RPL_WHOISCHANNELS
|
|
numeric[320]=RPL_WHOISSPECIAL # Not from any RFC. Numeric called other things on other ircds.
|
|
# RPL_WHOISSPECIAL is what it is called on Unreal.
|
|
# Used for "connecting using ssl" on InspIRCd. Also used for SWHOIS.
|
|
# On hyperion used for "is identified to services".
|
|
numeric[321]=RPL_LISTSTART
|
|
numeric[322]=RPL_LIST
|
|
numeric[323]=RPL_LISTEND
|
|
numeric[324]=RPL_CHANNELMODEIS
|
|
numeric[329]=RPL_CREATIONTIME # Not from any RFC. Used on InspIRCd at least.
|
|
numeric[330]=RPL_WHOISACCOUNT # Not from any RFC. This is how it is used on InspIRCd with m_services_account.
|
|
numeric[331]=RPL_NOTOPIC
|
|
numeric[332]=RPL_TOPIC
|
|
numeric[333]=RPL_TOPICWHOTIME # Not from any RFC.
|
|
numeric[340]=RPL_USERIP # Not from any RFC.
|
|
numeric[341]=RPL_INVITING
|
|
numeric[346]=RPL_INVITELIST
|
|
numeric[347]=RPL_ENDOFINVITELIST
|
|
numeric[348]=RPL_EXCEPTLIST
|
|
numeric[349]=RPL_ENDOFEXCEPTLIST
|
|
numeric[351]=RPL_VERSION
|
|
numeric[352]=RPL_WHOREPLY
|
|
numeric[353]=RPL_NAMREPLY
|
|
numeric[364]=RPL_LINKS
|
|
numeric[365]=RPL_ENDOFLINKS
|
|
numeric[366]=RPL_ENDOFNAMES
|
|
numeric[367]=RPL_BANLIST
|
|
numeric[368]=RPL_ENDOFBANLIST
|
|
numeric[369]=RPL_ENDOFWHOWAS
|
|
numeric[371]=RPL_INFO
|
|
numeric[372]=RPL_MOTD
|
|
numeric[374]=RPL_ENDOFINFO
|
|
numeric[375]=RPL_MOTDSTART
|
|
numeric[376]=RPL_ENDOFMOTD
|
|
numeric[378]=RPL_WHOISHOST
|
|
numeric[381]=RPL_YOUREOPER
|
|
numeric[382]=RPL_REHASHING
|
|
numeric[391]=RPL_TIME
|
|
numeric[396]=RPL_HOSTHIDDEN # Not from any RFC.
|
|
|
|
|
|
# Errors
|
|
numeric[401]=ERR_NOSUCHNICK
|
|
numeric[402]=ERR_NOSUCHSERVER
|
|
numeric[403]=ERR_NOSUCHCHANNEL
|
|
numeric[404]=ERR_CANNOTSENDTOCHAN
|
|
numeric[405]=ERR_TOOMANYCHANNELS
|
|
numeric[406]=ERR_WASNOSUCHNICK
|
|
numeric[407]=ERR_TOOMANYTARGETS
|
|
numeric[412]=ERR_NOTEXTTOSEND
|
|
numeric[416]=ERR_TOOMANYMATCHES # Not from any RFC.
|
|
numeric[421]=ERR_UNKNOWNCOMMAND
|
|
numeric[422]=ERR_NOMOTD
|
|
numeric[432]=ERR_ERRONEUSNICKNAME # Bad/forbidden nickname
|
|
numeric[433]=ERR_NICKNAMEINUSE # Nick in use
|
|
numeric[438]=ERR_NICKTOOFAST # Not from any RFC. Used on ircu and Unreal (at least).
|
|
numeric[441]=ERR_USERNOTINCHANNEL
|
|
numeric[442]=ERR_NOTONCHANNEL
|
|
numeric[443]=ERR_USERONCHANNEL
|
|
numeric[445]=ERR_SUMMONDISABLED # Yep, most (all?) do nowdays :)
|
|
numeric[446]=ERR_USERSDISABLED # Yep, most (all?) do nowdays :)
|
|
numeric[447]=ERR_NONICKCHANGE # Not from any RFC.
|
|
numeric[460]=ERR_NOTFORHALFOPS # Not from any RFC. Unreal got this at least.
|
|
numeric[461]=ERR_NEEDMOREPARAMS
|
|
numeric[462]=ERR_ALREADYREGISTERED
|
|
numeric[468]=ERR_ONLYSERVERSCANCHANGE # Not from any RFC.
|
|
numeric[470]=ERR_LINKCHANNEL # Not from any RFC.
|
|
# InspIRCd example: :#channel has become full, so you are automatically being transferred to the linked channel #otherchannel
|
|
numeric[471]=ERR_CHANNELISFULL
|
|
numeric[472]=ERR_UNKNOWNMODE
|
|
numeric[473]=ERR_INVITEONLYCHAN
|
|
numeric[474]=ERR_BANNEDFROMCHAN
|
|
numeric[475]=ERR_BADCHANNELKEY
|
|
numeric[477]=ERR_NEEDREGGEDNICK # Not from any RFC.
|
|
numeric[478]=ERR_BANLISTFULL
|
|
numeric[480]=ERR_CANNOTKNOCK # Not from any RFC.
|
|
numeric[481]=ERR_NOPRIVILEGES
|
|
numeric[482]=ERR_CHANOPRIVSNEEDED
|
|
numeric[484]=ERR_ATTACKDENY # Name on Unreal. No idea use on Unreal.
|
|
# InspIRCd: 484 <nick> <channel> :Can't kick user <nick> from channel (+Q set)
|
|
numeric[489]=ERR_SECUREONLYCHAN # Not from any RFC. Used on Unreal and InspIRCd at least.
|
|
numeric[490]=ERR_ALLMUSTUSESSL # InspIRCd specific numeric. I made up this name, I don't know correct name.
|
|
# 490 <nick> <channel> :all members of the channel must be connected via SSL
|
|
numeric[491]=ERR_NOOPERHOST
|
|
numeric[495]=ERR_NOREJOINONKICK # InspIRCd specific numeric. I made up this name, I don't know correct name.
|
|
# 495 <nick> <channel> :You cannot rejoin this channel yet after being kicked (+J)
|
|
numeric[499]=ERR_CHANOWNPRIVNEEDED # Not from any RFC. Unreal got this at least.
|
|
|
|
numeric[501]=ERR_UMODEUNKNOWNFLAG # Some send this for unknown umodes. not all.
|
|
numeric[502]=ERR_USERSDONTMATCH # Trying to change mode for other user.
|
|
|
|
# Others. Not from any RFC but semi standard.
|
|
numeric[600]=RPL_LOGON # Unreal, InspIRCd and more
|
|
numeric[601]=RPL_LOGOFF # Unreal, InspIRCd and more
|
|
numeric[602]=RPL_WATCHOFF # Unreal, InspIRCd and more
|
|
numeric[604]=RPL_NOWON # Unreal, InspIRCd and more
|
|
numeric[605]=RPL_NOWOFF # Unreal, InspIRCd and more
|
|
numeric[606]=RPL_WATCHLIST # Unreal, InspIRCd and more
|
|
numeric[607]=RPL_ENDOFWATCHLIST # Unreal, InspIRCd and more
|
|
|
|
numeric[671]=RPL_WHOISSECURE # Used on Unreal for ssl clients.
|
|
|
|
|
|
# IRCd specific, these are InspIRCd ones unless said otherwise.
|
|
# As we can't include more than one meaning for every numeric conflicting
|
|
# ones may be added as comments. Modules depending on 9xx numerics should use the raw value.
|
|
# As I mainly use InspIRCd I prioritize those. ;)
|
|
numeric[900]=RPL_MODULES
|
|
numeric[901]=RPL_ENDOFMODULES
|
|
numeric[902]=RPL_COMMANDS # 902 <nick> :<command> <module name> <minimum parameters>
|
|
numeric[903]=RPL_ENDOFCOMMANDS # 903 <nick> :End of COMMANDS list
|
|
numeric[936]=ERR_CENSORED # 936 <nick> <channel> <word> :Your message contained a censored word, and was blocked
|
|
numeric[937]=ERR_ALREDYCENSORED # 937 <nick> <channel> :The word %s is already on the spamfilter list
|
|
numeric[938]=ERR_NOTCENSORED # 938 <nick> <channel> :No such spamfilter word is set
|
|
numeric[939]=ERR_SPAMFILTERLISTFULL # 939 <nick> <channel> :Channel spamfilter list is full
|
|
numeric[940]=RPL_ENDOFSPAMFILTER # 940 <nick> <channel> :End of channel spamfilter list
|
|
numeric[941]=RPL_SPAMFILTER # 941 <nick> <channel> <spamfilter>
|
|
numeric[942]=ERR_INVALIDNICK # 942 <nick> <nick> :Invalid user specified.
|
|
numeric[950]=RPL_SILENCEREMOVED # 950 <nick> <nick> :Removed <nick>!*@* from silence list
|
|
numeric[951]=RPL_SILENCEADDED # 951 <nick> <nick> :Added <nick>!*@* to silence list
|
|
numeric[952]=ERR_ALREADYSILENCE # 952 <nick> <nick> :<nick> is already on your silence list
|
|
numeric[972]=ERR_CANNOTDOCOMMAND # Unreal uses 972 (ERR_CANNOTDOCOMMAND) for umode +q, and other failed kicks.
|
|
# According to http://www.alien.net.au/irc/irc2numerics.html:
|
|
# "Works similarly to all of KineIRCd's CANNOT* numerics. This one indicates that a
|
|
# command could not be performed for an arbitrary reason. For example, a halfop trying to kick an op."
|
|
numeric[974]=ERR_CANNOTCHANGECHANMODE # Unreal uses 974 (ERR_CANNOTCHANGECHANMODE ?) for ERR_ALLMUSTUSESSL.
|