Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
module:ircbot [2019/04/18 15:19] – hansolo | module:ircbot [2019/05/30 23:43] (current) – Created sections digital man | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
+ | |||
+ | ===== Install ===== | ||
+ | |||
+ | The IRC bot is included with Synchronet BBS, at '' | ||
+ | |||
+ | ===== Configure ===== | ||
+ | |||
+ | The IRC bot configuration file is [[: | ||
< | < | ||
- | < | + | [server_ServerName] |
- | < | + | addresses=add.ress.one, add.ress.two |
- | < | + | nick=BotNickname |
- | < | + | services_password=? |
- | < | + | channels=# |
- | < | + | port=6667 |
- | < | + | |
- | < | + | |
- | < | + | |
</ | </ | ||
- | I'm going to start working on revising this page. Since there is not a great deal of info about the ircBot included with the BBS package, I've been doing some experimenting. | + | // |
+ | - If you are running the Synchronet ircd, you can connect the bot to localhost, 127.0.0.1, or the specific interface that the ircd binds to as configured in [[: | ||
+ | - You may place more than one server section in [[: | ||
- | Installation | + | **Modules** |
- | ------------ | + | There are a number of modules available for the IRC bot, but they are not all enabled |
- | There is an ircBot program included with the Synchro.net BBS package, but it is not enabled | + | |
- | Configuration | + | < |
- | ------------- | + | [module_ModuleName] |
- | The ircBot is controlled via a settings file ctrl/ircbot.ini | + | channels=# |
- | Most important are the server settings (omit the * I just needed them for formatting in this wiki); | + | dir=/sbbs/ |
+ | lib=mylib.js | ||
+ | global=true | ||
+ | </ | ||
- | * [server_ServerName] | + | Looking at the '' |
- | * addresses=add.ress.one, add.ress.two | + | |
- | * nick=BotNickname | + | |
- | * services_password=? | + | |
- | * channels=# | + | |
- | * port=6667 | + | |
- | Notes: | + | < |
- | -- If running from the same machine as the ircD then using localhost or 127.0.0.1 works OK. But if you have multiple IP's configured use the specific IP' | + | |
- | -- Port is required but if you use the default 6667 or a dedicated port doesn' | + | |
- | -- Passwords are important but quite honestly I have not figured out how to authenticate a bot other than with /oper lines. | + | |
- | -- I have found that you may place more than one server section in the ini and it does in fact create more than one bot in the ircd. However, the subsequent bots do not see to behave the same as the default and I need to experiment more with using dedicated ports / running multiple command windows to host individual bots. | + | |
- | Modules | + | ; |
- | ------- | + | ; |
- | There are a number of modules available for the ircBot to host, although they are not all enabled (or listed) in the ctrl/ircbot.ini by default. | + | |
- | * [module_ModuleName] | + | [module_Admin] |
- | * channels=#channelone < | + | global=true |
- | | + | dir=/ |
- | * lib=mylib.js | + | |
- | * global=true | + | |
- | Looking at the sbbs\exec\ircbots | + | [module_Antispam] |
+ | global=true | ||
+ | channels = # | ||
+ | dir=/sbbs/exec/ircbots/antispam/ | ||
- | * [module_Admin] | + | [module_Decider] |
- | | + | global=true |
- | | + | dir=/ |
- | * [module_Antispam] | + | [module_Dice] |
- | | + | global=true |
- | | + | dir=/ |
- | * [module_Decider] | + | [module_Dis] |
- | * global=true | + | dir=/ |
- | * dir=/ | + | |
- | * [module_Dice] | + | ;[module_Google] |
- | | + | ;global=true |
- | | + | ;dir=/ |
- | * [module_Dis] | + | [module_Ham] |
- | | + | dir=/ |
- | * ;[module_Google] | + | [module_Humanity] |
- | * ; | + | dir=/ |
- | * ;dir=/ | + | |
- | * [module_Ham] | + | [module_Info] |
- | | + | global=true |
+ | dir=/ | ||
+ | lib=http.js | ||
- | * [module_Humanity] | + | [module_Poker] |
- | | + | dir=/ |
+ | lib=cardlib.js | ||
- | * [module_Info] | + | [module_Presence] |
- | * global=true | + | dir=/ |
- | * dir=/ | + | |
- | * lib=http.js | + | |
- | * [module_Poker] | + | [module_Weather] |
- | | + | global=true |
- | | + | dir=/ |
+ | lib=http.js | ||
- | * [module_Presence] | + | [module_WhereIs] |
- | | + | global=true |
+ | dir=/ | ||
+ | lib=http.js | ||
- | * [module_Weather] | + | [module_RPG] |
- | * global=true | + | channels |
- | | + | dir=/ |
- | * lib=http.js | + | </ |
- | * [module_WhereIs] | + | //Notes// |
- | * global=true | + | |
- | * dir=/sbbs/exec/ircbots/ | + | - No trivia directory although it is listed in the ini file. |
- | | + | - Add a module to a channel by adding the line channels |
+ | - Otherwise, by adding the modules to the ini and restarting the bot you may make these available in your ircd. | ||
- | | + | **Running the IRC Bot** |
- | | + | |
- | Good seems to have some file dependencies and doesn't execute so I have it commented out. Also, no trivia directory although it is listed in the ini file. | + | The IRC bot can be executed via [[: |
- | See the help by sending /msg < | + | You can also run the IRC bot via your services thread |
- | You will need to IDENT against your bot to see the full menu of items, without IDENT the help looks like; | + | |
+ | < | ||
+ | [IRCBot] | ||
+ | Port=6668 | ||
+ | Options=STATIC|LOOP | ||
+ | Command=ircbot.js | ||
+ | </ | ||
+ | |||
+ | Note that the //Port// value must be supplied, but is irrelevant; the bot does not listen for connections. | ||
+ | |||
+ | You can add '' | ||
+ | |||
+ | ===== Use ===== | ||
+ | |||
+ | - See the help menu by sending **/msg < | ||
+ | - Some commands are restricted and will not show up in the help menu (or be usable), until you have identified yourself to the bot. To identify, use **/msg < | ||
+ | |||
+ | Without **IDENT** the help looks like; | ||
+ | |||
+ | < | ||
Usage: HELP < | Usage: HELP < | ||
[main] help,?, | [main] help,?, | ||
Line 130: | Line 150: | ||
for help creating a characer, type 'rpg help create' | for help creating a characer, type 'rpg help create' | ||
for help with the editor, type 'rpg help editor' | for help with the editor, type 'rpg help editor' | ||
+ | </ | ||
- | With IDENT it looks like; | + | With **IDENT** it looks like; |
+ | |||
+ | < | ||
Usage: HELP < | Usage: HELP < | ||
[main] reload, | [main] reload, | ||
Line 154: | Line 177: | ||
for help creating a characer, type 'rpg help create' | for help creating a characer, type 'rpg help create' | ||
for help with the editor, type 'rpg help editor' | for help with the editor, type 'rpg help editor' | ||
+ | </ | ||
+ | |||
+ | The main module functions are contained in the ''/ | ||
+ | |||
+ | < | ||
+ | Bot_Commands[" | ||
+ | get_cmd_prefix() + " | ||
+ | Bot_Commands[" | ||
+ | " | ||
+ | </ | ||
+ | |||
+ | This is an example from the command RELOAD. | ||
+ | The usage line dictates the syntax required to execute the command. | ||
+ | The help line contains a text description of the command' | ||
+ | |||
+ | **Module Main** | ||
+ | * reload - Reloads the internal bot command and function structure. | ||
+ | * load - ??? Unconfirmed ??? I suspect this loads messages from a BBS message area but am unable to get this working. | ||
+ | * join - Instructs the specified bot to JOIN a new channel. [Note: may also be specified in the [[: | ||
+ | * part - Instructs the specified bot to dePART from a channel. | ||
+ | * die - Causes bot to die (shut down). You don't want that, do you? | ||
+ | * restart - Forces bot to restart, only works with bots running as a service. | ||
+ | * help - Displays helpful information about bot commands. | ||
+ | * ? - This is the same as help above [Note: This is a command alias, created via // | ||
+ | * ident - Identifies a user by alias and password. Use via private message only. [Note: create an alias for IDENT too.] | ||
+ | * addquote - Adds a quote from your nick to the database. | ||
+ | * quote - QUOTE returns quote assoicated with your nick, or search for a string to quote. | ||
+ | * greet - Sets or clears the greeting I will display when you enter the room. | ||
+ | * save - ??? Unconfirmed ??? Save some data locally? | ||
+ | * prefix - Changes the bot command prefix. Default is BOT. Only needed in channels, not in private msgs. | ||
+ | * nick - Change the bots nickname. | ||
+ | * module - Toggle the status of modules in channels. | ||
+ | * modules - Same as modules above. | ||
+ | * abort - Instruct the bot to ABORT server output. | ||
+ | * ignore - Tell the bot to IGNORE the specified nickname. | ||
+ | |||
+ | Note: The RELOAD command throws an error in it's default config. This should result in reloading [[: | ||
+ | |||
+ | < | ||
+ | TypeError: redeclaration of const MODULE_NAME | ||
+ | file: / | ||
+ | line: 27 | ||
+ | </ | ||
+ | |||
+ | You may comment out this section in the ''/ | ||
+ | |||
+ | < | ||
+ | Bot_Commands[" | ||
+ | srv.o(target," | ||
+ | load(" | ||
+ | load(" | ||
+ | for(var m in Modules) { | ||
+ | /* Don't reload libraries?? | ||
+ | for(var l in Modules[m].load) { | ||
+ | if(Modules[m].load[l]) load(Modules[m], | ||
+ | } */ | ||
+ | } | ||
+ | srv.o(target," | ||
+ | return; | ||
+ | } | ||
+ | </ | ||
- | I am going to begin going through all the commands | + | I'll start creating separate pages for the other modules as I work though |
===== See Also ===== | ===== See Also ===== | ||
* [[: | * [[: | ||
- | {{tag>}} | + | {{tag>irc chat}} |