From 42911911492cd9eb09651ee7b174f1dff720fbc6 Mon Sep 17 00:00:00 2001 From: codemastr Date: Sun, 16 Dec 2001 00:35:57 +0000 Subject: [PATCH] Help system recode --- Changes | 1 + Makefile.in | 2 +- help.conf | 1017 +++++++++++++++++++++++++++ include/h.h | 2 + include/struct.h | 8 + makeconf | 2 +- src/help.c | 1708 ++-------------------------------------------- src/ircd.c | 3 - src/s_conf.c | 55 ++ 9 files changed, 1138 insertions(+), 1660 deletions(-) create mode 100644 help.conf diff --git a/Changes b/Changes index 0687d424e..1ad316ca8 100644 --- a/Changes +++ b/Changes @@ -992,3 +992,4 @@ seen. gmtime warning still there far. Problems, unloading, (delay), tkl doesn't always sweep it all, - Some scan unloading stuff - FIXED THE GOD DAMNED WHOIS BUG THAT I REPORTED *MONTHS* AGO! -Griev +- Added a new dynamic help system that allows you to add and modify /helpop items diff --git a/Makefile.in b/Makefile.in index 30d9dab8d..9d8507e5c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -218,7 +218,7 @@ install: all $(INSTALL) -m 0600 aliases/*.conf $(IRCDDIR)/aliases $(TOUCH) $(IRCDDIR)/unrealircd.conf chmod 0600 $(IRCDDIR)/unrealircd.conf - $(INSTALL) -m 0600 badwords.*.conf LICENSE Donation $(IRCDDIR) + $(INSTALL) -m 0600 badwords.*.conf help.conf LICENSE Donation $(IRCDDIR) $(INSTALL) -m 0700 bugreport makeconf unreal $(IRCDDIR) $(INSTALL) -m 0700 -d $(IRCDDIR)/modules $(INSTALL) -m 0700 src/modules/*.so $(IRCDDIR)/modules diff --git a/help.conf b/help.conf new file mode 100644 index 000000000..5e703f1c3 --- /dev/null +++ b/help.conf @@ -0,0 +1,1017 @@ +/* UnrealIRCd Help Configuration + * Based on the original help text written by hAtbLaDe + */ + +help { + " Specify your Question after the /HELPOP command."; + " If the request cannot be satisfied by the Server,"; + " it will be forwarded to the appropriate Help Operators"; + " A prefix of ! will send the Question directly to Help Ops"; + " and a prefix of ? will force it to be queried only within"; + " the UnrealIRCd Help System , without forwarding it"; + " -"; + " /HELPOP USERCMDS - To get the list of User Commands"; + " /HELPOP OPERCMDS - To get the list of Oper Commands"; + " /HELPOP SVSCMDS - Commands sent via U:Lined Server (Services)"; + " /HELPOP UMODES - To get the list of User Modes"; + " /HELPOP SNOMASKS - To get a list of Snomasks"; + " /HELPOP CHMODES - To get the list of Channel Modes"; + " /HELPOP ABOUT - Some more info on the Help System"; + " -"; + " -------------------------oOo--------------------------"; +}; + +help Usercmds { + " Currently the following User commands are available."; + " Use /HELPOP to get info about the command."; + " -"; + " -------------------oOo-------------------"; + " NICK WHOIS WHO WHOWAS NAMES"; + " ISON JOIN PART MOTD RULES"; + " LUSERS MAP QUIT PING VERSION"; + " STATS LINKS ADMIN USERHOST TOPIC"; + " INVITE KICK AWAY WATCH LIST"; + " PRIVMSG NOTICE KNOCK SETNAME VHOST"; + " MODE CREDITS DALINFO LICENSE TIME"; + " BOTMOTD SILENCE PONG"; + " -------------------oOo-------------------"; +}; + +help Opercmds { + " This section gives the IRC Operator only commands."; + " Use /HELPOP to get info about that command"; + " -"; + " -----------------oOo----------------"; + " OPER WALLOPS GLOBOPS CHATOPS LOCOPS"; + " ADCHAT NACHAT TECHAT KILL KLINE"; + " UNKLINE ZLINE UNZLINE GLINE SHUN"; + " AKILL RAKILL REHASH RESTART DIE"; + " LAG SETHOST SETIDENT CHGHOST CHGIDENT"; + " CHGNAME SQUIT CONNECT DCCDENY UNDCCDENY"; + " SAJOIN SAPART SAMODE RPING TRACE"; + " OPERMOTD SDESC MKPASSWD TSCTL HTM"; + " -----------------oOo----------------"; +}; + +help Svscmds { + " This section gives the commands that can be"; + " sent via a U:Lined Server such as Services."; + " The command is typically sent as -"; + " /MSG OPERSERV RAW :services "; + " Use /HELPOP to get info about that command"; + " -"; + " ----------oOo-----------"; + " SVSNICK SVSMODE SVSKILL"; + " SVSNOOP SVSJOIN SVSPART"; + " SVSO SWHOIS SQLINE"; + " UNSQLINE SVS2MODE SVSFLINE"; + " SVSMOTD SVSTIME"; + " -----------oOo-----------"; +}; + +help Umodes { + " This section lists all of the user modes available in UnrealIRCd."; + " -"; + " ---------------------oOo-------------------"; + " o = Global IRC Operator"; + " O = Local IRC Operator"; + " i = Invisible (Not shown in /WHO searches)"; + " w = Can listen to Wallop messages"; + " g = Can read & send to GlobOps, and LocOps"; + " h = Available for Help (Help Operator)"; + " s = Can listen to Server notices"; + " S = For Services only. (Protects them)"; + " a = Is a Services Administrator"; + " A = Is a Server Administrator"; + " N = Is a Network Administrator"; + " C = Is a Co Administrator"; + " r = Identifies the nick as being Registered"; + " x = Gives the user Hidden Hostname"; + " b = Can read & send to ChatOps"; + " W = Lets you see when people do a /WHOIS on you (IRC Operators only)"; + " q = Only U:lines can kick you (Services Admins only)"; + " B = Marks you as being a Bot"; + " I = Invisible Join/Part. Makes you being hidden at channels"; + " H = Hide IRCop status in /WHO and /WHOIS. (IRC Operators only)"; + " d = Makes it so you can not recieve channel PRIVMSGs (Deaf)"; + " v = Receive infected DCC send rejection notices"; + " t = Says that you are using a /VHOST"; + " G = Filters out all Bad words in your messages with ."; + " z = Marks the client as being on a Secure Connection (SSL)"; + " R = Allows you to only receive PRIVMSGs from registered (+r) users"; + " V = Marks the client as a WebTV user"; + " ---------------------oOo-------------------"; +}; + +help Snomasks { + " This section lists all of the snomasks available in UnrealIRCd."; + " An snomask is used with usermode +s. They are an additional parameter"; + " For example, to set snomask +f you'd do:"; + " /MODE mynick +s +f"; + " You can remove individual snomasks or set -s to remove them all"; + " -"; + " ---------------------oOo-------------------"; + " k = See's all the /KILL's which were executed"; + " c = See's all Connects/Disconnects on local server"; + " F = Lets you recieve Far and Local connect notices"; + " f = Listen to Flood Alerts from server"; + " j = See's misc. messages generated by the server"; + " v = Lets you receive notice of /vhost usages"; + " G = Lets you see TKL (G:line,Shun) noties"; + " e = Can listen to Server messages sent to +e users (Eyes)"; + " n = Lets you see notices when a user changes his/her nickname"; + " q = Lets you see notices when a user is rejected because of a Q:line"; + " ---------------------oOo-------------------"; +}; + +help Chmodes { + " This section lists all of the possible channel modes that may be used with /MODE"; + " -"; + " ---------------------oOo-------------------"; + " p = Private channel"; + " s = Secret channel"; + " i = A user must be invited to join"; + " m = Moderated channel (only +vhoaq users may speak)"; + " n = Users outside the channel can not send PRIVMSGs to the channel"; + " t = Only +hoaq may change the topic"; + " r = The channel is registered"; + " R = Only registered (+r) users may join the channel"; + " c = Block messages containing mIRC color codes"; + " Q = No kicks allowed"; + " O = IRC Operator only channel (Settable by IRCops)"; + " A = Server/Net Admin only channel (Settable by Admins)"; + " K = /KNOCK is not allowed"; + " V = /INVITE is not allowed"; + " S = Strips mIRC color codes"; + " N = No Nickname changes are permitted in the channel."; + " C = No CTCPs allowed in the channel."; + " z = Only Clients on a Secure Connection (SSL) can join."; + " H = No +I users may join (Settable by Admins)"; + " v = Gives Voice to the user (May talk if chan is +m)"; + " h = Gives HalfOp status to the user (Limited op access)"; + " o = Gives Operator status to the user"; + " a = Gives protection to the user (No kick/drop)" + " q = Gives Owner status to the user"; + " l = Channel may hold at most of users"; + " k = Users must specify to join"; + " f [*]: = Flood protection (Users will be kicked after saying in and banned if * is specified)"; + " L = Channel link (If +l is full, the next user will auto-join )"; + " b = Bans the nick!user@host from the channel"; + " e = Overrides a ban for matching users"; + " ---------------------oOo-------------------"; +}; + +help About { + " The UnrealIRCd help system was designed by the UnrealIRCd team."; + " Most of the text contained in this system was written by hAtbLaDe"; + " Type /INFO for more information about the IRCd"; +}; + +help Nick { + " Changes your \"Online Identity\" on a server."; + " All those in the channel you are in will be"; + " alerted of your nickname change."; + " -"; + " Syntax: NICK "; + " Example: NICK hAtbLaDe1"; +}; + +help Whois { + " Shows information about the user in question,"; + " such as their \"Name\", channels they are"; + " currently in, their hostmask, etc."; + " -"; + " Syntax: WHOIS "; + " Example: WHOIS hAtbLaDe"; +}; + +help Who { + " Retrieves information about users"; + " -"; + " Syntax:"; + " /WHO [+|-][acghmnsuCM] [args]"; + " Flags are specified like channel modes, the flags cgmnsu all have arguments"; + " Flags are set to a positive check by +, a negative check by -"; + " The flags work as follows:"; + " Flag a: user is away"; + " Flag c : user is on , no wildcards accepted"; + " Flag g : user has string in their GCOS,"; + " wildcards accepted, oper only"; + " Flag h : user has string in their hostname, wildcards are accepted"; + " Flag m : user has set on them, only o/A/a for nonopers"; + " Flag n : user has string in their nickname, wildcards accepted"; + " Flag s : user is on server , wildcards not accepted"; + " Flag u : user has string in their username, wildcards accepted"; + " Behavior flags:"; + " Flag C: show first visible channel user is in"; + " Flag M: check for user in channels I am a member of"; + " -"; + " For backwards compatibility, /who 0 o still shows +o users"; + " Example: WHO +m o"; +}; + +help Whowas { + " Retrieves previous WHOIS information for users"; + " no longer connected to the server."; + " -"; + " Syntax: WHOWAS "; + " WHOWAS "; + " Example: WHOWAS hAtbLaDe"; +}; + +help Names { + " Provides a list of users on the specified channel."; + " -"; + "Syntax: NAMES "; + "Example: NAMES #Support"; +}; + +help Ison { + " Used to determine of a certain user or users are"; + " currently on the IRC server based upon their nickname."; + " -"; + " Syntax: ISON "; + " Example: ISON hAtbLaDe Stskeeps OperServ AOLBot"; +}; + +help Join { + " Used to enter one or more channels on an IRC server."; + " All occupants of the channel will be notified of your arrival."; + " JOIN with 0 as a parameter makes you Part all channels."; + " If you specify one or more keys, they will be used to join a +k channel"; + " -"; + " Syntax: JOIN ,, ,,"; + " JOIN 0 (Parts all channels)"; + " Example: JOIN #Support"; + " JOIN #Lobby,#UnrealIRCd"; + " JOIN #UnrealIRCd,#Unreal-Support,#main letmein,,somepass"; +}; + +help Part { + " Used to part (or leave) a channel you currently occupy."; + " All those in the channel will be notified of your departure."; + " If you specify a reason it will be displayed to users on the channel"; + " -"; + " Syntax: PART ,,, "; + " Example: PART #Support"; + " PART #Lobby,#UnrealIRCd See ya later!"; +}; + +help Motd { + " Displays the Message Of The Day."; + " -"; + " Syntax: MOTD"; + " MOTD "; +}; + +help Botmotd { + " Displays the IRCd Bot Message Of The Day"; + " -"; + " Syntax : BOTMOTD"; + " BOTMOTD "; +}; + +help Rules { + " Reads the Network Rules (ircd.rules) file and sends"; + " the contents to the user."; + " -"; + " Syntax: RULES"; + " RULES "; +}; + +help Lusers { + " Provides Local and Global user information"; + " (Such as Current and Maximum user count)."; + " -"; + " Syntax: LUSERS"; +}; + +help Map { + " Provides a graphical \"Network Map\" of the IRC network."; + " Mainly used for routing purposes."; + " -"; + " Syntax: MAP"; +}; + +help Quit { + " Disconnects you from the IRC server. Those in the"; + " channels you occupy will be notified of your departure."; + " If you do not specify a reason, your nickname becomes the reason."; + " -"; + " Syntax: QUIT "; + " Example: QUIT Leaving!"; +}; + +help Ping { + " The PING command is used to test the presence of an active client or"; + " server at the other end of the connection. Servers send a PING"; + " message at regular intervals if no other activity detected coming"; + " from a connection. If a connection fails to respond to a PING"; + " message within a set amount of time, that connection is closed. A"; + " PING message MAY be sent even if the connection is active."; + " Note that this is different from a CTCP PING command.."; + " -"; + " Syntax: PING "; + " Example: PING irc.fyremoon.net"; + " PING hAtbLaDe"; + " PING hAtbLaDe irc2.dynam.ac"; +}; + +help Pong { + " PONG message is a reply to PING message. If parameter is"; + " given, this message will be forwarded to given target. The "; + " parameter is the name of the entity who has responded to PING message"; + " and generated this message."; + " -"; + " Syntax: PONG "; + " Example: PONG irc.fyremoon.net irc2.dynam.ac"; + " (PONG message from irc.fyremoon.net to irc2.dynam.ac)"; +}; + +help Version { + " Provides Version information of the IRCd software in usage."; + " -"; + " Syntax: VERSION"; + " VERSION "; +}; + +help Stats { + " Provides certain Statistical information about the server"; + " -"; + " Syntax: STATS "; + " Example: STATS u"; + " -"; + " *** Stats Flags ***"; + " -"; + " b - Send the badwords list"; + " C - Send the link block list"; + " d - Send the deny link (auto) block list"; + " D - Send the deny link (all) block list"; + " e - Send the except socks block list"; + " E - Send the except ban block list"; + " F - Send the deny dcc block list"; + " G - Report TKL information (G:lines/Shuns)"; + " H - Send the link block list"; + " I - Send the allow block list"; + " K - Send the ban user/ban ip/except ban block list (Includes AKILLs)"; + " L - Send Link information"; + " m - Send the events list"; + " M - Send list of how many times each command was used"; + " n - Send the ban realname block list"; + " N - Send network configuration list"; + " O - Send the oper block list"; + " q - Send the SQLINE list"; + " Q - Send the ban nick block list"; + " r - Send the channel deny/allow block list"; + " s - Send the SCache and NS list"; + " S - Send the dynamic configuration list"; + " t - Send connection information"; + " T - Send the tld block list"; + " u - Send server uptime and connection count"; + " U - Send the ulines block list"; + " v - Send the deny version block list"; + " V - Send the vhost block list"; + " Y - Send the class block list"; + " Z - Send memory usage information"; +}; + +help Links { + " Lists all of the servers currently linked to the network."; + " -"; + " Syntax: LINKS"; +}; + +help Admin { + " Provides Administrative information regarding the server."; + " -"; + " Syntax: ADMIN"; + " ADMIN "; +}; + +help Userhost { + " Returns the userhost of the user in question."; + " Usually used by scripts or bots."; + " -"; + " Syntax: USERHOST "; + " Example: USERHOST hAtbLaDe"; +}; + +help Topic { + " Sets/Changes the topic of the channel in question,"; + " or just display the current Topic."; + " -"; + " Syntax: TOPIC (Displays the current topic)"; + " TOPIC (Changes topic)"; + " Example: TOPIC #Operhelp"; + " TOPIC #Lobby Welcome to #Lobby!!"; +}; + +help Invite { + " Sends a user an Invitation to join a particular channel."; + " You must be an Operator on the channel in order to"; + " invite a user into it."; + " -"; + " Syntax: INVITE "; + " Example: INVITE hAtbLaDe #Support"; +}; + +help Kick { + " Removes a user from a channel. Can only be used by Operators"; + " or Half-Ops. If no reason is specified, your nickname becomes the reason."; + " -"; + " Syntax: KICK [,..] [,..] "; + " Example: KICK #Lobby foobar Lamer.."; + " KICK #Lobby,#OperHelp Lamer23,Luser12 Lamers!"; +}; + +help Away { + " Sets your online status to \"Away\"."; + " -"; + " Syntax: AWAY (Sets you Away with the reason given)"; + " AWAY (Un-Sets you as Away)"; + " Example: AWAY Lunch time!"; +}; + +help Watch { + " Watch is a new notify-type system in UnrealIRCd which is both faster"; + " and uses less network resources than any old-style notify"; + " system. The server will send you a message when any nickname"; + " in your watch list logs on or off."; + " The watch list DOES NOT REMAIN BETWEEN SESSIONS - You (or your"; + " script or client) must add the nicknames to your watch list every"; + " time you connect to an IRC server."; + " -"; + " Syntax: WATCH +nick1 +nick2 +nick3 (Add nicknames)"; + " WATCH -nick (Delete nicknames)"; + " WATCH (View the watchlist)"; +}; + +help List { + " Provides a complete listing of all channels on the network."; + " If a search string is specified, it will only show those"; + " matching the search string."; + " -"; + " Syntax: LIST "; + " Example: LIST"; + " LIST *ircd*"; + " -"; + " Some additional flags are also supported."; + " >number List channels with more than people."; + " people."; + " !*mask* List channels that do not match *mask*"; + " -"; + " Any of those may be used instead of a standard mask"; +}; + +help Privmsg { + " PRIVMSG , which are used internally by the client for"; + " /MSG, in UnrealIRCd support two additional formats:"; + " /PRIVMSG @#channel will send the text to Channel-ops on the"; + " given channel only. /PRIVMSG @+#channel will send the text"; + " to both ops and voiced users on the channel. While some clients"; + " may support these as-is, on others (such as ircII), it's necessary"; + " to use /QUOTE PRIVMSG @#channel instead. You can also use"; + " % to signify HalfOps on the channel."; + " -"; + " Syntax: PRIVMSG ,,, :"; + " Example: PRIVMSG hAtbLaDe :Hello."; + " PRIVMSG hAtbLaDe,Somefella,Lamer :Hello everyone!"; +}; + +help Notice { + " /NOTICE, in UnrealIRCd support two additional formats:"; + " /NOTICE @#channel will send the text to Channel-ops on the"; + " given channel only. /NOTICE @+#channel will send the text"; + " to both ops and voiced users on the channel. While some clients"; + " may support these as-is, on others (such as ircII), it's necessary"; + " to use /QUOTE NOTICE @#channel instead. You can also use"; + " % to signify HalfOps on the channel."; + " -"; + " Syntax: NOTICE ,,, :"; + " Example: NOTICE hAtbLaDe :Hello."; + " NOTICE hAtbLaDe,Somefella,Lamer :Hello everyone!"; +}; + +help Knock { + " For channels which are invite only, you can \"Knock\" on the"; + " channel to request an invite."; + " -"; + " Syntax: KNOCK "; + " Example: KNOCK #secret_chan I'm an op, let me in!"; +}; + +help Setname { + " Allows users to change their \"Real name\" (GECOS)"; + " directly online at IRC without reconnecting"; + " -"; + " Syntax: SETNAME "; +}; + +help Vhost { + " Hides your real hostname with a virtual hostname"; + " provided by the IRC server , using SETHOST."; + " -"; + " Synatx: VHOST "; + " Example: VHOST openbsd ilovecypto"; +}; + +help Mode { + " Sets a mode on a Channel or User."; + " UnrealIRCd has got some new Channel & User Modes."; + " Use /HELPOP CHMODES or /HELPOP UMODES to see a list of Modes"; + " -"; + " Syntax: MODE "; + " Example: MODE #Support +tn"; + " MODE #Support +ootn hAtbLaDe XYZ"; +}; + +help Credits { + " This command will list the Credits to all the people who"; + " helped create UnrealIRCd."; + " -"; + " Syntax: CREDITS"; + " CREDITS "; +}; + +help Dalinfo { + " This command will list the Credits that the Dreamforge"; + " IRCd team/the IRCd developers that created code Unreal is based on."; + " -"; + " Syntax: DALINFO"; + " DALINFO "; +}; + +help License { + " This command displays information about the license Unreal is released under."; + " Syntax: LICENSE"; + " LICENSE "; +}; + +help Time { + " Displays the current Server Date and Time."; + " -"; + " Syntax : TIME"; + " TIME "; +}; + +help Silence { + " Ignores messages from a user or list of users at the Server itself."; + " -"; + " Syntax: SILENCE +nickname (Adds a nickname to SILENCE list)"; + " SILENCE -nickname (Removes a nickname from the SILENCE list)"; + " SILENCE (Lists the current SILENCE list)"; +}; + +help Oper { + " Attempts to give a user IRC Operator status."; + " -"; + " Syntax: OPER "; + " Example: OPER hAtbLaDe foobar234"; +}; + +help Wallops { + " Sends a \"Message\" to all those with the umode +w."; + " Only IRCops can send Wallops, while anyone can view them."; + " -"; + " Syntax: WALLOPS "; +}; + +help Globops { + " Sends a global \"Message\" to all IRCops. Only viewable by IRCops"; + " (unlike WALLOPS, which can be viewed by normal users)."; + " -"; + " Syntax: GLOBOPS "; + " Example: GLOBOPS Lets get em clones .."; +}; + +help Locops { + " Similar to GLOBOPS, except only received by those IRCops local to your server."; + " -"; + " Syntax: LOCOPS "; + " Example: LOCOPS Gonna k:line that luser ..."; +}; + +help Adchat { + " Sends a message to all online Admins"; + " -"; + " Syntax: ADCHAT "; + " Example: ADCHAT Hey guys!"; +}; + +help Nachat { + " Sends a message to all online NetAdmins"; + " -"; + " Syntax: NACHAT "; + " Example: NACHAT Hey guys!"; +}; + +help Kill { + " Forcefully Disconnects a user from an IRC Server."; + " IRC Operator only command."; + " -"; + " Syntax: KILL "; + " Example: KILL Clone5 Cloning is not allowed"; +}; + +help Kline { + " Bans a hostmask from connection to the IRC server."; + " The user can however connect to other servers on the network"; + " IRC Operator only command."; + " -"; + " Syntax: KLINE "; + " Example: KLINE *@*.aol.com Abuse"; +}; + +help Unkline { + " Removes a k:line from the server."; + " IRC Operator only command."; + " -"; + " Syntax: UNKLINE "; + " Example: UNKLINE *@*.aol.com"; +}; + +help Zline { + " Disables all access to the IRC server from a specified IP."; + " The IP can however connect to other servers on the network"; + " IRC Operator only command."; + " -"; + " Syntax: ZLINE :"; + " Example: ZLINE 127.0.0.1 :Localhost"; +}; + +help Unzline { + " Removes a currently active z:Line."; + " IRC Operator only command."; + " -"; + " Syntax: UNZLINE "; + " Example: UNZLINE 127.0.0.1"; +}; + +help Gline { + " This command provides timed G:Lines. If you match a G:Line you cannot"; + " connect to ANY server on the IRC network"; + " A time of 0 in the GLINE makes it permanent (Never Expires)."; + " In Unreal 3.1.1 you may also specify the time in the format 1d10h15m30s."; + " IRC Operator only command."; + " -"; + " Syntax: GLINE :"; + " (Adds a G:line for user@host)"; + " GLINE - (Removes a G:line for user@host)"; + " Example: GLINE *@*.dal.net 900 :Spammers (Adds a 15 min G:line)"; + " GLINE *@*.dal.net 1d5h :Spammers (Adds a 29 hour G:line)"; +}; + +help Shun { + " Prevents a user from executing ANY command except ADMIN"; + " and respond to Server Pings."; + " A time of 0 in the SHUN makes it permanent (Never Expires)."; + " You may also specify the time in the format 1d10h15m30s."; + " IRC Operator only command."; + " -"); + " Syntax: SHUN